diff --git a/benchmarks/locomo/README.md b/benchmarks/locomo/README.md index 847802e82..4bc542f83 100644 --- a/benchmarks/locomo/README.md +++ b/benchmarks/locomo/README.md @@ -1,4 +1,4 @@ -# RS-LoCoMo-Full-v39 setup +# RS-LoCoMo-Full-v40 setup One current execution profile uses Luna 6 for ingestion and vision at low reasoning, Luna 6 for answering and judging at high reasoning, and Jev @@ -23,16 +23,28 @@ The safe first command is local and makes no API or model call: uv run --extra benchmark python -m benchmarks.locomo prepare \ --dataset /absolute/path/locomo10.json \ --tier smoke \ - --protocol full-v39 \ + --protocol full-v40 \ --output .benchmark-runs/locomo-smoke ``` The harness validates the pinned bytes, renders session documents, and fingerprints the -eight-question smoke plan. `--protocol` is prepare-only; `full-v39` is the one +eight-question smoke plan. `--protocol` is prepare-only; `full-v40` is the one current-system protocol, and every later stage reads that immutable choice from `run.json`. Do not run remote stages until reviewing [`locomo_benchmark_design.md`](../../plan/designs/locomo_benchmark_design.md). +Full-v40 asks the answerer to give its best-supported answer to every scored +question, including a qualified inference when evidence is indirect. It forbids +terminal abstentions such as `Unknown`; uncertainty belongs in `likely` or +`possibly` attached to an actual answer. The prompt still forbids invented source +details, preserves entity/time constraints, and exposes no reference answers. +This is benchmark answer-agent policy, not a change to engine evidence or typed +negatives. The existing judge, models, retrieval depths, and call/cost guards are +unchanged. Noncompliant model outputs and infrastructure failures remain visible; +the harness never fabricates an answer to replace them. Prepare a new run for +this protocol; preserve old answers and fingerprints. This prompt change adds +no cross-revision ingestion-adoption command or compatibility contract. + V17 must ingest into a fresh store built from the repository revision recorded in `run.json`. Store backups protect interrupted work and allow restoration of that exact run; they are not a license to carry ingestion across a changed @@ -180,7 +192,7 @@ from readiness. ## Retrieval-access ablations (development only) -The additive D124 runner reuses one completely processed Full-v39 sample and +The additive D124 runner reuses one completely processed Full-v40 sample and compares four answer routes without re-ingesting it: | Profile | Answer runtime | Available evidence | @@ -251,7 +263,7 @@ Codex home merely to hide those schemas. Only compare `codex-p3` with `codex-p3-mcp`, and `mcp` with `mcp-p3`, as causal access changes. Cross-runtime scores are directional because native Codex has its own agent loop and shell semantics. A Codex result with `audit_status` -`pending` or `invalid` is not comparable. The canonical Full-v39 protocol and +`pending` or `invalid` is not comparable. The canonical Full-v40 protocol and its source state are never modified by this command. ## Sharded runs diff --git a/benchmarks/locomo/__init__.py b/benchmarks/locomo/__init__.py index ffbeff001..6c989d219 100644 --- a/benchmarks/locomo/__init__.py +++ b/benchmarks/locomo/__init__.py @@ -1 +1 @@ -"""The pinned RS-LoCoMo-Full-v38 benchmark adapter.""" +"""The pinned full-system LoCoMo benchmark adapter.""" diff --git a/benchmarks/locomo/cli.py b/benchmarks/locomo/cli.py index 968231c16..6716439f1 100644 --- a/benchmarks/locomo/cli.py +++ b/benchmarks/locomo/cli.py @@ -15,6 +15,7 @@ from benchmarks.locomo.ablation import run_retrieval_ablation from benchmarks.locomo.protocol import API_TIMEOUT_SECONDS from benchmarks.locomo.protocol import DEFAULT_PROTOCOL_KEY +from benchmarks.locomo.protocol import PROTOCOL_NAME from benchmarks.locomo.protocol import PROTOCOL_REGISTRY from benchmarks.locomo.retrieval import RetrievalInfrastructureError from benchmarks.locomo.runner import answer_sample @@ -232,7 +233,7 @@ def _parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser( prog="python -m benchmarks.locomo", description=( - "RS-LoCoMo-Full-v38: prepare is local; ingest/answer/judge require " + f"{PROTOCOL_NAME}: prepare is local; ingest/answer/judge require " "explicit execution acknowledgements" ), ) diff --git a/benchmarks/locomo/model.py b/benchmarks/locomo/model.py index 4cf1534e8..6b2092f35 100644 --- a/benchmarks/locomo/model.py +++ b/benchmarks/locomo/model.py @@ -1,4 +1,4 @@ -"""Typed values for the full-system RS-LoCoMo-Full-v38 protocol.""" +"""Typed values for the full-system LoCoMo protocol and historical artifacts.""" from __future__ import annotations @@ -33,7 +33,7 @@ Category = Literal[1, 2, 3, 4, 5] RetainedCategory = Literal[1, 2, 3, 4] Tier = Literal["smoke", "development", "publication"] -ProtocolKey = Literal["full-v39"] +ProtocolKey = Literal["full-v40"] ProtocolName = NonEmpty SourceTimezoneBasis = Literal["assumed_utc"] AnswerAgentModel = NonEmpty @@ -135,7 +135,7 @@ class ExecutionProfile(FrozenModel): class RunConfiguration(FrozenModel): """Immutable identity of one prepared benchmark run.""" - protocol_name: ProtocolName = "RS-LoCoMo-Full-v39" + protocol_name: ProtocolName = "RS-LoCoMo-Full-v40" adapter_version: NonEmpty prepared_at: datetime repository_revision: NonEmpty @@ -490,7 +490,7 @@ class SessionDiagnosticSummary(FrozenModel): class RunSummary(FrozenModel): """Publication-ready local aggregate with no hidden denominator.""" - protocol_name: ProtocolName = "RS-LoCoMo-Full-v39" + protocol_name: ProtocolName = "RS-LoCoMo-Full-v40" protocol_fingerprint: NonEmpty tier: Tier questions: int = Field(ge=1) diff --git a/benchmarks/locomo/protocol.py b/benchmarks/locomo/protocol.py index 3b58877b7..1e1fbfe1c 100644 --- a/benchmarks/locomo/protocol.py +++ b/benchmarks/locomo/protocol.py @@ -34,10 +34,10 @@ from rememberstack.model import ReasoningEffort from rememberstack.model import ToolDescriptor -PROTOCOL_NAME: Final = "RS-LoCoMo-Full-v39" -DEFAULT_PROTOCOL_KEY: Final = "full-v39" -ADAPTER_VERSION: Final = "locomo-full-adapter-2026.10-configurable-retrieval-v39" -"""Current Full-v39 evaluation identity, with explicit Luna/Flex and Jev roles.""" +PROTOCOL_NAME: Final = "RS-LoCoMo-Full-v40" +DEFAULT_PROTOCOL_KEY: Final = "full-v40" +ADAPTER_VERSION: Final = "locomo-full-adapter-2026.10-best-supported-answer-v40" +"""Current Full-v40 identity: best-supported answers, Luna/Flex, and Jev roles.""" MAX_TOOL_CALLS: Final = 8 MAX_AGENT_CALLS: Final = 9 ANSWER_READER_RETRY_BUDGET: Final = 2 @@ -251,12 +251,26 @@ General knowledge may help interpret retrieved evidence, but RememberStack evidence is the authority for conversation-specific claims. Never seek or inspect benchmark reference solutions, reference evidence labels, or evaluator artifacts. You have a budget -of at most 8 tool calls per question. Before concluding that the deployment does not contain -the answer, consult claims_and_sources_context unless you have already queried it or -combined_context, or have exhausted your tool call budget. If after checking fact and source -layers the deployment genuinely does not contain the answer, finish with "Unknown". The final -answer must be the shortest phrase that fully names the requested entities/values, no explanations -or reasoning.{answer_word_cap_instruction} +of at most 8 tool calls per question. Before settling on an answer from sparse evidence, +consult claims_and_sources_context unless you have already queried it or +combined_context, or have exhausted your tool call budget. + +Answer policy for this evaluation: +- Give your best-supported answer to every question. Never finish with "Unknown", + "not mentioned", "cannot determine", or another abstention in place of an answer. +- Prefer direct statements, then clear conversational implications, then the most + plausible inference consistent with the retrieved clues and ordinary general knowledge. + A question asking what is likely, suspected, possible, or implied calls for inference; + do not require an explicit statement of the conclusion in the conversation. +- Weigh all relevant clues together. If evidence is incomplete or competing interpretations + remain, choose the best-supported interpretation and qualify the answer with "likely" + or "possibly". Uncertainty should qualify the answer, not replace it. +- Do not invent supporting events, quotes, personal details, or certainty. Preserve the + question's entity and time constraints; a clue from another date is not proof of the + requested state. General knowledge may connect clues, but must not override source details. + +The final answer must be the shortest phrase that fully names the requested entities/values, +no explanations or reasoning.{answer_word_cap_instruction} When a named person, organization, place, or other entity can narrow retrieval, resolve it with resolve_entity first. Use returned entity IDs to make follow-up @@ -269,8 +283,8 @@ would still happen without a condition and the evidence says that condition caused, enabled, or motivated the outcome, answer "Likely no". If the evidence indicates that the outcome is independent of the condition, answer "Likely -yes". Use "Unknown" only when the evidence gives no direction about that -dependency. +yes". When that dependency is uncertain, select the better-supported outcome +and qualify it as likely or possible rather than abstaining. When a question asks about a superlative (e.g. what someone enjoys "most", "best", or considers their "favorite" or "primary" choice), identify the specific option diff --git a/benchmarks/locomo/runner.py b/benchmarks/locomo/runner.py index 6156759a6..2e7e1add9 100644 --- a/benchmarks/locomo/runner.py +++ b/benchmarks/locomo/runner.py @@ -1274,7 +1274,7 @@ def _validate_run( ) -> None: """Recompute immutable run identity before any local or remote stage.""" if configuration.dataset_sha256 != DATASET_SHA256: - raise BenchmarkRunError("run dataset hash is not RS-LoCoMo-Full-v38") + raise BenchmarkRunError(f"run dataset hash is not {PROTOCOL_NAME}") if item_ids_hash(item_ids=manifest.item_ids) != manifest.item_ids_sha256: raise BenchmarkRunError("run manifest item hash changed") if manifest_bytes_hash(manifest=manifest) != configuration.manifest_sha256: @@ -1284,7 +1284,7 @@ def _validate_run( if manifest.tier != configuration.tier: raise BenchmarkRunError("run manifest tier changed") if configuration.dataset_commit != DATASET_COMMIT: - raise BenchmarkRunError("run dataset commit is not RS-LoCoMo-Full-v38") + raise BenchmarkRunError(f"run dataset commit is not {PROTOCOL_NAME}") if current_pins and configuration.adapter_version != ADAPTER_VERSION: raise BenchmarkRunError("run adapter version differs from current code") if _models_hash(values=documents) != configuration.documents_sha256: diff --git a/benchmarks/locomo/sharding/README.md b/benchmarks/locomo/sharding/README.md index b1710ed3c..641a453cc 100644 --- a/benchmarks/locomo/sharding/README.md +++ b/benchmarks/locomo/sharding/README.md @@ -178,7 +178,7 @@ as source-derived data. | --- | ---: | --- | | `LOCOMO_PYTHON` | `.venv/bin/python` | repository virtual-environment Python | | `LOCOMO_TIER` | `publication` | prepared manifest tier | -| `LOCOMO_PROTOCOL` | `full-v39` | prepare-time protocol key | +| `LOCOMO_PROTOCOL` | `full-v40` | prepare-time protocol key | | `LOCOMO_MOUNT_ROOT` | `$RUN_DIR/.mounts` | host/container-identical P3 mount root | | `LOCOMO_MAX_DOCUMENTS` | `100` | per-sample ingest authorization | | `LOCOMO_MAX_QUESTIONS` | `1540` | run-absolute answer item authorization | diff --git a/benchmarks/locomo/sharding/run_shard.sh b/benchmarks/locomo/sharding/run_shard.sh index a829740a4..d5d9589e6 100755 --- a/benchmarks/locomo/sharding/run_shard.sh +++ b/benchmarks/locomo/sharding/run_shard.sh @@ -25,7 +25,7 @@ run_dir=$2 dataset_path=$3 python_bin=${LOCOMO_PYTHON:-.venv/bin/python} tier=${LOCOMO_TIER:-publication} -protocol=${LOCOMO_PROTOCOL:-full-v39} +protocol=${LOCOMO_PROTOCOL:-full-v40} mount_root=${LOCOMO_MOUNT_ROOT:-$run_dir/.mounts} max_documents=${LOCOMO_MAX_DOCUMENTS:-100} max_questions=${LOCOMO_MAX_QUESTIONS:-1540} diff --git a/decisions.md b/decisions.md index 26fd7fc0a..506e88e93 100644 --- a/decisions.md +++ b/decisions.md @@ -3074,7 +3074,13 @@ may proceed to its first tagged artifact proof after CLA activation. ## D78. LoCoMo measures the ordinary OSS query system, not a claims-only shortcut -> **D106 amendment.** The current protocol is `RS-LoCoMo-Full-v21`. It retains +> **Current protocol amendment, 2026-11-09.** Execution uses only +> `RS-LoCoMo-Full-v40` (`full-v40`): the Luna/Flex and Jev profile with the +> best-supported-answer policy recorded in the D104 amendment below. Its +> unchanged judge still scores noncompliant abstentions wrong. See the +> [current benchmark design](plan/designs/locomo_benchmark_design.md). + +> **Historical D106 amendment.** The D106 protocol was `RS-LoCoMo-Full-v21`. It retains > v20's dataset, rendered documents, models, tools, budgets, prompts, and > scoring and pins the D106 observation adjudicator generation. @@ -5085,6 +5091,20 @@ is unchanged. Does not change D95, D99, or D100. ## D104. Counterfactual answers may follow retrieved causal evidence +**Partial supersession, owner amendment 2026-11-09.** Full-v40 replaces this +entry's `Unknown` fallback and blanket prohibition on outside knowledge with +best-supported answers: direct source statements, then conversational +implications, then plausible contextual inference using ordinary general +knowledge. Incomplete evidence calls for `likely` or `possibly` attached to an +actual answer, not abstention. Source/entity/date fidelity and the prohibition +on invented supporting details remain binding. Causal reasoning, prompt-only +execution, unchanged judge/budgets, no category/item hints, and D99's objective +content-before-answer guard survive. This amendment changes no engine or +ingestion reuse identity. Rationale: +[answer-policy analysis](plan/analysis/locomo_best_supported_answers_20261109.md); +current contract: [benchmark design §7](plan/designs/locomo_benchmark_design.md#7-answer-loop). +The original decision below is historical where these clauses are replaced. + **Decision (2026-09-01).** Advance the current benchmark protocol to `RS-LoCoMo-Full-v19`. Its answer prompt explicitly permits hypothetical and counterfactual answers inferred from causal or motivational relationships in @@ -6274,8 +6294,8 @@ R14 autopsy (`/root/r14/r14-autopsy.md` on the experiment host). ## D128. GLM ingest variant of the v38 LoCoMo protocol -**Execution selection superseded, 2026-10-23:** current LoCoMo execution uses -one `full-v39` profile. The historical GLM benchmark branch is removed; its saved +**Execution selection superseded, updated 2026-11-09:** current LoCoMo execution uses +one `full-v40` profile. The historical GLM benchmark branch is removed; its saved artifacts remain read-only. The general D127 provider-rotation contract survives. See [current benchmark design](plan/designs/locomo_benchmark_design.md). diff --git a/plan/analysis/locomo_best_supported_answers_20261109.md b/plan/analysis/locomo_best_supported_answers_20261109.md new file mode 100644 index 000000000..e0c833874 --- /dev/null +++ b/plan/analysis/locomo_best_supported_answers_20261109.md @@ -0,0 +1,48 @@ +# Best-supported answers in the LoCoMo evaluator + +Owner-authorized evaluation policy, 2026-11-09. This analysis motivates the +current answer-loop contract in +[`locomo_benchmark_design.md` §7](../designs/locomo_benchmark_design.md). + +The pinned dataset has 1,986 questions: 1,540 in scored categories 1–4 and 446 +in excluded adversarial category 5. A scan of the actual pinned JSON on +2026-11-09 found no missing answer in categories 1–4 and no gold containing +`Unknown`, `unanswerable`, `not mentioned`, `not specified`, `cannot be determined`, +or `not enough information`. Category 5 has 444 records without an `answer` +field and is not evidence about the scored answer policy. The pin is recorded +in the benchmark design §2; execution still validates its bytes. + +The previous prompt explicitly permitted `Unknown`, although the unchanged +judge counts it wrong. In the retained conv-47 run all three misses were +abstentions even though the cited source chunks reached the reader; see +the diagnostic analysis in PR #561. Two questions expect uncertain commonsense +inferences. Another has a question/reference date conflict. Removing abstention +does not make those inferences certain or resolve an annotation conflict. + +Alternatives are to retain conservative abstention, change the judge, add +question-specific hints, or ask for the most plausible supported answer with +an uncertainty qualifier. The owner selected the last policy. Full-v40 orders +support as direct statement, conversational implication, then contextual +commonsense inference. It asks for an actual answer even when evidence is +incomplete, and forbids invented supporting details or silently replacing a +question's date. There are no named benchmark people, places, conditions, gold +answers, or reference turn IDs in the prompt. The judge, dataset, models, +retrieval pool, and tool/cost limits stay unchanged. + +This can trade abstentions for incorrect guesses. Qualifiers communicate +uncertainty but are not proof. Prompt compliance is not guaranteed by schema: +the existing harness records noncompliant answers and failures honestly and +does not synthesize replacements. No new private retries or model calls are +introduced; cost remains within existing ceilings. Engine typed negatives, +claim/fact semantics, ingestion identities, and source visibility are unaffected. + +Validation uses a fresh 20-question conv-47 evaluation, with original results +preserved. This PR adds no native ingestion-adoption feature or provenance +field; the canonical run contract remains the benchmark design §9. The owner's +later request to verify pipeline changes also requires resolving whether this +operational test should ingest afresh, rather than treating retained ingestion +as proof of the changed pipeline. The execution mode, exact merged revision, +new prompt identity, answers, grades, traces, and verified GCS receipts belong +in the operational runbook. Repeating this development conversation is not +evidence of held-out generalization or a full-benchmark result. No score is +claimed here before execution. diff --git a/plan/designs/locomo_benchmark_design.md b/plan/designs/locomo_benchmark_design.md index d1425f7ed..d083265cc 100644 --- a/plan/designs/locomo_benchmark_design.md +++ b/plan/designs/locomo_benchmark_design.md @@ -1,8 +1,9 @@ # LoCoMo full-system benchmark design -Current owner-requested contract, 2026-10-23; delivery and review are tracked in -PR #514. Acceptance of a design does not establish a runtime result. See +Current owner-requested contract, updated 2026-11-09 for best-supported answers; +the model-profile delivery was tracked in PR #514. Acceptance of a design does not establish a runtime result. See [implementation analysis](../analysis/locomo-models-and-independent-judging-20261023.md) +and [answer-policy analysis](../analysis/locomo_best_supported_answers_20261109.md) and [superseded protocol history](../analysis/locomo-protocol-history-through-v38.md). ## 1. Acceptance boundary @@ -29,7 +30,7 @@ and spend ceiling. ## 2. Fixed protocol ```text -protocol RS-LoCoMo-Full-v39 (full-v39) +protocol RS-LoCoMo-Full-v40 (full-v40) dataset commit 3eb6f2c585f5e1699204e3c3bdf7adc5c28cb376 dataset SHA-256 79fa87e90f04081343b8c8debecb80a9a6842b76a7aa537dc9fdf651ea698ff4 categories 1, 2, 3, 4 @@ -45,7 +46,7 @@ max agent calls/question 9 invalid-completion retry 2 additional attempts within the 9-call cap answer word cap off judge repetitions 1 -API transport budget 180 seconds +API transport budget 300 seconds primary metric judge accuracy secondary metric official LoCoMo F1 ``` @@ -455,21 +456,32 @@ fields and respect grain, validity, freshness, typed negatives, and hydration drops. It receives no gold answer, evidence IDs, or summaries and must not seek gold or evaluator artifacts through another channel. -Loop guards in the frozen answer prompt (v20): never repeat a tool call with the +Loop guards in the frozen answer prompt: never repeat a tool call with the same tool and the same arguments; if a tool yields nothing useful, switch tools rather than retrying it; and try at least one content-bearing retrieval path -before answering "Unknown". The first two remain prompt discipline. D99 makes +before any final answer. The first two remain prompt discipline. D99 makes only the content-before-`Unknown` rule a harness guard as specified above; the harness does not try to judge whether evidence was subjectively “useful.” -For hypothetical and counterfactual questions, the frozen v20 prompt also -requires the agent to reason only from causal or motivational relationships in -the retrieved trace. The source need not state the hypothetical verbatim. A -condition that caused, enabled, or motivated the questioned outcome supports -the corresponding `Likely yes`/`Likely no` answer; `Unknown` remains correct -when the evidence gives no direction. This is prompt discipline only: the -harness does not infer question type or inspect evidence semantics, so it adds -no hidden retry or category-specific execution path. +Full-v40 requires the best-supported answer to each scored question, including +an inference when the conclusion is not stated verbatim. Prefer direct statements, +then clear conversational implications, then the most plausible interpretation +of retrieved clues using ordinary general knowledge. For incomplete or competing +evidence, qualify an actual answer with `likely` or `possibly`; do not replace it +with `Unknown`, `not mentioned`, `cannot determine`, or equivalent abstention. +This does not authorize invented source details, certainty, or substitution of +another entity or date. Source evidence remains authoritative about what happened. + +Hypothetical and counterfactual questions follow the same policy: reason from +causal or motivational relationships, select the better-supported outcome, and +qualify uncertainty. These are prompt instructions. The existing harness does +not classify inferred question types, repair an abstention after content retrieval, +or manufacture answers. A noncompliant answer or infrastructure failure remains +visible under the unchanged judge and budgets. There is no hidden retry or +category-specific execution path. Engine negatives and ingestion semantics do +not change. Changed prompt bytes require a new evaluation identity. This +prompt-policy change does not add cross-revision ingestion adoption; §9 remains +the canonical run contract. The frozen v20 prompt additionally requires complete direct-value coverage: when several retrieved values each satisfy the requested action or @@ -498,11 +510,11 @@ Local preparation: uv run --extra benchmark python -m benchmarks.locomo prepare \ --dataset /absolute/path/locomo10.json \ --tier smoke \ - --protocol full-v39 \ + --protocol full-v40 \ --output .benchmark-runs/locomo-smoke ``` -`--protocol` exists only on `prepare`. Execution uses `full-v39`; later stages +`--protocol` exists only on `prepare`. Execution uses `full-v40`; later stages read the immutable current choice from the saved run. Historical protocols are read-only and cannot be selected as an execution fallback. diff --git a/src/tests/benchmarks/test_locomo_luna6_profile.py b/src/tests/benchmarks/test_locomo_luna6_profile.py index 88dd61bf7..81e03481b 100644 --- a/src/tests/benchmarks/test_locomo_luna6_profile.py +++ b/src/tests/benchmarks/test_locomo_luna6_profile.py @@ -17,7 +17,7 @@ def test_luna_profile_matches_composed_models_and_versions( monkeypatch: pytest.MonkeyPatch, ) -> None: """The profile must describe executable bindings, including Jev, rather than labels.""" - protocol = PROTOCOL_REGISTRY["full-v39"] + protocol = PROTOCOL_REGISTRY["full-v40"] profile = protocol.execution_profile assert profile is not None for name, value in profile.ingest_environment.items(): @@ -53,7 +53,7 @@ def test_luna_profile_matches_composed_models_and_versions( assert protocol.judge_reasoning_effort == "high" assert ( protocol.judge_prompt_template - == PROTOCOL_REGISTRY["full-v39"].judge_prompt_template + == PROTOCOL_REGISTRY["full-v40"].judge_prompt_template ) @@ -63,7 +63,7 @@ def test_backup_preserves_jev_engine_and_flex_instead_of_dormant_prompt_slot( """A new-profile runtime replay must retain adjudication engine and routing.""" import json - profile = PROTOCOL_REGISTRY["full-v39"].execution_profile + profile = PROTOCOL_REGISTRY["full-v40"].execution_profile assert profile is not None (tmp_path / "run.json").write_text( json.dumps({"execution_profile": profile.model_dump(mode="json")}) diff --git a/src/tests/benchmarks/test_locomo_protocol.py b/src/tests/benchmarks/test_locomo_protocol.py index a4abfd265..819539c3f 100644 --- a/src/tests/benchmarks/test_locomo_protocol.py +++ b/src/tests/benchmarks/test_locomo_protocol.py @@ -4,6 +4,7 @@ from datetime import datetime from datetime import timezone from pathlib import Path +from typing import cast from uuid import uuid4 from benchmarks.locomo import cli @@ -13,6 +14,7 @@ from benchmarks.locomo.model import LoCoMoSample from benchmarks.locomo.model import LoCoMoSession from benchmarks.locomo.model import LoCoMoTurn +from benchmarks.locomo.model import ProtocolKey from benchmarks.locomo.model import RunConfiguration from benchmarks.locomo.model import ToolCallRecord from benchmarks.locomo.protocol import ANSWER_AGENT_PROMPT_TEMPLATE @@ -22,6 +24,8 @@ from benchmarks.locomo.protocol import EXPECTED_PROMPT_RENDERER_VERSION from benchmarks.locomo.protocol import EXPECTED_SURFACE_MANIFEST_HASH from benchmarks.locomo.protocol import official_f1 +from benchmarks.locomo.protocol import protocol_for_key +from benchmarks.locomo.protocol import protocol_for_name from benchmarks.locomo.protocol import PROTOCOL_NAME from benchmarks.locomo.protocol import PROTOCOL_REGISTRY from benchmarks.locomo.protocol import render_answer_agent_prompt @@ -339,10 +343,10 @@ def test_current_protocol_pins_manifest_and_complete_read_plane() -> None: assert len(tool_catalog_sha256()) == 64 -def test_protocol_is_v38_and_answer_prompt_has_reasoning_and_loop_guards() -> None: +def test_current_protocol_answer_prompt_has_reasoning_and_loop_guards() -> None: """The current identity, bounded inference, and loop discipline are locked.""" - assert PROTOCOL_NAME == "RS-LoCoMo-Full-v39" - assert DEFAULT_PROTOCOL_KEY == "full-v39" + assert PROTOCOL_NAME == "RS-LoCoMo-Full-v40" + assert DEFAULT_PROTOCOL_KEY == "full-v40" prompt = ANSWER_AGENT_PROMPT_TEMPLATE normalized_prompt = " ".join(prompt.split()) assert ( @@ -368,7 +372,9 @@ def test_protocol_is_v38_and_answer_prompt_has_reasoning_and_loop_guards() -> No assert "caused, enabled, or motivated the outcome" in normalized_prompt assert 'answer "Likely no"' in normalized_prompt assert 'answer "Likely yes"' in normalized_prompt - assert "evidence gives no direction about that dependency" in normalized_prompt + assert ( + "qualify it as likely or possible rather than abstaining" in normalized_prompt + ) assert "multiple distinct values that directly satisfy the question" in ( normalized_prompt ) @@ -424,6 +430,21 @@ def test_protocol_is_v38_and_answer_prompt_has_reasoning_and_loop_guards() -> No ) assert 'time={"mode": "at", "at": ""}' in rendered assert "all_sources" not in prompt + assert 'Never finish with "Unknown", "not mentioned", "cannot determine"' in ( + normalized_prompt + ) + assert 'finish with "Unknown".' not in normalized_prompt + assert 'Use "Unknown" only when' not in normalized_prompt + assert ( + "Prefer direct statements, then clear conversational implications, then the most plausible inference" + in normalized_prompt + ) + assert 'qualify the answer with "likely" or "possibly"' in normalized_prompt + assert ( + "Do not invent supporting events, quotes, personal details, or certainty" + in normalized_prompt + ) + assert "Preserve the question's entity and time constraints" in normalized_prompt def test_answer_agent_prompt_temporal_and_attribute_discipline_rules() -> None: @@ -459,10 +480,10 @@ def test_answer_agent_prompt_temporal_and_attribute_discipline_rules() -> None: def test_typed_protocol_registry_pins_answer_agent_identity_and_effort() -> None: - assert tuple(PROTOCOL_REGISTRY) == ("full-v39",) - protocol = PROTOCOL_REGISTRY["full-v39"] + assert tuple(PROTOCOL_REGISTRY) == ("full-v40",) + protocol = PROTOCOL_REGISTRY["full-v40"] - assert protocol.name == "RS-LoCoMo-Full-v39" + assert protocol.name == "RS-LoCoMo-Full-v40" assert protocol.answer_agent_model == "openai/gpt-6-luna" assert protocol.answer_agent_reasoning_effort == "high" assert protocol.judge_reasoning_effort == "high" @@ -470,6 +491,11 @@ def test_typed_protocol_registry_pins_answer_agent_identity_and_effort() -> None assert protocol.answer_word_cap is None assert protocol.surface_manifest_hash == EXPECTED_SURFACE_MANIFEST_HASH assert protocol.tool_catalog_sha256 == tool_catalog_sha256() + for retired_key in ("full-v38", "full-v39"): + with pytest.raises(ValueError, match="retired or unknown protocol"): + protocol_for_key(cast(ProtocolKey, retired_key)) + with pytest.raises(ValueError, match="historical protocol.*read-only"): + protocol_for_name("RS-LoCoMo-Full-v39") def test_prepare_cli_selects_protocol_only_at_prepare( @@ -500,7 +526,7 @@ def fake_prepare_run(**values: object) -> _Prepared: ) assert exit_code == 0 - assert selected == ["full-v39"] + assert selected == ["full-v40"] def test_summarize_cli_accepts_multiple_run_flags( @@ -675,7 +701,7 @@ def test_cli_keeps_plain_openrouter_for_the_default_protocol( monkeypatch: pytest.MonkeyPatch, tmp_path: Path ) -> None: """No Vertex settings are required, or even read, for an OpenRouter-only run.""" - _write_run_json(run_dir=tmp_path, protocol_key="full-v39") + _write_run_json(run_dir=tmp_path, protocol_key="full-v40") monkeypatch.setenv("REMEMBERSTACK_OPENROUTER_API_KEY", "test-key") monkeypatch.delenv("REMEMBERSTACK_VERTEX_PROJECT_ID", raising=False) diff --git a/src/tests/benchmarks/test_locomo_runner.py b/src/tests/benchmarks/test_locomo_runner.py index b42984461..b91633830 100644 --- a/src/tests/benchmarks/test_locomo_runner.py +++ b/src/tests/benchmarks/test_locomo_runner.py @@ -1125,7 +1125,7 @@ def test_answer_persists_usage_when_provider_drifts_after_tool_call() -> None: "invalid_first_step_completions", "invalid_reader_completions", ), - (("full-v39", "openai/gpt-6-luna", "openai/gpt-6-luna", "high", 0.0, 0, 2),), + (("full-v40", "openai/gpt-6-luna", "openai/gpt-6-luna", "high", 0.0, 0, 2),), ) def test_staged_mock_run_uses_prepared_protocol_and_resumes( protocol: ProtocolKey, @@ -2008,7 +2008,7 @@ def test_single_run_summary_json_is_unchanged( serialized = summarize_run(run_dir=run_dir).model_dump_json() assert serialized == ( - '{"protocol_name":"RS-LoCoMo-Full-v39","protocol_fingerprint":' + '{"protocol_name":"RS-LoCoMo-Full-v40","protocol_fingerprint":' f'"{prepared.protocol_fingerprint}",' '"tier":"smoke","questions":1,"judge_correct":0,"judge_percent":0.0,' '"official_f1":0.0,"categories":[{"category":1,"questions":0,' @@ -2228,7 +2228,7 @@ def test_prepared_protocol_pins_current_surface_and_luna( dataset_path=tmp_path / "synthetic.json", tier="smoke", output=run_dir ) - assert prepared.protocol_name == "RS-LoCoMo-Full-v39" + assert prepared.protocol_name == "RS-LoCoMo-Full-v40" assert prepared.answer_agent_model == "openai/gpt-6-luna" assert prepared.answer_agent_reasoning_effort == "high" assert prepared.answer_reader_retry_budget == 2 @@ -3546,7 +3546,7 @@ def test_preflight_reports_a_vertex_access_failure_as_unusable() -> None: def test_run_protocol_resolves_the_prepared_variant(tmp_path: Path) -> None: """The CLI composes providers from the frozen choice, not from ambient env.""" - protocol = PROTOCOL_REGISTRY["full-v39"] + protocol = PROTOCOL_REGISTRY["full-v40"] configuration = RunConfiguration( protocol_name=protocol.name, adapter_version="synthetic", @@ -3707,8 +3707,15 @@ def choose_small_pool(prompt: str, type_name: str) -> dict[str, object]: assert requests[0] == {"query": "Where?", "k": 50, "candidate_k": 200} +@pytest.mark.parametrize( + ("historical_name", "keep_profile"), + (("RS-LoCoMo-Full-v38", False), ("RS-LoCoMo-Full-v39", True)), +) def test_historical_protocol_is_read_only_without_an_executable_definition( - tmp_path: Path, monkeypatch: pytest.MonkeyPatch + tmp_path: Path, + monkeypatch: pytest.MonkeyPatch, + historical_name: str, + keep_profile: bool, ) -> None: """Inspect old recorded identities without retaining their execution branches.""" _patch_prepared_inputs(monkeypatch=monkeypatch) @@ -3716,15 +3723,17 @@ def test_historical_protocol_is_read_only_without_an_executable_definition( prepare_run(dataset_path=tmp_path / "synthetic.json", tier="smoke", output=run_dir) configuration_path = run_dir / "run.json" configuration = json.loads(configuration_path.read_text()) - configuration.pop("execution_profile") + if not keep_profile: + configuration.pop("execution_profile") + configuration.update( + answer_agent_model="openai/gpt-5.6-luna", + judge_model="openai/gpt-5.6-luna", + answer_agent_reasoning_effort="none", + judge_reasoning_effort="none", + api_timeout_seconds=60.0, + ) configuration.update( - protocol_name="RS-LoCoMo-Full-v38", - adapter_version="historical-adapter", - answer_agent_model="openai/gpt-5.6-luna", - judge_model="openai/gpt-5.6-luna", - answer_agent_reasoning_effort="none", - judge_reasoning_effort="none", - api_timeout_seconds=60.0, + protocol_name=historical_name, adapter_version="historical-adapter" ) base = { key: value @@ -3742,9 +3751,11 @@ def test_historical_protocol_is_read_only_without_an_executable_definition( state_path.write_text(json.dumps(state)) before = {p.name: p.read_bytes() for p in run_dir.iterdir() if p.is_file()} recorded = runner.load_recorded_run(run_dir=run_dir) - assert recorded.configuration.answer_agent_model == "openai/gpt-5.6-luna" - assert recorded.configuration.execution_profile is None - assert summarize_run(run_dir=run_dir).protocol_name == "RS-LoCoMo-Full-v38" + assert ( + recorded.configuration.answer_agent_model == configuration["answer_agent_model"] + ) + assert (recorded.configuration.execution_profile is not None) == keep_profile + assert summarize_run(run_dir=run_dir).protocol_name == historical_name with pytest.raises(ValueError, match="historical protocol.*read-only"): run_protocol(run_dir=run_dir) assert before == {p.name: p.read_bytes() for p in run_dir.iterdir() if p.is_file()} diff --git a/website/public/llms-full.txt b/website/public/llms-full.txt index 5c2591950..b13332817 100644 --- a/website/public/llms-full.txt +++ b/website/public/llms-full.txt @@ -19652,7 +19652,7 @@ model. **Warning:** No score has been recorded for the current protocol, -`RS-LoCoMo-Full-v39`. The numbers under [Recorded results](#recorded-results) +`RS-LoCoMo-Full-v40`. The numbers under [Recorded results](#recorded-results) belong to earlier protocols and earlier engine builds. Do not compare them with other systems' published scores. @@ -19740,7 +19740,7 @@ The summary reports: ### The current protocol -Execution uses one profile, `RS-LoCoMo-Full-v39` (key `full-v39`). It selects +Execution uses one profile, `RS-LoCoMo-Full-v40` (key `full-v40`). It selects Luna 6 with low reasoning for ingestion and visual descriptions, Jev (`jev-latest`) for adjudication, and Luna 6 with high reasoning for answering and judging. All these Luna seats prefer OpenAI Flex and permit @@ -19749,8 +19749,16 @@ provider-returned usage determines the recorded cost. Embeddings remain Qwen thr semantic judge policy is retained. The limits remain eight tool calls and nine model calls per question, with no hard answer length cap. +The answerer must give its best-supported answer rather than abstain with +`Unknown`. It may use ordinary general knowledge to connect retrieved clues +and qualify an indirect conclusion with `likely` or `possibly`. It must still +preserve the question's entity and date, and may not invent supporting dialogue +or personal details. This evaluation policy does not change the engine's typed +negative results or the judge. Old runs retain their original prompts and grades; +this protocol requires a new run identity. Its offline checks establish no score. + The saved run records its non-secret ingestion environment, component/model -bindings, approved provider order and 180-second API transport budget. CI checks +bindings, approved provider order and 300-second API transport budget. CI checks the native System One backup remains disabled (`REMEMBERSTACK_TYPESAFE_BACKUP=none`), so adding an optional product adapter cannot silently change benchmark providers. CI also checks @@ -19852,7 +19860,7 @@ answer agent choosing a weaker retrieval tool for 393 questions, rather than at worse ingestion. It is in `plan/analysis/locomo_v11_score_regression_analysis.md`. -No run of `RS-LoCoMo-Full-v39`, or of any protocol after v18, is recorded. +No run of `RS-LoCoMo-Full-v40`, or of any protocol after v18, is recorded. When one is, it will appear here with its protocol, revision, tier, cost and failure counts. @@ -19889,7 +19897,7 @@ Then, stage by stage, for one conversation (`conv-26`) of the smoke tier: ```bash uv run python -m benchmarks.locomo prepare \ --dataset /path/to/locomo10.json --tier smoke \ - --output .benchmark-runs/smoke --protocol full-v39 + --output .benchmark-runs/smoke --protocol full-v40 uv run python -m benchmarks.locomo ingest \ --run .benchmark-runs/smoke --sample conv-26 \ @@ -19921,7 +19929,7 @@ stack, ingests, waits for processing, answers, judges and backs up each conversation in turn: ```bash -LOCOMO_PROTOCOL=full-v39 LOCOMO_MAX_EVALUATOR_COST_USD=60 \ +LOCOMO_PROTOCOL=full-v40 LOCOMO_MAX_EVALUATOR_COST_USD=60 \ bash benchmarks/locomo/sharding/run_shard.sh conv-26 .benchmark-runs/my-run /path/to/locomo10.json ``` diff --git a/website/src/app/docs/project/benchmarks/page.mdx b/website/src/app/docs/project/benchmarks/page.mdx index ebd5ae5d7..f322ef339 100644 --- a/website/src/app/docs/project/benchmarks/page.mdx +++ b/website/src/app/docs/project/benchmarks/page.mdx @@ -35,7 +35,7 @@ model. No score has been recorded for the current protocol, -`RS-LoCoMo-Full-v39`. The numbers under [Recorded results](#recorded-results) +`RS-LoCoMo-Full-v40`. The numbers under [Recorded results](#recorded-results) belong to earlier protocols and earlier engine builds. Do not compare them with other systems' published scores. @@ -125,7 +125,7 @@ The summary reports: ### The current protocol -Execution uses one profile, `RS-LoCoMo-Full-v39` (key `full-v39`). It selects +Execution uses one profile, `RS-LoCoMo-Full-v40` (key `full-v40`). It selects Luna 6 with low reasoning for ingestion and visual descriptions, Jev (`jev-latest`) for adjudication, and Luna 6 with high reasoning for answering and judging. All these Luna seats prefer OpenAI Flex and permit @@ -134,8 +134,16 @@ provider-returned usage determines the recorded cost. Embeddings remain Qwen thr semantic judge policy is retained. The limits remain eight tool calls and nine model calls per question, with no hard answer length cap. +The answerer must give its best-supported answer rather than abstain with +`Unknown`. It may use ordinary general knowledge to connect retrieved clues +and qualify an indirect conclusion with `likely` or `possibly`. It must still +preserve the question's entity and date, and may not invent supporting dialogue +or personal details. This evaluation policy does not change the engine's typed +negative results or the judge. Old runs retain their original prompts and grades; +this protocol requires a new run identity. Its offline checks establish no score. + The saved run records its non-secret ingestion environment, component/model -bindings, approved provider order and 180-second API transport budget. CI checks +bindings, approved provider order and 300-second API transport budget. CI checks the native System One backup remains disabled (`REMEMBERSTACK_TYPESAFE_BACKUP=none`), so adding an optional product adapter cannot silently change benchmark providers. CI also checks @@ -237,7 +245,7 @@ answer agent choosing a weaker retrieval tool for 393 questions, rather than at worse ingestion. It is in `plan/analysis/locomo_v11_score_regression_analysis.md`. -No run of `RS-LoCoMo-Full-v39`, or of any protocol after v18, is recorded. +No run of `RS-LoCoMo-Full-v40`, or of any protocol after v18, is recorded. When one is, it will appear here with its protocol, revision, tier, cost and failure counts. @@ -276,7 +284,7 @@ Then, stage by stage, for one conversation (`conv-26`) of the smoke tier: ```bash uv run python -m benchmarks.locomo prepare \ --dataset /path/to/locomo10.json --tier smoke \ - --output .benchmark-runs/smoke --protocol full-v39 + --output .benchmark-runs/smoke --protocol full-v40 uv run python -m benchmarks.locomo ingest \ --run .benchmark-runs/smoke --sample conv-26 \ @@ -308,7 +316,7 @@ stack, ingests, waits for processing, answers, judges and backs up each conversation in turn: ```bash -LOCOMO_PROTOCOL=full-v39 LOCOMO_MAX_EVALUATOR_COST_USD=60 \ +LOCOMO_PROTOCOL=full-v40 LOCOMO_MAX_EVALUATOR_COST_USD=60 \ bash benchmarks/locomo/sharding/run_shard.sh conv-26 .benchmark-runs/my-run /path/to/locomo10.json ```