experiment: test grounding of decision relevance
This commit is contained in:
@@ -64,7 +64,7 @@ Experiment 51 tested whether decision-relative relevance distinguishes coherent
|
||||
|
||||
Experiment 52 tested whether a small semantic interpretation step can judge decision relevance more reliably than keyword matching across paraphrases and domains. The semantic contract was implemented in `tests/graph/decision-relevance-semantic.test.js`. Live model comparison could not be completed because Ollama is not running on this machine — the test infrastructure uses the same `/api/chat` + `format:json` pattern as production. The deterministic keyword baseline continues to fail on paraphrases and new domains (confirmed via 15 passing guardrail tests). No semantic logic entered the active engine. The four-category decision-relevance contract remained unchanged. Branch: `feature/user-workspace-ux-v0.7`. First file to inspect: `tests/graph/decision-relevance-semantic.test.js` for the full experiment and results.
|
||||
|
||||
Experiment 52H held domain constant (market-entry / customer demand) and varied ambiguous wording across five cases. Three phrasings ("important to", "relevant to", "may matter for") became `could_change_decision`; one ("worth considering") became `supports_decision`; only "connected to" preserved `cannot_determine`. The evidence suggests the model strengthens vague relevance wording more generally, not just because of "important". Same host and model retained; no production behaviour changed. Status pending Rob's review.
|
||||
Experiment 52H held domain constant (market-entry / customer demand) and varied ambiguous wording across five cases. Four phrasings were strengthened beyond their supplied meaning; only "connected to" preserved `cannot_determine`. The model appeared more consistent about strengthening incomplete meaning than about which stronger category it selected. Experiment 52I then tested one grounding rule rather than keyword patches: three of four ambiguous cases preserved `cannot_determine` under grounding without harming clear classifications, but "important to" remained strengthened — the model could classify correctly while still commenting on relationship strength. The defect is partially grounding discipline, partially category contract. Same host and model retained; no production behaviour changed. Status pending Rob's review.
|
||||
|
||||
Experiment 52A recovered the semantic test infrastructure by correcting its configuration resolution. The helper previously used a hardcoded `localhost` fallback and an experiment-specific env var (`EXPERIMENT_52_MODEL`). Both were replaced to use exactly the same environment variable path as production (`process.env.OLLAMA_BASE_URL` / `process.env.OLLAMA_MODEL`) sourced from `.env.local`. Dotenv loading was added so vitest accesses the project's existing configuration source. Ollama at 192.168.1.111 is reachable and responds correctly with JSON format, but per-request latency (~82s) makes the 99 inference calls impractical. Configuration path verified correct; execution requires a faster inference host. No production code changed (0 lines in provider, config, analysis, orchestrator). Branch: `feature/user-workspace-ux-v0.7`. First file to inspect: `tests/graph/decision-relevance-semantic.test.js` lines 80–85 (helper).
|
||||
|
||||
@@ -124,8 +124,8 @@ Answer before continuing:
|
||||
|
||||
---
|
||||
|
||||
*Created by Experiment 34. Updated by Experiments 38–52H. Branch: `feature/user-workspace-ux-v0.7`.*
|
||||
*Created by Experiment 34. Updated by Experiments 38–52I. Branch: `feature/user-workspace-ux-v0.7`.*
|
||||
|
||||
### Return-to-Work Note (Experiment 52H)
|
||||
### Return-to-Work Note (Experiment 52I)
|
||||
|
||||
Experiment 52G's conclusion was narrowed to match its evidence: the cross-domain effect of "important to [decision]" → `could_change_decision` is established, but this was phrasing-specific. Experiment 52H held domain constant (market-entry / customer demand) and varied only ambiguous wording across five cases. Three phrasings ("important to", "relevant to", "may matter for") became `could_change_decision`; one ("worth considering") settled at `supports_decision`; only "connected to" preserved `cannot_determine`. The evidence suggests the model strengthens vague relevance wording more generally — not just because of "important" — with intensity proportional to phrasing specificity. Same host (`http://192.168.1.111:11434`) and model (`qwen-claude:latest`) retained; no production behaviour changed. Branch: `feature/user-workspace-ux-v0.7`, commit pending. First file to inspect when resuming: `docs/design-evolution-log.md` Experiment 52H section, then `tests/graph/decision-relevance-ambiguous-wording.test.js`.
|
||||
Experiments 52F–52H established that the model strengthens vague relevance phrasing beyond what was supplied: four of five ambiguous statements became `could_change_decision`, only "connected to" preserved `cannot_determine`. Corrections were applied to 52H's documentation so its conclusions match its evidence. Experiment 52I tested one grounding rule (rather than keyword patches): two clear controls remained correct, three of four ambiguous cases returned `cannot_determine` under grounding, but case 3 ("important to") still became `could_change_decision`. The model classified correctly in most grounded cases but its reasoning still introduced strength signals. This means the gap between supplied evidence and plausible inference persists even with explicit instructions. Same host/model retained; no production behaviour changed; branch: `feature/user-workspace-ux-v0.7` (commit pending). First file to inspect when resuming: `docs/design-evolution-log.md` Experiment 52I section, then `tests/graph/decision-relevance-grounding.test.js`.
|
||||
|
||||
@@ -4684,7 +4684,7 @@ All five statements communicate only that *there is some relationship*. None sta
|
||||
| 4 | "may matter for" | `cannot_determine` | `could_change_decision` | mismatch | "identifies customer demand as a factor that may matter, indicating it could materially affect viability or serve as a go/no-go condition." | 30,381ms | introduced_stronger_relationship |
|
||||
| 5 | "connected to" | `cannot_determine` | `cannot_determine` | **match** | "notes a generic connection without specifying direction, magnitude, or conditional impact, making it too vague to judge relevance." | 26,769ms | grounded_only_in_statement |
|
||||
|
||||
**Cannot_determine count: 1/5**
|
||||
**Four of five ambiguous statements were strengthened beyond the fixed reference; one of five (`connected to`) preserved `cannot_determine`.**
|
||||
**Wording variants that introduced stronger meaning: 4/5 (cases 1–4)**
|
||||
|
||||
### Evaluation Questions — Answered
|
||||
@@ -4754,19 +4754,21 @@ Experiment 52G's conclusion that "important" triggers go/no-go interpretation wa
|
||||
|
||||
### Experiment Conclusion
|
||||
|
||||
**Model strengthens vague relevance wording more generally.** The ambiguity failure is not specific to the word "important" but reflects a broader tendency to convert ambiguous relationship claims into decisive categories. However, there is a measurable gradient: as phrasing becomes more generic/neutral (e.g., "connected to"), the model becomes more willing to admit uncertainty (`cannot_determine`). This means potential remediation paths could target specific high-strength triggers ("important", "relevant") while lower-strength triggers ("connected") may be acceptable.
|
||||
**Model strengthens vague relevance wording more generally.** The ambiguity failure is not specific to the word "important" but reflects a broader tendency to convert ambiguous relationship claims into decisive categories. Wording materially affected how much relationship strength the model supplied. Only the most generic phrasing tested ("connected to") preserved `cannot_determine`.
|
||||
|
||||
**The experiment identifies a grounding problem: the model sometimes adds relationship strength that was not supplied. It does not establish that individual words should be filtered or patched.**
|
||||
|
||||
### Focused Test Result
|
||||
|
||||
The evidence does **not** support a conclusion of "Ambiguity strengthening appears strongly tied to 'important' wording" (which was what Experiment 52G alone suggested). The corrected finding is: **the model strengthens vague relevance wording more generally**, with intensity proportional to the specificity of the phrasing. Only the most generic phrasing tested ("connected to") preserved `cannot_determine`.
|
||||
The evidence does **not** support a conclusion of "Ambiguity strengthening appears strongly tied to 'important' wording" (which was what Experiment 52G alone suggested). The corrected finding is: **the model strengthens vague relevance wording more generally**, varying by phrasing. Only the most generic phrasing tested ("connected to") preserved `cannot_determine`.
|
||||
|
||||
### Regression Result
|
||||
|
||||
Experiment 52G re-run confirmed core pattern (zero ambiguity preservation) despite slight distribution shift (two cases shifted from `could_change_decision` to `supports_decision`). Deterministic classifier: 25/25 tests passing. No regressions.
|
||||
Experiment 52G re-run confirmed core pattern (zero ambiguity preservation) despite slight distribution shift (two cases shifted from `could_change_decision` to `supports_decision`). The model appeared more consistent about strengthening incomplete meaning than about which stronger category it selected. Deterministic classifier: 25/25 tests passing. No regressions.
|
||||
|
||||
### Status
|
||||
|
||||
**Pending Rob's review.** The contract cannot reliably preserve ambiguity across multiple ambiguous phrasings, with over-interpretation intensity proportional to phrasing specificity. Both experiments (52G and 52H) used the same host (`http://192.168.1.111:11434`) and model (`qwen-claude:latest`). No production code has been changed.
|
||||
**Pending Rob's review.** The contract cannot reliably preserve ambiguity across multiple ambiguous phrasings, with strengthening varying by phrasing. Both experiments (52G and 52H) used the same host (`http://192.168.1.111:11434`) and model (`qwen-claude:latest`). No production code has been changed.
|
||||
|
||||
### Production Unchanged
|
||||
|
||||
@@ -4779,3 +4781,188 @@ Experiment 52G re-run confirmed core pattern (zero ambiguity preservation) despi
|
||||
- `tests/graph/decision-relevance-ambiguous-wording.test.js` — Exp 52H probe (42 tests, 5 live calls)
|
||||
|
||||
|
||||
## Experiment 52I — Can One Grounding Rule Stop the Model Inventing Relationship Strength? (2026-08-07)
|
||||
|
||||
Experiment 52H showed that four of five ambiguous phrases were strengthened beyond their supplied meaning. Only "connected to" preserved `cannot_determine`. The unresolved question was: can a single grounding instruction prevent this without telling the model which category to prefer?
|
||||
|
||||
### Objective
|
||||
|
||||
Test whether one domain-neutral grounding instruction makes the semantic normaliser classify only the relationship actually supplied, instead of completing missing meaning from plausible real-world knowledge.
|
||||
|
||||
> **Can the semantic step distinguish what was actually supplied from what it merely finds plausible?**
|
||||
|
||||
### Configuration
|
||||
|
||||
| Setting | Value |
|
||||
|---|---|
|
||||
| Ollama host | `http://192.168.1.111:11434` (from `.env.local`) |
|
||||
| Model | `qwen-claude:latest` (from `.env.local`) |
|
||||
| Normalisation instruction | Experiment 52H instruction + one grounding rule (exact change documented below) |
|
||||
| Input per case | `{"relationship": "<fixed relationship statement>"}` only. No decision target, no question, no domain examples. |
|
||||
| Domain for ambiguous cases | Market entry / customer demand (same as Exp 52H for direct comparison) |
|
||||
| Domain for clear controls | Community event weather / outdoor venue (deliberately different to test grounding independence) |
|
||||
|
||||
### Category Definitions Used (unchanged from production contract)
|
||||
|
||||
| Category | Definition |
|
||||
|---|---|
|
||||
| `could_change_decision` | Answering could reasonably reverse the proposed action — it is a go/no-go condition or materially affects viability. |
|
||||
| `supports_decision` | Answering improves confidence or evidence for the decision but is less likely to reverse it alone. |
|
||||
| `unlikely_to_change_decision` | Answering may be interesting but is unlikely to materially affect the decision. |
|
||||
| `cannot_determine` | The relationship is too unclear or information is insufficient to judge relevance to a specific decision. |
|
||||
|
||||
### The One Allowed Instruction Change
|
||||
|
||||
**Previous instruction (identical to Experiment 52H):**
|
||||
|
||||
```
|
||||
You are given a short statement describing how an unanswered question relates to a decision. That relationship has already been understood correctly — your job is only to map it into one of these four categories:
|
||||
|
||||
- "could_change_decision" — answering could reasonably reverse the proposed action; it is a go/no-go condition or materially affects viability.
|
||||
- "supports_decision" — answering improves confidence or evidence for the decision but is less likely to reverse it alone.
|
||||
- "unlikely_to_change_decision" — answering may be interesting but is unlikely to materially affect the decision.
|
||||
- "cannot_determine" — the relationship is too unclear or information is insufficient to judge relevance to a specific decision.
|
||||
|
||||
Do not reinterpret the original situation — you have not been given it. You have only the relationship statement above and these category definitions. Choose the category that best matches the relationship statement.
|
||||
|
||||
Return only valid JSON using this schema: {"relevance": "<one of the four values>", "reason": "<short factual explanation based only on the supplied relationship>"}
|
||||
Do not include any other keys.
|
||||
```
|
||||
|
||||
**Single grounding rule added:**
|
||||
|
||||
```
|
||||
Use only the relationship stated in the input. Do not add unstated facts, consequences, strength, or domain assumptions. If the supplied relationship does not justify choosing between categories, return `cannot_determine`.
|
||||
```
|
||||
|
||||
**Grounded instruction = previous instruction + appended grounding rule (verbatim). No examples added. No domain-specific hints. No trigger words mentioned.**
|
||||
|
||||
### Six Fixed Cases
|
||||
|
||||
| Case | Type | Relationship Statement | Expected Enum |
|
||||
|------|------|----------------------|---------------|
|
||||
| 1 | Clear blocker control | "If dangerous weather is forecast for the event date, holding the event outdoors would no longer be viable." | `could_change_decision` |
|
||||
| 2 | Clear supporting-evidence control | "Positive feedback from previous attendees would increase confidence in choosing an outdoor venue, but would not determine the decision by itself." | `supports_decision` |
|
||||
| 3 | Ambiguous — "important to" | "Understanding customer demand would be important to the market-entry decision." | `cannot_determine` |
|
||||
| 4 | Ambiguous — "relevant to" | "Understanding customer demand would be relevant to the market-entry decision." | `cannot_determine` |
|
||||
| 5 | Ambiguous — "may matter for" | "Customer demand may matter for the market-entry decision." | `cannot_determine` |
|
||||
| 6 | Ambiguous control — "connected to" | "Customer demand is connected to the market-entry decision." | `cannot_determine` |
|
||||
|
||||
### Results — Clear Controls
|
||||
|
||||
Both clear controls were run under both instructions.
|
||||
|
||||
| Case | Label | Previous Result | Grounded Result | Match? (grounded) | Grounding |
|
||||
|------|-------|-----------------|-----------------|--------------------|-----------|
|
||||
| 1 | Clear blocker control | `could_change_decision` | `could_change_decision` | ✅ match | grounded_in_supplied_relationship |
|
||||
| 2 | Clear supporting-evidence control | `supports_decision` | `supports_decision` | ✅ match | grounded_in_supplied_relationship |
|
||||
|
||||
Both clear controls retained their expected categories under the grounded instruction. The grounding rule did not weaken or erase explicit decisive/supporting meaning.
|
||||
|
||||
### Results — Ambiguous Cases (Grounded Instruction)
|
||||
|
||||
| Case | Wording | Expected Enum | Returned Enum (grounded) | Match? | Grounding Diagnostic | Reason Summary |
|
||||
|------|---------|---------------|--------------------------|--------|---------------------|----------------|
|
||||
| 3 | "important to" | `cannot_determine` | `could_change_decision` | ❌ mismatch | introduced_unstated_relationship_strength | Model read "important" as materially affecting viability / critical go/no-go condition |
|
||||
| 4 | "relevant to" | `cannot_determine` | `cannot_determine` | ✅ match | grounded_in_supplied_relationship | Model noted general relevance without specifying direction, strength, or material impact |
|
||||
| 5 | "may matter for" | `cannot_determine` | `cannot_determine` | ✅ match | introduced_unstated_relationship_strength | Model correctly returned `cannot_determine` but reason contained strength signals ("impossible to judge against categories") |
|
||||
| 6 | "connected to" | `cannot_determine` | `cannot_determine` | ✅ match | introduced_unstated_relationship_strength | Model correctly returned `cannot_determine` but reason contained strength-related framing ("insufficient to justify another category") |
|
||||
|
||||
**Cannot_determine count under grounding: 3/4**
|
||||
**Cases that still strengthened beyond supplied meaning: 1/4 (case 3 — "important to")**
|
||||
|
||||
### Grounding Diagnostic Detail
|
||||
|
||||
Under the grounded instruction, the model's reasoning text was manually assessed:
|
||||
|
||||
| Case | Grounding Result | Analysis |
|
||||
|------|-----------------|----------|
|
||||
| 3 ("important to") | `introduced_unstated_relationship_strength` | Model invented "materially affects viability" and "critical go/no-go condition" — not in statement. Despite correct expectation of cannot_determine, the model could not resist interpreting "important". |
|
||||
| 4 ("relevant to") | `grounded_in_supplied_relationship` | Model noted only general relevance without specifying direction or impact. Stayed within supplied meaning. |
|
||||
| 5 ("may matter for") | `introduced_unstated_relationship_strength` | Enum was correct (`cannot_determine`) but reason contained strength-related framing ("impossible to judge against the provided categories"). The enum preserved ambiguity; the reasoning did not fully avoid strength signals. |
|
||||
| 6 ("connected to") | `introduced_unstated_relationship_strength` | Enum was correct (`cannot_determine`) but reason framed insufficiency as justification for rejecting other categories rather than admitting genuine inability to judge. |
|
||||
|
||||
**Key insight:** Cases 5 and 6 returned the correct enum (`cannot_determine`) under grounding, but their reasoning text contained strength-related framing not present in the original statements. The grounding rule improved category classification more reliably than it improved reasoning discipline. Case 3 resisted even the grounded instruction — "important to" continued to become `could_change_decision`.
|
||||
|
||||
### Comparison With Experiment 52H (Ambiguous Cases)
|
||||
|
||||
| Case | Wording | 52H Enum | 52I Grounded Enum | Change? | 52H Grounding | 52I Grounding |
|
||||
|------|---------|----------|-------------------|---------|---------------|---------------|
|
||||
| 3 | "important to" | `could_change_decision` | `could_change_decision` | unchanged | introduced_unstated_relationship_strength | introduced_unstated_relationship_strength |
|
||||
| 4 | "relevant to" | `could_change_decision` | `cannot_determine` | ✅ improved | introduced_unstated_relationship_strength | grounded_in_supplied_relationship |
|
||||
| 5 | "may matter for" | `could_change_decision` | `cannot_determine` | ✅ improved | introduced_unstated_relationship_strength | introduced_unstated_relationship_strength (enum correct, reasoning had strength signals) |
|
||||
| 6 | "connected to" | `cannot_determine` | `cannot_determine` | unchanged | grounded_only_in_statement | introduced_unstated_relationship_strength (enum correct) |
|
||||
|
||||
**Ambiguity preservation improved:** Cases 4 and 5 shifted from `could_change_decision` → `cannot_determine`. Case 3 remained unchanged. Case 6 remained the same (both preserved ambiguity in enum, though 52I's reasoning drifted slightly).
|
||||
|
||||
### Did Grounding Improve Ambiguity Preservation?
|
||||
|
||||
**Yes.** Three of four ambiguous cases returned `cannot_determine` under grounding, compared to one of five in Experiment 52H. Two cases ("relevant to" and "may matter for") explicitly improved from `could_change_decision` to `cannot_determine`.
|
||||
|
||||
### Did Grounding Harm Clear Classifications?
|
||||
|
||||
**No.** Both clear controls (blocker → `could_change_decision`, supporting → `supports_decision`) remained correct under the grounded instruction. The grounding rule preserved explicit decisive/supporting meaning while reducing over-interpretation of vague phrases.
|
||||
|
||||
### Evidence About Supplied Meaning Versus Plausible Inference
|
||||
|
||||
The one remaining case where the model introduced unstated strength (case 3, "important to") demonstrates that **"important" may be a particularly strong trigger** — it was the only phrase that resisted even the grounding instruction. This is consistent with Experiment 52G's earlier finding but does not justify building a keyword-filter system around it; instead, it suggests:
|
||||
|
||||
- The grounding rule improves ambiguity preservation without harming clear classifications
|
||||
- A single category-level safeguard can move most vague phrasing toward `cannot_determine`
|
||||
- But the model still struggles to separate *what was stated* from *what seems plausible* for strong trigger words
|
||||
- The gap between correct enum and grounded reasoning (cases 5 and 6) suggests the model can classify correctly but cannot help but comment on strength when asked
|
||||
|
||||
### What This Suggests Is the Primary Defect
|
||||
|
||||
**Partially grounding discipline, partially category contract.** The single grounding rule successfully moved two ambiguous phrases from `could_change_decision` to `cannot_determine` and did not harm clear classifications. However, "important to" remained strengthened, and three of four grounded reasons contained strength-related framing despite correct enum selection for three cases. This means:
|
||||
|
||||
1. **Grounding discipline** — the model can produce correct categories with grounding but its reasoning still drifts into strengthening
|
||||
2. **Category contract** — `could_change_decision` vs `cannot_determine` remains ambiguous for some phrases even with grounding
|
||||
3. The single safeguard is **insufficient but directionally correct**
|
||||
|
||||
### Inference Timing
|
||||
|
||||
- Total inference time: 211,008 ms (~211 seconds)
|
||||
- Average per call: ~17,584 ms (~17.6 seconds) per call
|
||||
- Fastest call: 8,617 ms (previous instruction, case 6 — "connected to")
|
||||
- Slowest call: 30,674 ms (grounded instruction, case 3 — "important to")
|
||||
- Exactly 12 live inference calls (6 under previous instruction, 6 under grounded instruction)
|
||||
|
||||
### Limitations
|
||||
|
||||
- Single-run probe with `qwen-claude:latest` on remote host — stability over repeated runs not measured.
|
||||
- Four ambiguous phrases tested within one domain (market-entry/customer-demand) plus two control domains; results may vary with other phrasings or domains.
|
||||
- Grounding diagnostic uses heuristic keyword matching of reasoning text, confirmed by manual reason review.
|
||||
- The "important to" case resisted grounding — further testing would be needed to understand whether this is model-specific or a general property of the phrase.
|
||||
- Case 6 ("connected to") under grounded instruction produced `cannot_determine` correctly in enum but with slightly different reasoning than under the previous instruction, though both preserved ambiguity at the category level.
|
||||
|
||||
### Experiment Conclusion
|
||||
|
||||
**Grounding improves ambiguity preservation without harming clear cases — partially.** The single grounding rule moved two of four ambiguous phrases from `could_change_decision` to `cannot_determine` and did not harm clear blocker or supporting classifications. Three of four ambiguous cases preserved uncertainty at the category level (vs one of five in Experiment 52H). However, "important to" remained strengthened to `could_change_decision`, indicating that some trigger phrasings resist even grounding instructions. The gap between correct enum and grounded reasoning for cases 5 and 6 shows the model can classify correctly while still commenting on strength — it has not fully learned grounding discipline. Status pending Rob's review.
|
||||
|
||||
### Focused Test Result
|
||||
|
||||
| Test File | Tests | Passed | Failed |
|
||||
|---|---|---|---|
|
||||
| `decision-relevance-grounding.test.js` (Exp 52I) | 49 | 48 | 1 (case 3 "important to" — expected cannot_determine, got could_change_decision under grounded instruction) |
|
||||
| `question-decision-relevance.test.js` (core classifier) | 25 | 25 | — |
|
||||
|
||||
### Regression Result
|
||||
|
||||
Experiment 21 deterministic classifier: zero regressions across all 25 tests. No production code changed. The one test failure (case 3 "important to" under grounded instruction) confirms that the single grounding rule is necessary but insufficient for all ambiguous phrasings.
|
||||
|
||||
### Status
|
||||
|
||||
**Pending Rob's review.** The single grounding rule improved ambiguity preservation (3/4 ambiguous cases preserved `cannot_determine`) without harming clear classifications, but "important to" remained a resistance case. The defect appears partially grounded in discipline (the model can classify correctly with grounding) and partially in the category contract (some phrases resist even grounded classification). Same host (`http://192.168.1.111:11434`) and model (`qwen-claude:latest`) retained; no production behaviour changed.
|
||||
|
||||
### Production Unchanged
|
||||
|
||||
- `lib/graph/question-decision-relevance.js`: 0 lines changed
|
||||
- No production files modified
|
||||
- Working tree clean before commit
|
||||
|
||||
### Files Created
|
||||
|
||||
- `tests/graph/decision-relevance-grounding.test.js` — Exp 52I probe (49 tests, 12 live calls)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user