Why MMR keeps returning duplicate chunks to your agent: check candidates_limit first
izgorodin · reddit · 2026-10-13
If your agent gets five near-identical passages after enabling maximal marginal relevance, the culprit is often the candidate pool, not the prompt.
Key points:
- In Qdrant's native MMR query, candidateslimit defaults to limit; with 5 candidates and limit=5, membership can't change, only order.
- Diagnostic: keep query vector, filters, diversity=0.5 and limit=5 fixed, compare candidateslimit=5 vs 30, then inspect IDs and text — did you gain real evidence or just reworded copies?
- Caveats: a bigger cap won't help if only 5 eligible candidates exist, and may pull in less relevant material. This only affects what reaches the agent per call; stored data is untouched, and version/contradiction resolution needs separate handling.
More from coding & agent
- LangChain adds support for ScaleDown's cheap, fast constrained decision models for agent loops — LangChain · 2026-10-13
- Yoniq Compute repo ships inference recipes validated on 1x-8x RTX Pro 6000 with SGLang and vLLM — TheZachMueller · 2026-10-13
- SaaS Vendors and Agencies Are Asking to Plug Into HQ, the New Entry Point for Work — jacob_posel · 2026-10-13
- He Built a 7-Bot Product Swarm on Grok Bot — Here's What Actually Works — PawelHuryn · 2026-10-13
- Claude tried installing ffmpeg from a sketchy fork instead of apt while setting up a VM — haydendevs · 2026-10-13
- Google rolling out custom MCP support in Gemini desktop app to more users — testingcatalog · 2026-10-13