liveBook · Manning

Prompt

As explained in Enterprise RAG

A prompt is an instruction or input supplied to a language model to guide the content or form of its output.

A prompt is an instruction or input that guides a language model’s output. In a production RAG chatbot, prompts connect user questions, retrieved records, business rules, and response-format requirements. section 4.7 section 6.16

A robust prompt workflow typically:

  • Builds a search prompt from the user’s question and sends it to database-search agents. section 4.7
  • Combines the question, conversation history, and retrieved data into a writer prompt. section 4.7
  • Specifies response behavior, including citations, first-person company language, missing results, and explicit error reporting. section 6.16
  • Improves prompts from user ratings, comments, and observed failures rather than treating the first draft as final. section 6.0

Business-priority instruction

A prompt can encode a ranking requirement alongside application logic: place records containing “Wongza” first, then instruct the writer agent to discuss those products before competitors when they appear in the search results. section 6.13

Figure 4.13 The RAG Chat workflow, where search agents retrieve relevant data. We set up a group chat (or multiple group chats if we are pulling from multiple databases) and then we execute them all at the same time to run multiple simultaneous searches. After the search results are retrieved, a writer agent formulates a response and streams it to the frontend. Then we check the language, translate the answer if needed, and store and log everything to our chat log database for future analysis.

Trace the prompt through a RAG workflow: parallel search agents retrieve data, a writer agent formulates the answer, and the system validates, translates, streams, and logs the result. section 4.7

How Enterprise RAG covers it

How deep it goes
Develops prompts from basic search instructions to detailed writer policies, while deferring general prompt theory.
Examples
Uses search prompts, detailed writer prompts, retrieved records, and Wongza-specific ranking instructions as concrete examples.
What it assumes
Assumes a RAG pipeline with search agents and retrieved data, while illustrating prompt construction through executable workflow examples.
What you can do after
Apply via Python and AutoGen by constructing search plans, passing retrieved data to a writer agent, and refining instructions from feedback.
How it connects
Connects prompts to RAG, retrieval, agents, user feedback, prompt tuning, citations, and response validation.

Also explained in

Compare how 64 books explain prompt →

Related concepts

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