Project indexing turns a repository into searchable context. An IDE scans source files, documentation, and configuration, divides them into meaningful chunks, converts each chunk to an embedding, and stores the vectors for retrieval. section 3.5.1
For a request, the agent embeds the query, retrieves similar chunks, and adds a selection to the prompt before generation. Similarity is not proof of relevance: the chunks judged closest may not be the ones needed. section 3.5.1
Check indexing before exploring a project
Before asking for a high-level architecture description of an unfamiliar project, confirm it is fully indexed. In Cursor, check the Indexing & Docs settings; a general prompt suits a black-box starting point. section 2.2.1
Figure 3.7 Context-aware assistance flow. The developer's query is converted into an embedding, matched against the indexed codebase, and the most relevant chunks are injected into the prompt before the model generates its response.

Trace how a developer query becomes an embedding, matches indexed chunks, and supplies context for generation. section 3.5.1





















