experiment: choose structured fidelity migration
This commit is contained in:
@@ -924,3 +924,21 @@ Read-only architecture diagnosis of whether existing `answerMeaning` fields can
|
||||
**What it does NOT establish:** That structured output solves the trust problem in general (Pattern A has no independent verification). That a dedicated `uncertaintyType` field (evidence_needed / user_clarification_needed) is unnecessary — this exists only in test fixtures, not any production schema.
|
||||
|
||||
Full results in `docs/experiment-57j49.md`.
|
||||
|
||||
### Experiment 57J.50 — Structured Fidelity Migration Choice
|
||||
|
||||
**Classification: C — STRUCTURED PRIMARY + NON-LEXICAL CONSISTENCY**
|
||||
|
||||
Read-only design decision selecting the smallest safe migration path from keyword-based fidelity inference to structured semantic fields as primary authority.
|
||||
|
||||
**Decision rationale:** Option C eliminates lexical dictionary dependence for all protected categories where structured fields are populated, while preserving backwards compatibility through null-to-lexical fallback for legacy proposals. It retains model-trust safeguards via cross-field deterministic consistency checks (resolutionGuidance vs proposal state, enum validity) without requiring the validator to re-infer English semantics from raw text or invent new classifiers.
|
||||
|
||||
**Exact next implementation boundary:** One branch — `feature/structured-semantic-fidelity-v0.20`. Four file modifications:
|
||||
1. `lib/graph/prompt-builder.js` — rule 28 replacement (enforce + instruct) + output contract addition (enum value listing for the two fields);
|
||||
2. `lib/graph/schema.js` — `z.enum(Object.values(answerSupportCategory))` and `z.enum(Object.values(answerResolutionGuidance))` constraints on the two zod fields;
|
||||
3. `lib/graph/apply-proposal.js` — migrate `validateAnswerMeaningAlignment()` to read structured values first, lexical fallback for null legacy proposals only; add schema-invariant consistency checks;
|
||||
4. `tests/graph/apply-proposal.test.js` — nine regression tests matching the required list below.
|
||||
|
||||
No new taxonomy. No provider-specific code. No embeddings. No synonym lists. No new LLM call pattern.
|
||||
|
||||
Full results in `docs/experiment-57j50.md`.
|
||||
|
||||
Reference in New Issue
Block a user