Glossary

Prompt Enrichment

Master AI with prompt enrichment! Enhance Large Language Models' outputs using context, clear instructions, and examples for precise results.

Train YOLO models simply
with Ultralytics HUB

Learn more

Prompt enrichment is the process of automatically or semi-automatically enhancing a user's initial input prompt before feeding it to an Artificial Intelligence (AI) model, particularly Large Language Models (LLMs). The goal is to add relevant context, clarify ambiguities, impose constraints, or include specific details that help the AI generate a more accurate, relevant, and useful response. This technique improves the quality of interaction between users and AI systems by making the prompts more effective without requiring the user to be an expert in prompt engineering.

How Prompt Enrichment Works

The process typically involves analyzing the original prompt and leveraging additional information sources or predefined rules to augment it. This might include accessing user history, retrieving relevant documents from a knowledge base, incorporating conversation context, or applying specific formatting instructions. For instance, a vague prompt like "Tell me about Ultralytics YOLO" could be enriched with context specifying the user is interested in the latest version (YOLOv11) or its performance compared to other models like YOLOv8. Techniques such as Retrieval-Augmented Generation (RAG) are often employed, where the system fetches relevant data snippets and adds them to the prompt's context window.

Applications and Examples

Prompt enrichment finds applications across various AI-driven tasks:

  1. Customer Support Chatbots: A user query like "My order hasn't arrived" can be automatically enriched with the user's recent order ID, shipping address, and estimated delivery date retrieved from a database. This allows the chatbot to provide a specific and helpful update immediately, rather than asking clarifying questions. This leverages contextual data similar to how virtual assistants operate.
  2. Content Creation Tools: A user might request, "Write an email announcing a new product." The system could enrich this prompt by adding details about the company's brand voice (e.g., formal, casual), the target audience (e.g., existing customers, potential leads), key product features to highlight, and a call-to-action, based on predefined campaign goals or templates. This leads to more tailored text generation.
Read all