reasoning: preserve evidence versus clarification distinction
This commit is contained in:
@@ -280,12 +280,12 @@ describe("formulateQuestion", () => {
|
||||
expect(result.pattern).toBe("comparison");
|
||||
});
|
||||
|
||||
it("constraint unknown uses evidence-gathering within the fixed strategy set", () => {
|
||||
it("user-owned constraint ambiguity produces a clarification question rather than an evidence request", () => {
|
||||
const unknown = makeNode({
|
||||
id: "n-constraint",
|
||||
label: "Budget constraint",
|
||||
label: "Whether avoiding additional risk is a hard constraint",
|
||||
description:
|
||||
"Need the main budget constraint because it limits the available options.",
|
||||
"Need to know whether avoiding additional risk is a hard constraint or a preference/trade-off.",
|
||||
kind: "unknown",
|
||||
status: "unknown",
|
||||
confidence: "medium",
|
||||
@@ -296,8 +296,33 @@ describe("formulateQuestion", () => {
|
||||
graph: makeGraphFor(unknown),
|
||||
});
|
||||
|
||||
expect(result.strategy).toBe("evidence_gathering");
|
||||
expect(result.strategy).toBeNull();
|
||||
expect(result.question).toBe(
|
||||
"Is avoiding additional risk a hard constraint or a preference/trade-off?",
|
||||
);
|
||||
});
|
||||
|
||||
it("evidence-resolvable competing-cause unknown stays on an evidence route rather than neutral clarification", () => {
|
||||
const unknown = makeNode({
|
||||
id: "n-delivery-cause",
|
||||
label: "Possible causes of the delivery delay",
|
||||
description:
|
||||
"Need to determine whether staff capacity or supplier lead times are responsible for the delivery delay.",
|
||||
kind: "unknown",
|
||||
status: "unknown",
|
||||
confidence: "medium",
|
||||
});
|
||||
|
||||
const result = formulateQuestion({
|
||||
node: unknown,
|
||||
graph: makeGraphFor(unknown, {
|
||||
centralStatement: "Delivery is delayed and the cause is still unknown.",
|
||||
}),
|
||||
});
|
||||
|
||||
expect(result.reasoningPattern).toBe("diagnosis");
|
||||
expect(result.question).toContain("What evidence");
|
||||
expect(result.question).not.toContain("What would clarify");
|
||||
});
|
||||
|
||||
it("the same unknown can produce different questions when paired with different strategies", () => {
|
||||
|
||||
Reference in New Issue
Block a user