Repository navigation
LastLight 0.2.2
LastLight 0.2.2
LastLight 0.2.2 introduces an evidence-aware refusal and answer-calibration policy, independently of lastlight-bench. Search ranking remains unchanged; acceptance becomes a separate, auditable step.
Changes
- Separates document relevance, passage evidence sufficiency, answer confidence, and the final accept/refuse decision.
- Adds strategy-specific
lexicalandbm25calibration withbalancedandconservativeprofiles. BM25 scores and lexical scores are never numerically combined. Score margin alone or retrieval confidenceHIGHnever authorizes an answer. - Computes query coverage using original query terms, corpus document frequencies (IDF-like weights), negations, constraints, entities and discriminative terms. Matches in selected passages matter separately from document-level terms.
- Requires type-compatible local passage evidence for quantities, time, identity, prohibitions and enumerations. Prefer substantive passages over Markdown headings and citation-only snippets.
- Conservatively refuses unverifiable live/current/future states and private, credential, certification and clinical-authority questions.
- In
adaptive, retains resource-driven backend selection and optionally uses lexical top-1 identity agreement to flag uncertainty when BM25 is primary, without score fusion. - Exposes
LastLight(knowledge, strategy="bm25", decision_profile="conservative"), detaileddecisiontelemetry, and retrieval metadata separating the requested backend, selected backend, and decision profile. - Adds a fully synthetic, isolated internal calibration cohort and explicit threshold documentation in
docs/decision_calibration.md.
Compatibility and limitations
search() continues to expose the same retrieval results and ranking score semantics. The default decision_profile="balanced" preserves the supported public API, but some formerly accepted results may now return refusals when evidence is insufficient. The policy is deterministic and standard-library-only, not probabilistic entailment or proof of factual correctness.
Calibration tests are not a substitute for untouched final evaluation. This release does not claim a measured improvement on lastlight-bench; validate false-acceptance rate, answerable recall and top-1 retrieval separately using independent held-out data.
Validation
The core GitHub Actions matrix exercises Python 3.10, 3.11 and 3.12, packaged wheel/sdist builds, and installed-library smoke checks, plus the isolated synthetic calibration tests. No modifications to lastlight-bench.