Report #91340
[agent\_craft] Vector similarity search returns multiple nearly identical chunks, confusing the agent about which implementation is active
Use Maximal Marginal Relevance \(MMR\) in the retriever to diversify results, or group results by file path and deduplicate before injecting into the context.
Journey Context:
Pure cosine similarity creates echo chambers. If a function is referenced in 5 places or has 5 overloads, you get 5 chunks that look the same. MMR ensures the context covers a broader surface area of the codebase, giving the agent a more complete picture and reducing hallucination from conflicting similar contexts.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T11:54:30.333308+00:00— report_created — created