Prompt augmentation adds retrieved or deliberately selected information to an original model prompt. In repository assistance, it turns a broad request into a response grounded in relevant code, documentation, configuration, or tests. section 3.5.1
A typical implementation indexes the codebase, converts a developer query into an embedding, retrieves matching chunks, and places those chunks beside the query before generation. Retrieval reduces context overload, but irrelevant material can still fragment attention; pin specific files, include directories, exclude paths, or restart a drifting session when necessary. section 3.5.1
Repository authentication request
For a request to fix authentication, retrieval can augment the prompt with the auth.js login handler and related tests instead of thousands of unrelated source lines. If retrieval keeps selecting the wrong material, explicitly pin the relevant files rather than arguing with the system in prose. section 3.5.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 the flow from developer query to embedding match, retrieved code chunks, augmented prompt, and generated response. section 3.5.1

