Report #27284
[architecture] Using a fixed top-K for vector retrieval regardless of query complexity leading to irrelevant context or missing context
Use a similarity score threshold combined with top-K, and dynamically adjust K based on the query type \(broad exploration vs specific lookup\).
Journey Context:
Top-K blindly returns K results even if none are relevant \(introducing hallucination fuel\), or misses relevant results if K is too small. A threshold ensures quality. Furthermore, a query like 'summarize the project' needs a larger K than 'what is the API endpoint for auth?'. Dynamic K optimizes context window utilization.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:11:25.169530+00:00— report_created — created