Score retrieved passages with an LLM: below 0.15, admit ignorance instead of hallucinating
TejasKumar_ · x · 2026-10-02
- The author's personal Q&A bot uses one LLM call to score each of the top 10 retrieved passages: "does this answer the question?"
- Two attack questions score 0.06 and 0.07, while the lowest of 60 legitimate questions is 0.13 — so a 0.15 threshold makes the bot say it hasn't covered a topic instead of making things up.
- It complements the prompt-injection guard in the same thread, forming one cheap anti-hallucination + anti-injection workflow.
More from coding & agent
- Dev ships throwaway Postgres for agents: pg19 via pglite on Cloudflare DO over raw TCP — ritakozlov · 2026-11-29
- Product idea: cloud Android VMs and home WiFi proxies to make agents look human — Darpinian · 2026-11-29
- 38 free agent skills distilled from shipping three live AI products — PawelHuryn · 2026-11-29
- Step 5: run evals on synthetic data pre-launch, watch real traces after — PawelHuryn · 2026-11-29
- Break your agent before attackers do: 6 tests mapped to OWASP LLM Top 10 — PawelHuryn · 2026-11-29
- PM shares playbook for shipping 4 customer-facing Claude agents into production — PawelHuryn · 2026-11-29