Skip to content

feat(eval): user-facing lore eval command (recall@k/MRR, per-query misses, one-flag A/B, no-spend) #1237

Description

@BYK

Summary

Add a user-facing lore eval command that wraps our existing eval suite (packages/core/eval/) and emits recall@5 / recall@20 / MRR with per-query diagnostics and a one-flag A/B toggle, as a no-spend pure read.

Motivation

Our eval suite is already deeper than competitors on methodology (400K-token early/mid/late recall via cm1.eval.ts, tail-window/compaction/raw baselines, objective retrieval scoring separated from the LLM judge #1186, degradation signals #1185, offline no-spend A/B #1202). What we lack is tight, user-facing CLI ergonomics.

The kossvat/mnemonic mnemonic eval command demonstrates the packaging we want:

  • Prints recall@5/@20/MRR for a query set plus per-query lines ( = recall@5 ≥ 0.5, · = miss).
  • Misses print the actual top-k the retriever returned — so you see why it missed.
  • A single flag (--no-graph-hop) toggles one retrieval knob for a clean A/B.
  • touch_access: false pure-read path so eval never mutates production rankings (no last_reinforced_at / access-count side effects).

Proposed scope (v0)

  • lore eval [--file queries.jsonl] [--json] [--ab <knob>] reading a query set (ship a small generic public set + support a gitignored local set).
  • Output: recall@k + MRR for the set, per-query pass/miss lines, and returned top-k on misses.
  • No-spend pure read: route recall through a non-mutating path so re-running eval does not touch knowledge_meta.last_reinforced_at or any injection/access bookkeeping.
  • One-flag A/B toggle for a single retrieval parameter (RRF weight / graph-hop-equivalent / vector-vs-FTS fusion), reusing feat(eval): offline no-spend context-rot A/B from recorded results (#961) #1202's offline harness where possible.

Guardrails

Part of #961.

Filed from competitive analysis of kossvat/mnemonic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions