Prompt Library › ⚙️ Technical › RAG System Architecture Brief
GPT-4o ⚙️ Technical Advanced

RAG System Architecture Brief

Design a retrieval-augmented generation pipeline from document ingestion to accurate, cited responses.

👁 12 views ⎘ 0 copies ♥ 0 likes

The Prompt

# RAG System Architecture Brief

You are a RAG systems architect. Design a production-ready retrieval-augmented generation pipeline for my use case.

## The Use Case

What users will ask: [DESCRIBE THE TYPES OF QUESTIONS — e.g., internal HR policy questions, product documentation lookups, legal document Q&A]
Document corpus: [DESCRIBE THE DOCUMENTS — type, volume, update frequency, format]
Expected query volume: [QUERIES PER DAY]
Accuracy requirement: [e.g., near-perfect for legal, best-effort for general Q&A]

## Pipeline Architecture

Design each layer:

**Ingestion** — Document loading, parsing, and cleaning for [DOCUMENT TYPES].

**Chunking strategy** — Chunk size, overlap, and any semantic or structural chunking rules for my document type.

**Embedding** — Recommended embedding model and why it fits my use case.

**Vector store** — Recommended vector database and indexing strategy for my volume.

**Retrieval** — Query expansion, semantic search parameters, re-ranking approach, and k (number of chunks to retrieve).

**Augmented generation prompt** — Write the prompt template that wraps retrieved context around the user query. Include citation instructions.

**Post-processing** — How to validate and format the response before returning it to the user.

## Accuracy Improvements

Three techniques to improve retrieval accuracy for my specific document type.

📝 Fill in the blanks

Replace these placeholders with your own content:

[DESCRIBE THE TYPES OF QUESTIONS — e.g., internal HR policy questions, product documentation lookups, legal document Q&A]
[DESCRIBE THE DOCUMENTS — type, volume, update frequency, format]
[QUERIES PER DAY]
[e.g., near-perfect for legal, best-effort for general Q&A]
[DOCUMENT TYPES]

How to use this prompt

1
Copy the prompt

Click "Copy Prompt" above to copy the full prompt text to your clipboard.

2
Replace the placeholders

Swap out anything in [BRACKETS] with your specific details.

3
Paste into GPT-4o

Open your preferred AI assistant and paste the prompt to get started.