liveBook · Manning

Prompt augmentation

As explained in Vibe Engineering

Prompt augmentation is the addition of retrieved or otherwise relevant information to an original model prompt.

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

How Vibe Engineering covers it

How deep it goes
Explains indexing, embedding-based retrieval, prompt placement, and manual overrides, but does not detail embedding or ranking algorithms.
Examples
Uses an authentication handler, related tests, indexed code chunks, pinned files, and excluded paths as concrete artifacts.
What it assumes
Assumes familiarity with model prompts and repositories while introducing embeddings, indexing, retrieval, and context curation.
What you can do after
Operate retrieval-assisted coding workflows and correct poor context selection through explicit file and path controls.
How it connects
Connects prompt augmentation with retrieval-augmented generation, embeddings, context windows, and repository indexing.

Also explained in

Compare how 2 books explain prompt augmentation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.