From 7ee9d73c729f3e56cd38e480911153e34cc2b323 Mon Sep 17 00:00:00 2001 From: Weksa Date: Tue, 10 Nov 2026 17:34:44 +0000 Subject: [PATCH] Encode prompt: a referent's concept is never null Both parse refusals in the original-corpus round (runs/orig-3) were a null referents[].concept; the prompt gave 'or null' to entity, setting, medium and addressee and never said concept could not be. One sentence, pinned by a test. Co-Authored-By: Claude Sonnet 5.5 --- crates/weksa/src/context.rs | 2 +- crates/weksa/tests/context.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/weksa/src/context.rs b/crates/weksa/src/context.rs index 5592e1e..1a648a0 100644 --- a/crates/weksa/src/context.rs +++ b/crates/weksa/src/context.rs @@ -59,7 +59,7 @@ Fields: - predications: a list of {id, concept, frame, roles, features}; roles is a list of {role, filler}, filler a node id. - relations: a list of {relation, from, to, features}. - stance: {features}; the speaker's felt affect and restraint, never the affect the line displays. -Node ids are n1, n2, and so on, one per referent and predication. Every other id comes from the inventory listed below and must be live at its revision. Write each id in full, exactly as the inventory lines spell it, family prefix included: concept:7, never 7. An entity comes only from the entities line. +Node ids are n1, n2, and so on, one per referent and predication. Every other id comes from the inventory listed below and must be live at its revision. Write each id in full, exactly as the inventory lines spell it, family prefix included: concept:7, never 7. An entity comes only from the entities line. A referent's concept is never null, even when it carries an entity: give the nearest concept id. A feature is {feature, value}; value is {\"Grade\": 0 to 1000}, {\"Option\": label} or {\"Flag\": true or false}, as the inventory lists the feature's kind."; /// The instructions a lowering prompt starts with: the lowerer's whole brief. diff --git a/crates/weksa/tests/context.rs b/crates/weksa/tests/context.rs index c379f0e..d6e2efe 100644 --- a/crates/weksa/tests/context.rs +++ b/crates/weksa/tests/context.rs @@ -694,6 +694,7 @@ mod lowering { #[test] fn the_encode_prompt_states_the_id_form_the_inventory_lines_use() { assert!(ENCODE.contains("family prefix included: concept:7, never 7")); + assert!(ENCODE.contains("A referent's concept is never null, even when it carries an entity: give the nearest concept id.")); let w = world(); let run = run_over(w.dir.path()); let inv = run.inventory().inventory().unwrap();