Adding context from a user's own input into a prompt
Prompt augmentation involves extracting key fields, terms, and intents from a user's raw input and injecting relevant contextual information into a well-structured prompt before it is sent to the LLM. This typically combines rule-based or NLP extraction (e.g., named entity recognition, keyword matching, regex) with retrieved context (e.g., from a vector search or feature lookup) to ground the model's response in relevant, specific data. The goal is to reduce ambiguity and hallucination by supplying the model with precisely the context it needs, rather than relying on the raw query alone.
1 · Learn the must-know
- Extracting key fields/entities from user input (e.g., product name, date range, customer ID) allows targeted retrieval of only the most relevant context rather than dumping excessive or irrelevant information into the prompt.
- Intent detection helps route the user's query to the appropriate context source or prompt template, since different intents (e.g., troubleshooting vs. product inquiry) require different augmentation strategies.
- Augmented context should be clearly delineated from the user's original query within the prompt template (e.g., using labeled sections) so the LLM can distinguish instructions, retrieved context, and the user's question.
- Overloading the prompt with too much extracted or retrieved context can dilute relevance, increase token cost, and degrade response quality, so relevance filtering and ranking of retrieved chunks matters.
- Prompt augmentation is distinct from fine-tuning: it dynamically injects context at inference time without altering model weights, making it faster to iterate and update as underlying data changes.
- Combining structured field extraction with unstructured retrieval (e.g., pulling a customer record plus relevant support docs) often produces more grounded and accurate responses than either technique alone.
2 · Check your understanding
A Generative AI Engineer is building an internal HR assistant that answers employee benefits questions. Employees type messages like "What is my remaining PTO balance for employee ID 48213?" The application must return an accurate, employee-specific answer rather than a generic policy statement. Which approach should the engineer use to augment the prompt with the correct context?
What you have tried across Databricks GenAI Engineer's objectives, not a readiness score.
Design Applications10.71% of the exam*0 of 6 tried
Data Preparation14.29% of the exam*0 of 8 tried
Application Development23.21% of the exam*0 of 13 tried
Assembling and Deploying Applications26.79% of the exam*0 of 15 tried
Governance7.14% of the exam*0 of 4 tried
Evaluation and Monitoring17.86% of the exam*0 of 10 tried
* Our estimate. Databricks publishes no section weights.
3 · Keep going
Ready for more? Take a weighted mock or try free practice questions.