See the Difference
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.
Why This Works
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.
What Makes a Good Index
- Brief descriptions: One sentence explaining what each item contains or does
- Clear names: "AuthService: manages login tokens" not just "auth.js"
- Logical grouping: Related items together so AI sees the structure
- Complete coverage: Everything AI might need to choose from
Index Formats That Work
- Project outline: List each module with a one-line purpose
- Architecture doc: Components with descriptions, inputs, and outputs
- Table of contents: Document sections with brief summaries
- API manifest: Endpoints with what each one handles
The Technique
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.
When to Use This
- • Working with large codebases or document collections
- • Asking questions that only need part of your material
- • Getting vague or inaccurate answers from big context dumps
- • Building systems that retrieve information for AI
- • Any time AI seems to miss important details