Re-ranking lab
Instrument fusion, rerank scores, and fallbacks
Metrics for nDCG@5 and rerank_ms p95 must distinguish bad input from component failure for support agent asking about E_CONN_RESET wording variants.
1Learn the idea
Read
Golden signals for this system
Instrument hybrid BM25+vector retrieve then cross-encoder rerank for error-code FAQs so support agent asking about E_CONN_RESET wording variants can answer: demand, errors, latency/age, saturation. Emit fields needed by nDCG@5 and rerank_ms p95 with bounded labels. Sample successful high-volume traces; keep errors and rollout transitions denser within policy.
Read
Alert path worth paging
Define at least one alert that would fire for RERANK-FLAT-55, with a for/pending window that survives deploy blips. Missing scrape or missing revision labels must not look like health. Include a trace/log example id format you will actually search.
Read
Implementation artifact
emit("rerank_ms", value=rerank_ms)
emit("ndcg_at_5", value=ndcg)
Read
Tests for telemetry
Add a unit/integration check that metrics increment on the happy path and on the reranker scores all candidates near 0.5 — order equals retrieve order branch. Store machine-readable output in CI artifacts when practical.
Read
Stage depth
Cardinality discipline: tenant and revision are usually enough; raw question text is not a label. Exemplars or trace links beat screenshots alone when debugging RERANK-FLAT-55. Define who owns alert fatigue review. If you export to a vendor, record retention and access. Synthetic probes should use non-sensitive fixtures and still exercise POST /v1/search/rerank. Practice the query you will type at 2am once, while calm.
Read
Field notes for `re-ranking-lab` / `observability`
Document the exact PromQL or log query in the runbook stub for this service. Verify histograms have buckets around your SLO target. Add a canary synthetic check that exercises the oracle path every few minutes in staging. Confirm that PII redaction happens before export. Track build/version as a label on the golden signals. Delete noisy debug logs before they become accidental product dependencies. In this chapter the product is hybrid BM25+vector retrieve then cross-encoder rerank for error-code FAQs, the human stakeholder is support agent asking about E_CONN_RESET wording variants, and the incident id you design against is RERANK-FLAT-55. Re-state the oracle in your notes — query 'connection reset while uploading' ranks doc:e-conn-reset #1 after rerank — and keep the invariant visible: top-1 after rerank must beat BM25-only nDCG@5 on gold; latency budget ≤ 120ms for rerank. Track nDCG@5 and rerank_ms p95 as the scoreboard. Surface under change control: POST /v1/search/rerank. If you only have forty minutes, finish the fixture for reranker scores all candidates near 0.5 — order equals retrieve order before polishing UI. Promotion language stays ternary: promote, hold, or roll back based on evidence, not hope.
Read
Extra rehearsal for Re-ranking lab (observability)
Set a timer for twelve minutes and attempt only the observability concerns for Re-ranking lab. Speak aloud what support agent asking about E_CONN_RESET wording variants would see on success versus on reranker scores all candidates near 0.5 — order equals retrieve order. Write three bullet artifacts you must keep: a fixture name tied to RERANK-FLAT-55, a metric query for nDCG@5 and rerank_ms p95, and the rollback or refuse command for POST /v1/search/rerank. Then extend the notes with one sentence on how top-1 after rerank must beat BM25-only nDCG@5 on gold; latency budget ≤ 120ms for rerank would be violated if you skipped this page. Close by restating the oracle in your own words without looking: query 'connection reset while uploading' ranks doc:e-conn-reset #1 after rerank.
Go deeper
Before you start
Why this matters
Name the dashboard row or log line support agent asking about E_CONN_RESET wording variants opens first during RERANK-FLAT-55. It must include a correlation id and a bounded label from nDCG@5 and rerank_ms p95. If telemetry is missing, write whether you promote, hold, or roll back — and why hold is the default.
Related lessons
Check your understanding
Page assessment
Answer from memory. Completion is saved from this evidence, not from opening the next page.
All responses are required.