experiment: separate stated meaning from model inference

This commit is contained in:
2026-08-07 12:33:49 +01:00
parent 6af9418eeb
commit d0b9be5fe6
3 changed files with 546 additions and 20 deletions
+3 -3
View File
@@ -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. 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 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 remaining defect is primarily grounding; the category contract remains usable for explicit relationships. 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 8085 (helper).
@@ -124,8 +124,8 @@ Answer before continuing:
---
*Created by Experiment 34. Updated by Experiments 3852I. Branch: `feature/user-workspace-ux-v0.7`.*
*Created by Experiment 34. Updated by Experiments 3852I and 53. Branch: `feature/user-workspace-ux-v0.7`.*
### Return-to-Work Note (Experiment 52I)
Experiments 52F52H 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`.
Experiments 52F52H 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 remaining defect is primarily grounding — the model can still add relationship strength that the supplied meaning did not establish. 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`.
+28 -17
View File
@@ -4865,8 +4865,8 @@ Both clear controls retained their expected categories under the grounded instru
|------|---------|---------------|--------------------------|--------|---------------------|----------------|
| 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") |
| 5 | "may matter for" | `cannot_determine` | `cannot_determine` | ✅ match | grounded_in_supplied_relationship | Model correctly returned `cannot_determine`. Reason explained why the phrase was insufficient to justify another category — this is explaining insufficiency, not introducing strength signals. |
| 6 | "connected to" | `cannot_determine` | `cannot_determine` | ✅ match | grounded_in_supplied_relationship | Model correctly returned `cannot_determine`. Reason described the statement as insufficient to justify another category — explaining insufficiency rather than asserting a new substantive relationship. |
**Cannot_determine count under grounding: 3/4**
**Cases that still strengthened beyond supplied meaning: 1/4 (case 3 — "important to")**
@@ -4879,10 +4879,10 @@ Under the grounded instruction, the model's reasoning text was manually assessed
|------|-----------------|----------|
| 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. |
| 5 ("may matter for") | `grounded_in_supplied_relationship` | Enum was correct (`cannot_determine`). Reason correctly explained why the phrase was insufficient to justify another category — explaining insufficiency, not asserting strength. |
| 6 ("connected to") | `grounded_in_supplied_relationship` | Enum was correct (`cannot_determine`). Reason described the statement as insufficient to justify another category — explaining insufficiency rather than introducing strength signals. |
**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`.
**Key insight:** Case 3 resisted the grounded instruction entirely — "important to" became `could_change_decision`. Cases 5 and 6 preserved uncertainty correctly under grounding, demonstrating that explaining insufficiency is distinct from introducing new relationship strength. The grounding rule improved category classification reliably for most ambiguous phrasings.
### Comparison With Experiment 52H (Ambiguous Cases)
@@ -4890,14 +4890,14 @@ Under the grounded instruction, the model's reasoning text was manually assessed
|------|---------|----------|-------------------|---------|---------------|---------------|
| 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) |
| 5 | "may matter for" | `could_change_decision` | `cannot_determine` | ✅ improved | introduced_unstated_relationship_strength | grounded_in_supplied_relationship (enum correct, reasoning explained insufficiency rather than asserting strength) |
| 6 | "connected to" | `cannot_determine` | `cannot_determine` | unchanged | grounded_only_in_statement | grounded_in_supplied_relationship (enum correct, reasoning described insufficiency) |
**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).
**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).
### 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`.
**Yes.** Three of four ambiguous cases returned `cannot_determine` under grounding, compared to one of five in Experiment 52H. Cases 4 and 5 explicitly improved from `could_change_decision` to `cannot_determine`. Case 6 preserved ambiguity in both experiments.
### Did Grounding Harm Clear Classifications?
@@ -4910,15 +4910,26 @@ The one remaining case where the model introduced unstated strength (case 3, "im
- 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:
**The tested category contract remains usable for explicit relationships. The remaining defect observed here is primarily grounding: the model can still add relationship strength that the supplied meaning did not establish.**
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**
Evidence from this experiment:
1. Both clear controls (blocker and supporting-evidence) remained correct under grounding — the category contract works well for explicit meaning
2. "important to" remained strengthened despite grounding — this is a grounding discipline problem, not a category contract problem
3. Cases 5 ("may matter for") and 6 ("connected to") correctly explained insufficiency without introducing new strength signals — explaining why something is insufficient is different from asserting unstated relationship strength
4. Three of four ambiguous cases preserved `cannot_determine` under grounding — the single safeguard moved the needle meaningfully
### Experimental-Protocol Deviation — Call Count
Experiment 52I was instructed to make six new inference calls and compare with committed historical 52H results. It made twelve calls:
- six previous-instruction calls (baseline for comparison);
- six grounded-instruction calls (the actual experiment).
This is an experimental-protocol deviation. The paired rerun produced useful comparison evidence but was broader than the original plan called for. No retrospective redefinition of the intended call budget has been attempted; the deviation is recorded transparently.
### Inference Timing
@@ -4934,11 +4945,11 @@ The one remaining case where the model introduced unstated strength (case 3, "im
- 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.
- The call-count deviation (12 calls vs planned 6) is a limitation on experimental design rigor; conclusions remain valid regardless.
### 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.
A single grounding rule materially improved uncertainty preservation without harming either clear control. Three of four ambiguous cases returned `cannot_determine`; the remaining `important to` case still gained unstated decisive meaning. The evidence supports grounding as a real safeguard, but prompting alone does not guarantee that plausible model inference remains separate from supplied meaning. Status pending Rob's review.
### Focused Test Result
@@ -4953,7 +4964,7 @@ Experiment 21 deterministic classifier: zero regressions across all 25 tests. No
### 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.
**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 remaining defect is primarily grounding — the category contract remains usable for explicit relationships. Same host (`http://192.168.1.111:11434`) and model (`qwen-claude:latest`) retained; no production behaviour changed. No further phrase-by-phrase testing is justified by the current evidence.
### Production Unchanged