Show the map before the territory. Let AI choose what context it actually needs.
Same codebase question. One dumps everything. One lets AI navigate.
[15,000 lines of code pasted]
AI wades through irrelevant utility functions, configuration files, and unrelated features. The answer references the wrong files or misses key integration points buried in the middle.
Too much context. Important details get lost.
- UserController: handles user endpoints
- AuthService: manages tokens and sessions
- DatabaseContext: data access layer
- Middleware/: request pipeline handlers
AI: "For authentication, I'd need to see AuthService, UserController, and your Middleware folder."
You send just those files. AI gives precise, grounded advice.
Focused context. Accurate answers.
AI has a limited attention budget. When you dump everything into a prompt, important information competes with irrelevant noise. Details in the middle get the least attention. The signal drowns in the flood.
An index solves this. Short descriptions let AI identify what matters before seeing the full content. It navigates to relevance instead of searching through everything. Less context, better focus, sharper answers.
Don't dump everything into context. Send an index first. Ask AI what it needs. Then provide only that. Two focused exchanges beat one overloaded prompt.