arborist/aborist/qa
russell@unturf.com 8fb5148e8e
qa: positive-form prompts + source-role rank boost + smell-line floor
Three fixes that meaningfully improve claim_lattice_pointer behavior
on real queries.

1. Prompts in positive form. Hermes-3-8B (and instruction-tuned 8Bs
   in general) follow positive directives ("do X") much more
   reliably than negations ("don't do Y"). Rewrote the
   claim_lattice_system_prompt and claim_lattice_grounding_reminder
   in DEFAULT_POLICY and DEFAULT_QUERY_POLICY so every rule says
   what TO do — "Reference evidence by pointer ID", "Use only
   pointer IDs that appear in the EVIDENCE blocks", "Cite 1 or 2
   pointers per claim", "Stop when the evidence runs out — a short
   answer is the right answer when only short evidence exists",
   etc. The cite-count constraint (1-2 per claim) directly
   addresses the spray-anchor failure where Hermes attached every
   available pointer to one claim line ("where is florida"
   produced 1 claim with 33 cites pre-fix).

2. Source-role rank boost. _rerank() now ends with a new
   _rerank_by_source_role stage that classifies each hit's role
   (mutating h.source_role for downstream reuse) and rescales the
   score by SOURCE_ROLE_RANK_WEIGHTS — primary 2.0, secondary 0.7,
   noisy/sequel 0.3. The Florida defect: list-pages
   (List_of_State_Roads_in_Florida, List_of_places_in_Florida:S/C/B,
   Florida_locations_by_per_capita_income) all match
   _SECONDARY_TITLE_MARKERS for "list of" and now sort below the
   actual Florida article instead of dominating the top-8 by body
   density. Affects ranking for both quote and pointer modes; the
   earlier per-source budget weights stay (still primary gets 2x
   the cap), they just don't have to fight a sort order that put
   list-pages first.

3. Lazy-anchor smell line gates on n_verified >= 3. With one
   verified pair the ratio is trivially 1.00 ("1 of 1 verified
   pairs cite [E11]") which is vacuous. Below 3 pairs the metric
   has no comparison surface; suppress the warning in those cases.

Live results on the 'where is florida' query went 33/33 with
cite-spray to 1/1 with a single targeted citation; spotlight
now hits "...largest metropolitan area in the state as well as
the entire southeastern United States is the South Florida..."
instead of state-road-number tables. The JP-dinosaurs benchmark
went from 11/11 with all cites at [E1] (ratio 1.00) to 13/14
with cites distributed across [E8], [E9], [E13] (ratio 0.77),
spotlight finding film-specific spans like "the film's
Dilophosaurus stands about 1.2 meters (4 ft) tall."

442 tests still passing. All 7 production shards report 0 chain
breaks.
2026-04-29 21:42:35 -04:00
..
__init__.py multi-source corpus query: pose a question, the tree pulls related cached docs 2026-04-27 11:43:57 -04:00
client.py add Q&A layer: v9.8 providence_cache writes with Merkle-bound proofs 2026-04-27 08:01:23 -04:00
concepts.py concept overlay: synonym expansion + rivalry exclusion 2026-04-27 12:34:00 -04:00
dag.py qa: G0 claim-lattice-pointer answer mode — CTI quote-by-pointer 2026-04-29 21:19:19 -04:00
evidence.py qa: G0 claim-lattice-pointer answer mode — CTI quote-by-pointer 2026-04-29 21:19:19 -04:00
inspect.py qa: per-claim status taxonomy on verifier + repair-action plans on sidecar 2026-04-29 18:37:52 -04:00
keys.py qa: dedup-mode policy + JIT fidelity — agents pick fast-cache vs audit-grade 2026-04-29 16:36:39 -04:00
parse_claims.py qa: G0 claim-lattice-pointer answer mode — CTI quote-by-pointer 2026-04-29 21:19:19 -04:00
query.py qa: positive-form prompts + source-role rank boost + smell-line floor 2026-04-29 21:42:35 -04:00
repair.py qa: chain-segment failure localization + re-prompt repair tier 2026-04-29 19:27:33 -04:00
runner.py qa: positive-form prompts + source-role rank boost + smell-line floor 2026-04-29 21:42:35 -04:00
verify.py qa: lazy-anchor smell sidecar — surface when one pointer carries every claim 2026-04-29 21:28:28 -04:00