score-retrieval-quality
Use when you need to know whether note retrieval returns the right things. Measures recall and precision against a small labeled set of queries.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 81
- Forks
- 17
01 前言 Front Matter
- name
- score-retrieval-quality
- description
- Use when you need to know whether note retrieval returns the right things. Measures recall and precision against a small labeled set of queries.
02 资源文件 3
- 许可证LICENSE1.0 KB
- 参考文档SOURCE.md349 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
Score Retrieval Quality
"Search seems to work" is a feeling, not a measurement. Retrieval is good when the right notes come back and the wrong ones do not — both measurable on a handful of labeled queries.
Procedure
- Build a labeled set of 10-20 queries you have actually needed, in
notes/retrieval-eval.jsonl. - For each query, list the note ids that should return (the gold set), by hand.
- Run each query against your retriever and capture the returned ids.
- Compute recall = |returned AND gold| / |gold| and precision = |returned AND gold| / |returned|.
- Report the mean of each; a healthy store clears recall 0.8 and precision 0.6 on this set.
- Look at the misses: a query with recall 0 usually means the note was never written, not that search failed.
- Look at the false hits: precision 0.2 usually means the query terms are too common — add a filter.
- Fix the cheapest side first: a tagging gap (see
tag-notes-for-precision-recall) is cheaper than re-embedding. - Re-run the same labeled set after any change; the set is the regression test.
- Keep the eval file in the repo so the score is reproducible, not remembered.
Pitfalls
-
Judging retrieval by one lucky query and declaring it good.
-
Counting a note as a hit because its title matched while its content was irrelevant.
-
Changing the retriever and re-scoring on a new query set, so nothing is comparable.
-
Treating recall and precision as one number, then optimizing whichever the current query favours.
-
Blaming the retriever when the gold note does not exist in the store at all.
-
Scoring on queries invented for the test rather than ones you actually ran.
-
Reporting a single aggregate and hiding the queries that returned nothing.
-
Freezing the eval and never adding new queries, so the score stops reflecting real use.
Verification
jq -s '{recall: (map(.hit)|add/length), precision: (map(.prec)|add/length)}' notes/retrieval-eval-results.json
# passes when recall >= 0.8 and precision >= 0.6 on the frozen query set
Report to the user: the query count, mean recall, mean precision, and the two worst queries with the reason.
04 同仓库更多 Skills
recipe-performance
Diagnose a specific MetaMask user flow's real-app performance and Sentry critical-user-flow telemetry with deterministic mm-harness recipes. Use for CUF boundaries, cold/warm/background-resume behavior, latency regressions, lifecycle tags, duplicate or blocking network requests, long tasks, layout/paint cost, screen redraws, React rerenders, or browser trace analysis where tests alone cannot prove the real app.
mexc-spot-websocket
MEXC Spot WebSocket workflows for public streams, protobuf handling, depth maintenance, listen keys, and private streams without exposing API keys.
mexc-spot-rest
MEXC Spot REST workflows for public data, signed account requests, orders, wallet/admin actions, and secure signing without exposing API keys.
mexc-futures-websocket
MEXC Futures WebSocket workflows for public streams, private account/order/position streams, ping/pong, subscriptions, and depth maintenance.
0xklen-version-and-refresh-sanctions-lists
暂无简介
verify-tests-cover-changed-lines
Use when a PR adds code that the existing suite may not exercise. Measures patch coverage — the share of newly changed lines hit by tests — before approving.