Rag Retrieval Augmented Generation
PART 15 — RAG (Retrieval-Augmented Generation)¶
RAG is just a database query injected into a prompt string.
Example RAG Payload:
{
"query": "What is the company refund policy?",
"retrieved_chunks": [
"Doc 14: Refunds are allowed within 30 days.",
"Doc 92: No refunds on digital goods."
]
}
You are a helpful assistant. Use ONLY the context below to answer the user.
<Context>
Doc 14: Refunds are allowed within 30 days.
Doc 92: No refunds on digital goods.
</Context>
User: What is the company refund policy?