Report #21666
[cost\_intel] Stuffing the entire codebase into the context window for every query
Use retrieval-augmented generation \(RAG\) to fetch only the top-K relevant snippets for the query, rather than dumping the whole repo. Only use massive context windows for tasks that genuinely require global cross-referencing \(like finding all usages of a deprecated function\).
Journey Context:
1M token context windows are tempting to use as a dumping ground. However, input tokens are billed, and massive contexts degrade model performance \(lost-in-the-middle\). RAG with a strong embedder and a small model is cheaper and often more accurate for localized queries. Reserve full-context ingestion for tasks where the reasoning explicitly requires synthesizing information across the entire codebase.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T14:46:49.597913+00:00— report_created — created