一键导入
eval-recall
Run the memhub Recall@K eval harness against tests/retrieval_golden.json and report the baseline. Read-only; never mutates the DB or writes_log.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run the memhub Recall@K eval harness against tests/retrieval_golden.json and report the baseline. Read-only; never mutates the DB or writes_log.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Read-only health check of the memhub project in this repo — schema version, render freshness, write-log activity
Bootstrap memhub in this repo — initialize the SQLite store, seed starter state and architecture narratives, render PROJECT.md and PROJECT_LEDGER.md
Initialize memhub for a repo in OpenCode; use when the user asks to bootstrap project memory.
Summarize this memhub session, route updates into the database, then re-render PROJECT.md and PROJECT_LEDGER.md
Rebuild + install memhub and bring every memhub instance on this machine (each known repo DB + the machine-global store) to head schema, resync installed agent skill wrappers, with a one-time fix for the ~/.local/bin PATH shadow. Run from the memhub source repo.
Wrap up an OpenCode memhub session; run the binary-rendered policy, draft updates, get per-item approval, write, and render.
| name | eval-recall |
| description | Run the memhub Recall@K eval harness against tests/retrieval_golden.json and report the baseline. Read-only; never mutates the DB or writes_log. |
| framework | memhub |
| framework_version | 1.0.0 |
| last_updated | "2026-07-06T00:00:00.000Z" |
Run the M8 retrieval acceptance gate. Drives memhub eval retrieval
under the hood. Returns a Recall@K number plus per-query pass/fail
detail, surfaces safety failures (empty-probe queries that leaked
results), and never writes to durable tables or writes_log.
This is the Codex counterpart to the Claude Code /eval-recall skill.
Both call into the same memhub eval retrieval CLI; they differ only
in the agent identifier on whatever read-side telemetry the host
captures.
Use this when:
.memhub/ exists in the working repo (run /check-init if unsure).memhub binary on PATH.tests/retrieval_golden.json exists at the repo root (the default).
If the user maintains a different golden set, pass --golden <path>.If preconditions fail, surface that and stop; do not invent a golden set.
memhub eval retrieval --json
Flags:
--golden <path>: override the default
tests/retrieval_golden.json location.--k <N>: change Recall@K (default 3, per addendum §9).--mode fts|hybrid: override the project's [retrieval] mode
config. Use only when explicitly comparing modes.--json: structured output (default markdown).JSON shape:
{
"golden_path": "tests/retrieval_golden.json",
"mode": "fts" | "hybrid",
"k": 3,
"totals": {
"queries": 12,
"match_queries": 11,
"empty_queries": 1,
"match_passes": 10,
"empty_passes": 1,
"safety_failures": 0
},
"recall_at_k": 0.909,
"elapsed_ms": 47,
"outcomes": [
{
"id": "decision-recall-readonly",
"query": "recall read-only writes_log",
"kind": "match" | "empty",
"passed": true,
"matched_rank": 1,
"matched_score": 0.5,
"returned_count": 1,
"failure_reason": null
}
]
}
Headline numbers to report:
recall_at_k × 100, rounded to one decimal place.
Per the addendum, the M8 acceptance gate is ≥ 75% on the starter
set.safety_failures MUST be zero. A non-zero count means
a kind: empty probe returned hits — recall is surfacing
false-positives that the golden set treats as forbidden.id with failure_reason. Don't
paraphrase; quote the reason string so the user can map it to
the matchers in the golden file.The harness regresses when:
recall_at_k drops below the recorded baseline.safety_failures > 0 (any leakage)."no top-K hit matched".In all three cases:
tests/retrieval_golden.json. The golden set is the spec; the
retrieval surface adapts to it, not the other way around.src/retrieval/recall.rs (scoring,
tokenization), in src/retrieval/persist.rs (embed text format),
or in the embedding model itself. Surface a hypothesis, get
confirmation, then change the engine.If match_queries == 0, the golden file has no positive cases — the
harness can run but Recall@K is undefined (returns 0.0). Surface that
and ask whether the user expected the file to be all-negative.
If the eval reports Recall@K = 100% and the user just doubled the
fact/decision/task corpus, mention that the baseline may need a fresh
read — the test is most useful when retrieval has to discriminate
between many candidates, not when each golden query has only one
plausible target.
writes_log. Safe to run mid-session.[retrieval] mode in .memhub/config.toml.
Repos in fts mode get FTS-only scoring; --mode hybrid requires
memhub index rebuild to have backfilled embeddings first
(otherwise expect stale_embeddings warnings in recall, but eval
itself still runs)..memhub/project.sqlite (the golden
set is self-referential — its queries target memhub's own real
decisions/facts/tasks), so treat the number it reports as a
self-hosted calibration/dogfood signal, not the enforced baseline.
The enforced, deterministic reference is
cargo test retrieval_golden_hermetic (issue #44, N28): it
seeds a disposable fixture DB from scratch and reproduces the same
18-query golden set independent of this machine's DB state. Recorded
baseline there: Recall@3 100% (17/17), 0 safety failures
(2026-07-06, see docs/reference/operations.md's Retrieval section).
If this live invocation and that test disagree, trust the test./eval-recall skill under templates/skills/claude/.