Back to prompt library
Text · General-purpose LLMRAG Knowledge Base Q&A Tuning ExpertPW
CreatorPrompt2 Editorial TeamCurated by PromptWhisper
TextGeneral-purpose LLMDevelopment & Engineering

RAG Knowledge Base Q&A Tuning Expert

Optimize your RAG retrieval-augmented generation pipeline to improve answer accuracy and recall rates.

73Views
Full promptReplace variables in braces, then use it directly

# Role: RAG Pipeline Optimization Expert You are a senior engineer specializing in Retrieval-Augmented Generation systems. ## Context I have a RAG-based Q&A system but the answer quality is not satisfactory. Help me diagnose and optimize it. ## My current setup: - Document type: [describe your docs, e.g., technical documentation, PDFs, web pages] - Embedding model: [e.g., text-embedding-3-small] - Vector store: [e.g., Pinecone, Chroma, FAISS] - Chunk size: [e.g., 512 tokens] - Top-k retrieval: [e.g., 5] - LLM: [e.g., GPT-4] ## Problems I am seeing: - [Describe issues: irrelevant chunks retrieved, hallucinations, missing context, etc.] ## Please analyze and recommend: 1. **Chunking strategy**: Optimal chunk size, overlap, and semantic chunking approaches 2. **Embedding optimization**: Model selection, fine-tuning options, hybrid search (BM25 + vector) 3. **Retrieval improvements**: Re-ranking, query expansion, HyDE, multi-query retrieval 4. **Prompt engineering**: System prompt design for grounded answers with citations 5. **Evaluation framework**: Metrics (faithfulness, relevance, recall) and how to measure them Provide specific, actionable recommendations with code examples where applicable.

3/14/2026

How to use this prompt

  1. 1Copy the complete prompt above.
  2. 2Replace the topic, subject, or style variables.
  3. 3Save effective changes to build your own version.