You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eval: add IR-style search benchmark + regression tests for 50d1a4d
New developer tool: `--search-eval [--queries path.toml] [--report path.json]`
runs a labeled query set through the same pipeline as the live TUI and
reports standard information-retrieval metrics:
- MRR (mean reciprocal rank) — primary "find the right one" metric
- P@1 — did we nail it first try?
- Recall@5 / @10 / @20 — does target appear in the top N?
- Failure list — queries below rank 20
Metrics are aggregated overall and per category, so a change that helps
one query shape but regresses another is visible instead of averaged out.
Privacy: real query text and session ids stay local. The committed
`eval/search-queries.example.toml` shows the schema with synthetic
placeholders. `eval/search-queries.toml` is gitignored. Per-run JSON
reports go to `eval/runs/<sha>.json` (also gitignored) for diffing.
Workflow:
1. Capture baseline before any search change: `--search-eval --report ...`
2. Make the change
3. Re-run; diff JSON to see per-query rank deltas
4. If MRR drops or a category regresses, fix or revert
Also adds regression tests in src/log_search.rs for the bug fixes from
the previous commit (per testing.instructions.md regression-test policy):
- read_tail_returns_whole_small_file — verifies the 2 MB threshold
- read_tail_big_file_captures_head_and_tail — covers the short-read fix
- search_uses_or_semantics_so_missing_term_does_not_kill_recall —
covers the AND→OR default switch
129 unit tests pass; clippy clean on both crates.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0 commit comments