Files
confidence-engine/docs/experiment-57j55.md
T

72 lines
3.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Experiment 57J.55 — Uncertainty Identity Clarification (Prompt-Only)
**Branch:** `feature/uncertainty-identity-v0.21`
**Starting HEAD:** `f0cf85d` (experiment: diagnose uncertainty identity vs relatedness)
**Experiment commit:** pending
## Objective
Implement the bounded correction from Experiment 57J.54: clarify that "same uncertainty" means the same resolution question, not just topical overlap. This is a prompt-only task — no schema, validator, graph-model, or provider changes.
## Changes Made
### lib/graph/prompt-builder.js
Added to Additional Guidance under the existing first-existing-rule bullet:
> **"Same uncertainty" means the same resolution question: resolving the existing unknown would also resolve the uncertainty introduced by the user's answer. Mere topical overlap (concerning the same topic, object, decision, or domain) is not automatically the same uncertainty. If the new concern can remain unresolved after the existing node is resolved, represent it separately as a distinct uncertainty.**
This preserves the existing ordered fallback:
1. Check whether an existing unresolved unknown represents the same uncertainty.
2. If yes, update/refine it rather than creating a duplicate.
3. If no, add a new unknown representing the uncertainty.
### tests/graph/prompt-builder.test.js
Added 10 focused prompt tests under `buildGraphUpdatePrompt — 57J.55 uncertainty identity vs topical overlap`:
| # | What is tested | Assertion type |
|---|----------------|---------------|
| 1 | "same resolution question" definition exists | positive containment |
| 2 | "topical overlap" explicitly insufficient | positive containment |
| 3 | independently unresolved → distinct uncertainty | positive containment |
| 4 | equivalent uncertainty still prefers reuse/refine (existing-first) | positive containment |
| 5 | broad nodes do not automatically absorb sub-concerns | negative containment |
| 6 | unrelated domains handled separately | positive containment |
| 7 | duplicate avoidance preserved | positive containment |
| 8 | existing-first ordering preserved | positive containment |
| 9 | no keyword/synonym/embedding/similarity machinery added | negative containment × 4 |
| 10 | structured semantic fidelity (supportCategory, resolutionGuidance) intact | positive containment × 4 |
## Test Results
```
✓ tests/graph/prompt-builder.test.js (49 tests) 30ms
Test Files 1 passed (1)
Tests 49 passed (49)
```
All 49 tests pass — no regression in existing prompt structure tests; all 10 new identity tests pass.
## What This Implementation Guarantees
- The prompt now defines "same uncertainty" as a resolution-question equivalence, not topical proximity.
- A focused uncertainty (e.g., "Are the projected office savings realistic?") is distinguishable from a broader related unknown (e.g., "What will total costs at the new location be?") by the independent-resolvability test: knowing total projected costs does not establish whether the office-savings assumption itself is realistic.
- Equivalent wording across turns (paraphrased savings-realism) still triggers reuse/refine via preserved existing-first ordering.
- No keyword, synonym, embedding, or numeric similarity logic was added — this remains purely prompt-level semantic reasoning.
## What This Intentionally Leaves Unresolved
- Whether the configured model (qwen-claude:latest) actually complies with the tightened guidance on live runs — requires live regression.
- Downstream effects of the clarification on question-selection, evidence linkage, or candidate tie behaviour — those remain separate issues per the scope exclusions.
- Generalisation to non-uncertainty categories (constraints, facts, decisions) — these may share similar gaps but are out of scope.
## Production code changed: NO
## Validator changed: NO
## Schema changed: NO
## Prompt changed: YES
## Tests changed: YES
## Ollama calls: 0
## Dev server disturbed: NO