From 4f4ca5faa5599e58683be6962c4aaa6848842aa3 Mon Sep 17 00:00:00 2001 From: Aakash Kattelu Date: Thu, 6 Aug 2026 10:23:18 -0400 Subject: [PATCH] fix(deriver): update extraction examples (#985) * fix(deriver): stop extraction examples teaching fabricated inferences The EXAMPLES block in the minimal deriver prompt demonstrated two inferences that its own output schema forbids: - "I just had my 25th birthday last Saturday" -> "alice's birthday is June 21st". A vague relative reference cannot yield a specific date; this demonstrates inventing one. - "I took my dog for a walk in NYC" -> "alice lives in NYC". Visiting a place is not living there. A third example invited "+ general knowledge" inference to produce a deductive conclusion. The deriver has no channel for that output -- PromptRepresentation carries only `explicit`, described as "direct quotes or clear paraphrases only, no interpretation or inference", and deductive conclusions are produced by the Dreamer's DeductionSpecialist. Replace all three with examples that stay inside the schema's contract. The dog/NYC message is kept and shown extracting correctly, and a third example shows that "lives in NYC" is valid when actually stated, so the examples teach the boundary rather than just avoiding it. Closes #626 Co-Authored-By: Claude Opus 5 * fix(deriver): keep the stated duration in the NYC residence example The example dropped "six years" from "I've lived in NYC for six years", which contradicts the prompt's own rule to extract all observations and to contextualize each one. Emit both the residence fact and the duration. Keeping "alice lives in NYC" alongside it is deliberate: that output is the point of the example, contrasting with the preceding one where the same conclusion is *not* supported by a single visit. Co-Authored-By: Claude Opus 5 --------- Co-authored-by: Claude Opus 5 --- src/deriver/prompts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/deriver/prompts.py b/src/deriver/prompts.py index 402bcae7..a4811f1d 100644 --- a/src/deriver/prompts.py +++ b/src/deriver/prompts.py @@ -72,9 +72,9 @@ RULES: - Contextualize each observation sufficiently (e.g. "Ann is nervous about the job interview at the pharmacy" not just "Ann is nervous") EXAMPLES (using `alice` as the target peer id): -- EXPLICIT: "I just had my 25th birthday last Saturday" → "alice is 25 years old", "alice's birthday is June 21st" -- EXPLICIT: "I took my dog for a walk in NYC" → "alice has a dog", "alice lives in NYC" -- EXPLICIT: "alice attended college" + general knowledge → "alice completed high school or equivalent" +- EXPLICIT: "I just turned 25" → "alice is 25 years old" +- EXPLICIT: "I took my dog for a walk in NYC" → "alice has a dog", "alice walked her dog in NYC" +- EXPLICIT: "I've lived in NYC for six years" → "alice lives in NYC", "alice has lived in NYC for six years" {custom_instructions_section}