retrieval-evaluation-harness
Designs the evaluation harness for a retrieval system — golden set construction, metric selection, stage-wise attribution, regression gating, and the offline/online split — treating measurability as a blocking architectural requirement rather than a later addition.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-27
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- retrieval-evaluation-harness
- description
- Designs the evaluation harness for a retrieval system — golden set construction, metric selection, stage-wise attribution, regression gating, and the offline/online split — treating measurability as a blocking architectural requirement rather than a later addition.
03 SKILL.md 正文
Retrieval Evaluation Harness
Purpose
Make retrieval quality observable. A retrieval architecture without a harness is unfalsifiable: nobody can tell whether the reranker helped, whether the chunk size was wrong, or whether the whole layer is returning noise the model politely routes around. This skill produces the harness before the topology is treated as decided.
When to use
Every session involving retrieval, without exception. If the topology is proposed and the harness is deferred, the harness is the deliverable.
Step 1 — Golden set construction
The golden set is the asset. Everything else is arithmetic over it.
- Query sourcing. Real queries beat invented ones. Pull from logs, support tickets, user interviews. Invented queries encode the builder's assumptions about what users ask.
- Query classes. Stratify deliberately: factual lookup, multi-hop, comparison, negation, rare-term, ambiguous, out-of-corpus. A harness that only tests easy lookups will report health while the hard classes fail silently.
- Relevance labels. Binary relevance is cheap and coarse; graded relevance is expensive and sharper. Choose per query class. Label at the chunk level, not the document level — document-level labels hide chunking failures.
- Out-of-corpus set. Include queries the corpus genuinely cannot answer. A system that always retrieves something will always retrieve something wrong.
- Size. Enough per class to detect the effect size that matters. Under ~30 per class, class-level differences are noise.
- Ownership. Name who maintains the set and how it grows. An unowned golden set decays within one quarter.
Step 2 — Metric selection
Match the metric to what the system actually needs.
| Metric | Answers | Use when |
|---|---|---|
| Recall@k | Did the right chunk make it into the candidate set? | Diagnosing first-stage retrieval |
| Precision@k | How much of what we retrieved was relevant? | Context budget is tight |
| nDCG@k | Is relevant content ranked near the top? | Reranking is in play, order matters |
| MRR | How deep is the first relevant hit? | Single-answer lookup workloads |
| Faithfulness | Is the generated answer grounded in retrieved content? | End-to-end quality gate |
| Latency p50/p95/p99 | Does it meet the budget under load? | Always — p99 is the one that pages someone |
| Cost per query | Is this economically viable at volume? | Always |
Pick a small set with an explicit primary metric. Teams that track ten metrics optimize none.
Step 3 — Stage-wise attribution
End-to-end answer quality tells you nothing about which stage broke. Instrument per stage:
- Retrieval stage. Recall@k of the candidate set, before reranking. If the right chunk never enters the candidate set, no downstream stage can recover it.
- Reranking stage. nDCG shift from pre-rerank to post-rerank ordering. A reranker with no measurable shift is latency with a job title.
- Assembly stage. Does the right chunk survive truncation, deduplication, and ordering into the final context?
- Generation stage. Given a context that provably contains the answer, does the model use it?
The common failure: months spent tuning generation prompts when recall@k is 0.4.
Step 4 — Regression gating
- What is the primary metric threshold below which a change does not ship?
- What secondary metrics act as guardrails against gaming the primary?
- Does the harness run in CI, on a schedule, or on demand? On-demand harnesses are run once and abandoned.
- What is the runtime and cost of a full harness pass, and is that cheap enough to run on every meaningful change?
If the harness is too slow or expensive to run routinely, it will not be run. Design a fast subset for per-change gating and a full pass for release gating.
Step 5 — Offline and online split
- Offline. Golden set, deterministic, fast, catches regressions. Cannot detect distribution shift in real queries.
- Online. Real traffic signals — click-through on citations, follow-up query rate, thumbs, escalation rate. Detects drift, but slow and confounded.
Name which signals live where. An offline-only harness goes stale as query distribution moves; an online-only harness cannot gate a deploy.
Step 6 — Ablation plan
For each retrieval path, reranker, and non-trivial parameter, state the ablation that would prove it earns its place:
- Remove the sparse path — which query classes degrade, and by how much?
- Remove the reranker — what is the nDCG cost, and what is the latency saving?
- Halve k — what recall is lost, and what context budget is freed?
A component that survives no ablation test is complexity nobody has justified.
Output
A harness specification containing: golden set shape and owner, primary and guardrail metrics, per-stage instrumentation points, regression thresholds, execution cadence, the offline/online signal split, and the ablation plan. This ships with the topology, not after it.
04 同仓库更多 Skills
twenty-year-land-plan
Apply the Bren discipline of evaluating every land and development decision on a twenty-year horizon, with a comprehensive plan for how the land, the community, and the surrounding public infrastructure evolve together. Deals optimized for a five-year exit are structurally different from deals that compound across generations; insist on knowing which kind you are making. Use when evaluating land, entitlements, master-planned development, or phasing decisions, and when separating five-year exit deals from generational holds.
thematic-gut-check
Apply the Gray discipline of identifying the structural theme behind every real estate deal, testing where that theme sits in its capital-flow lifecycle, and insisting that deals without a named theme — or deals late in a crowded theme — clear a higher bar. A mediocre deal in a strong theme usually beats a clever deal in a weak one. Use when naming the structural thesis behind a deal, judging whether that theme is early or crowded, and setting the bar the deal must clear.
supply-pipeline-gut-check
Apply the Zell discipline of grounding every real estate thesis in the local supply pipeline. Demand counts over adjectives — units under construction, units permitted, units proposed — and convert them into a forward absorption schedule. A deal that ignores the pipeline is a bet on a market you have not actually studied. Use when validating a market thesis, forecasting absorption and rent growth, or counting units under construction, permitted, and proposed.
ruin-scenario-mapping
Apply the Taleb discipline of identifying, for every real estate deal, the specific chain of events that produces ruin — permanent, unrecoverable capital loss — and verifying that no single such chain has non-trivial probability. Deals with any plausible ruin path must be restructured or abandoned. Use when sizing leverage, testing refinancing, covenant, and liquidity risk, or checking whether any single failure chain can permanently wipe out the position.
revenue-cost-architecture
Design a venture's revenue streams, pricing logic, cost structure, and unit economics so the business model has a coherent theory of value capture, not just value creation. Use after the value proposition and customer segment are set and before financial projections, when choosing a pricing model, calculating contribution margin or CAC payback, or checking whether the unit economics hold at scale.
replacement-cost-stress-test
Apply the Buffett discipline of pricing every real estate asset against the cost to rebuild it from scratch. The ratio of purchase price to replacement cost sets a ceiling on long-run downside: below replacement cost, new supply cannot profitably undercut you; at or above it, you are buying a liability disguised as an asset. Use when setting a purchase price, judging downside protection, or testing how exposed an asset is to newly built competing supply.