Skip to lesson
Exit
AI editor systems and design1 / 2

1 min lesson

Choose evidence for the model

Explain how a fixed context budget changes what code and instructions an agent should load.

Step 1 of 2

Cursor's semantic search research says Agent uses both semantic search and grep to find code. A context design must decide what to load, when to load it and how much of it fits.

A model can only use the code, instructions and tool results placed in its context. If a needed definition is missing, the output may be wrong even when the model handles the visible material well. Context retrieval selects the evidence available for the next decision.

Treat the context window as a finite budget. Reserve room for the response, keep the user's request and current work intact, then spend the remaining tokens on evidence that can change the answer. When two sources conflict, prefer current direct evidence and keep the conflict visible for verification.