Context Relevance Decay
The Problem
Symptoms
Real-World Example
Query: "API rate limit"
K=5 (top 5 chunks):
→ All highly relevant (score 0.80-0.85)
→ Answer: "Rate limit is 1000 req/hour" ✓
K=20 (top 20 chunks):
→ Top 5: Highly relevant (0.80-0.85)
→ Chunks 6-10: Somewhat relevant (0.70-0.75)
→ Chunks 11-20: Marginally relevant (0.60-0.70)
With K=20:
→ LLM sees rate limits + pricing + authentication + errors + ...
→ Context diluted
→ Answer: "Rate limit depends on plan tier and may vary..." (vague)Deep Technical Analysis
Signal-to-Noise Ratio
Dynamic K Selection
Two-Stage Retrieval
Context Compression
How to Solve
Last updated

