Research and earlier design
Last changed 2026-04-07. This page records research, planning, or an earlier architecture and may not describe the current product. For current behaviour, start at Start here.
Benchmark Stack
This repo should carry three benchmark tracks:
LongMemEvalfor memory fidelityYC-Benchfor long-horizon outcomesHSM-nativefor stigmergic memory, belief revision, and agent handoff
The goal is not to force one benchmark to prove everything. Each track should measure one thing well.
1. LongMemEval
Purpose:
- Verify that HSM-II preserves exact cross-session memory without lossy abstraction.
Current entrypoint:
src/bin/hsm_longmemeval.rs
Files to add or maintain:
src/bin/hsm_longmemeval.rssrc/eval/runner.rssrc/eval/trace.rssrc/eval/metrics.rsscripts/run_longmemeval.shscripts/eval_longmemeval.shdocs/LONGMEMEVAL.md
Required modes:
baseline-directRaw timestamped history, no HSM retrieval layer.hsm-fullhistory-plus-memoryRaw timestamped history plus HSM memory augmentation.hsm-retrieval-onlyRetrieved evidence without full history. This is an ablation, not the default benchmark mode.
Required commands:
cargo run --bin hsm-longmemeval -- \
--input external/LongMemEval/data/longmemeval_oracle.json \
--output runs/longmemeval/baseline_oracle.jsonl \
--mode baseline
cargo run --bin hsm-longmemeval -- \
--input external/LongMemEval/data/longmemeval_oracle.json \
--output runs/longmemeval/hsm_oracle.jsonl \
--mode hsmRequired output files:
*.jsonlpredictions with:
{"question_id":"...", "hypothesis":"..."}*.trace.jsonlwith retrieval/debug metadata*.eval.jsonaggregate summary
Required summary schema:
{
"benchmark": "longmemeval",
"mode": "baseline-direct",
"dataset": "oracle",
"model": "openai/gpt-5.4",
"n_questions": 500,
"qa_accuracy": 0.0,
"abstention_accuracy": 0.0,
"retrieval_turn_recall_at_k": 0.0,
"retrieval_session_recall_at_k": 0.0,
"notes": []
}Success criteria:
hsm-fullhistory-plus-memoryshould stay nearbaseline-directon oracle mode.hsm-retrieval-onlyis allowed to underperform, but should improve as retrieval quality improves.
2. YC-Bench
Purpose:
- Measure whether memory improves long-horizon company performance under compounding consequences.
Current integration points:
external_integrations/auto-harness-yc-bench/config/external_yc_bench_seed*.jsonweb/company-console/app/api/companies-sh/yc-bench/
Files to add or maintain:
scripts/run_ycbench_grid.shscripts/aggregate_ycbench_hsm.pyscripts/compare_ycbench_ablations.pydocs/YC_BENCH.mdconfig/ycbench_hsm_baseline.jsonconfig/ycbench_hsm_nomemory.jsonconfig/ycbench_hsm_scratchpad_only.jsonconfig/ycbench_hsm_full.json
Required ablations:
baseline-no-memoryscratchpad-onlyhsm-memory-no-belief-updatehsm-full
Required outputs per run:
{
"benchmark": "yc-bench",
"company": "apex-systems",
"seed": 1,
"model": "openrouter/qwen/qwen3.6-plus:free",
"variant": "hsm-full",
"final_funds_ratio": 0.0,
"terminal_reason": "horizon_end",
"turns_completed": 0,
"total_cost_usd": 0.0
}Required aggregate schema:
{
"benchmark": "yc-bench",
"variant": "hsm-full",
"val_score": 0.0,
"pass_rate": 0.0,
"pass_count": 0,
"n_companies": 0,
"avg_seeds": 0.0,
"companies": {},
"tier_distribution": {},
"behavioral_metrics": {
"rat_accept_rate": 0.0,
"trust_task_ratio": 0.0,
"policy_flip_rate": 0.0,
"bankruptcy_rate": 0.0
}
}Success criteria:
hsm-fullshould beat weaker-memory variants on funds ratio and behavioral stability.- Behavioral metrics should explain the outcome, not just the final dollars.
3. HSM-Native
Purpose:
- Measure what HSM-II is actually designed for: stigmergic coordination, belief revision, agent handoff, and cross-session synthesis.
New files to add:
src/eval/hsm_native_tasks.rssrc/bin/hsm_native_eval.rssrc/eval/hsm_native_metrics.rsdocs/HSM_NATIVE_BENCH.mdscripts/run_hsm_native.sh
Suites to add:
cross_session_synthesisbelief_revisionagent_handoffpolicy_persistenceconflict_resolution
Task schema:
{
"id": "handoff-001",
"suite": "agent_handoff",
"sessions": [
{
"session_id": 1,
"agent": "researcher",
"turns": []
}
],
"question": "What should the finisher do next?",
"gold": {
"answer": "...",
"required_facts": [],
"forbidden_stale_facts": []
}
}Required metrics schema:
{
"benchmark": "hsm-native",
"suite": "belief_revision",
"variant": "hsm-full",
"n_tasks": 0,
"answer_accuracy": 0.0,
"required_fact_recall": 0.0,
"stale_fact_suppression": 0.0,
"handoff_success": 0.0,
"policy_consistency": 0.0,
"explanation_grounding": 0.0
}Success criteria:
- HSM should clearly outperform plain chat-history baselines on belief revision and handoff tasks.
Implementation Order
- Stabilize
LongMemEvalas a regression suite. - Add
YC-Benchablation variants and behavioral aggregates. - Build
HSM-nativebenchmark once the first two tracks are reproducible.
Short Task List
LongMemEval
- Add direct/baseline/hsm mode naming cleanup in
src/bin/hsm_longmemeval.rs - Export retrieval metrics from traces
- Add
scripts/run_longmemeval.sh - Add
scripts/eval_longmemeval.sh - Add JSON summary writer
YC-Bench
- Add named ablation configs under
config/ - Add run matrix script under
scripts/ - Add behavior aggregator for RAT avoidance, trust specialization, policy stability
- Store aggregate outputs under
runs/ycbench/
HSM-Native
- Add task format under
src/eval/ - Add runner bin under
src/bin/ - Add scorers under
src/eval/ - Add seedable JSONL artifact output
Repository Conventions
Suggested run artifact layout:
runs/
longmemeval/
ycbench/
hsm_native/Suggested docs:
docs/
LONGMEMEVAL.md
YC_BENCH.md
HSM_NATIVE_BENCH.md
BENCHMARK_STACK.md