conversations
listlengths
2
2
metadata
dict
id
stringlengths
36
36
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
2515d30a-401a-4156-b174-c10131292f98
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
a555f125-1071-4d15-af0b-bb73e3694628
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
5e2b2cb1-56ef-436a-a1b9-6baa1465b1db
[ { "from": "human", "value": "How do I handle different document types — PDFs, HTML pages, code files, and tables — when ingesting data into a RAG system?" }, { "from": "gpt", "value": "Different document types require specialised loaders and parsers. Using the wrong one loses structure (table ce...
{ "category": "document_ingestion", "context": "handling PDF, HTML, code, and tables in RAG pipelines" }
430db408-7be6-490b-92f4-fa66176cbdb1
[ { "from": "human", "value": "Explain the main chunking strategies for RAG: fixed-size, semantic chunking, recursive character splitter, and parent-child chunks. When should I use each?" }, { "from": "gpt", "value": "Chunking is one of the highest-leverage decisions in RAG. The wrong strategy cau...
{ "category": "chunking_strategies", "context": "chunking strategies for RAG" }
403edcf7-72f2-4709-b4e4-90ac09a77c3a
[ { "from": "human", "value": "What is contextual compression in RAG and how do I use LLMChainExtractor and EmbeddingsFilter to reduce context window usage?" }, { "from": "gpt", "value": "Contextual compression sits between retrieval and generation. Instead of passing entire chunks verbatim to the...
{ "category": "contextual_compression", "context": "compressing retrieved context to reduce LLM costs" }
a983627f-151e-48d4-a5bd-956d77f0c479
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
b5354108-2c34-4d08-a92b-bc95774df0f1
[ { "from": "human", "value": "How do I optimize a RAG system for production — caching, latency, and cost at scale?" }, { "from": "gpt", "value": "Production RAG at scale has three main cost centres: embedding API calls, vector search latency, and LLM generation tokens. Here is how to tackle each....
{ "category": "rag_production", "context": "RAG caching, latency optimization, and cost control" }
70f7d86d-feec-4d36-a2b6-86964708d02e
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
38c1e848-2fb4-41ad-816c-37974e9d91c3
[ { "from": "human", "value": "Compare Pinecone, Weaviate, ChromaDB, and pgvector for RAG. How do I connect to each from Python?" }, { "from": "gpt", "value": "Each vector database targets a different part of the spectrum from developer convenience to enterprise scale. Here is a practical comparis...
{ "category": "vector_databases", "context": "choosing and using vector databases" }
5957cd78-838a-4abe-b2a3-7db6de2f0102
[ { "from": "human", "value": "Compare Pinecone, Weaviate, ChromaDB, and pgvector for RAG. How do I connect to each from Python?" }, { "from": "gpt", "value": "Each vector database targets a different part of the spectrum from developer convenience to enterprise scale. Here is a practical comparis...
{ "category": "vector_databases", "context": "choosing and using vector databases" }
6f5109db-1260-4544-bbc7-2388cb3c6e86
[ { "from": "human", "value": "Compare Pinecone, Weaviate, ChromaDB, and pgvector for RAG. How do I connect to each from Python?" }, { "from": "gpt", "value": "Each vector database targets a different part of the spectrum from developer convenience to enterprise scale. Here is a practical comparis...
{ "category": "vector_databases", "context": "choosing and using vector databases" }
0e4d6091-67f7-4caf-a37e-a98376809594
[ { "from": "human", "value": "Explain the main chunking strategies for RAG: fixed-size, semantic chunking, recursive character splitter, and parent-child chunks. When should I use each?" }, { "from": "gpt", "value": "Chunking is one of the highest-leverage decisions in RAG. The wrong strategy cau...
{ "category": "chunking_strategies", "context": "chunking strategies for RAG" }
f52a8db2-f54f-434f-bc64-c6d1e678223a
[ { "from": "human", "value": "How do I evaluate my RAG system using RAGAS? Walk me through faithfulness, answer relevancy, and context recall metrics with code." }, { "from": "gpt", "value": "RAGAS (Retrieval Augmented Generation Assessment) provides reference-free and reference-based metrics tha...
{ "category": "retrieval_evaluation", "context": "RAGAS evaluation pipeline for RAG" }
748c75d6-e754-48f7-b645-ea34ad9ddbab
[ { "from": "human", "value": "How do I implement multi-hop RAG for questions that require chaining multiple retrieval steps? Give me a concrete example." }, { "from": "gpt", "value": "Multi-hop RAG answers questions like \"What is the population of the country where the CEO of OpenAI was born?\" ...
{ "category": "multi_hop_rag", "context": "multi-hop retrieval for complex questions" }
ffa819c0-5987-4ef2-a75c-7846edb26a0c
[ { "from": "human", "value": "How does hybrid search work in RAG? Show me how to combine BM25 sparse retrieval with dense embeddings using Reciprocal Rank Fusion." }, { "from": "gpt", "value": "Hybrid search combines keyword-based BM25 (sparse) with semantic embedding search (dense). Each method ...
{ "category": "hybrid_search", "context": "combining BM25 sparse search with dense embeddings" }
e8079953-f2fd-4a96-9f71-6fa1e16fb5ab
[ { "from": "human", "value": "Compare Pinecone, Weaviate, ChromaDB, and pgvector for RAG. How do I connect to each from Python?" }, { "from": "gpt", "value": "Each vector database targets a different part of the spectrum from developer convenience to enterprise scale. Here is a practical comparis...
{ "category": "vector_databases", "context": "choosing and using vector databases" }
ecd4c40e-38d1-470c-bc48-a7a72123a23b
[ { "from": "human", "value": "How do I handle different document types — PDFs, HTML pages, code files, and tables — when ingesting data into a RAG system?" }, { "from": "gpt", "value": "Different document types require specialised loaders and parsers. Using the wrong one loses structure (table ce...
{ "category": "document_ingestion", "context": "handling PDF, HTML, code, and tables in RAG pipelines" }
4073fb44-95e6-437a-9a13-d497bbcfed24
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
2049aabb-16c3-4776-92ad-c325a916c83b
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
0eeddcfc-f37a-4bed-b510-c4f703ee037e
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
5aa05cb5-b67d-4d0d-8f47-747db40dab69
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
1dcfee20-5626-4f7d-bb02-f0b06baffe0c
[ { "from": "human", "value": "Walk me through designing a basic RAG pipeline from scratch. What are the core components and how do they fit together?" }, { "from": "gpt", "value": "A Retrieval-Augmented Generation (RAG) pipeline has five core stages: document loading, chunking, embedding, retriev...
{ "category": "rag_architecture", "context": "basic RAG pipeline design" }
eaaeb2a1-9b6c-4e5f-b58a-6bf808ea1b34
[ { "from": "human", "value": "My RAG system has poor answer quality. How do I diagnose whether the problem is low recall, hallucinations, or context stuffing, and fix each?" }, { "from": "gpt", "value": "Poor RAG quality always traces back to one of three failure modes: the right document was nev...
{ "category": "retrieval_evaluation", "context": "debugging RAG failures — low recall, hallucinations, context stuffing" }
2e5d1df3-e9b7-4b15-849f-2bf181a8c4d2
[ { "from": "human", "value": "Explain the main chunking strategies for RAG: fixed-size, semantic chunking, recursive character splitter, and parent-child chunks. When should I use each?" }, { "from": "gpt", "value": "Chunking is one of the highest-leverage decisions in RAG. The wrong strategy cau...
{ "category": "chunking_strategies", "context": "chunking strategies for RAG" }
3796ed6e-748f-4333-9bb5-6a846f1c0bd6
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
bff458d0-7018-42a3-af19-80458541f160
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
abe2cd4e-79fd-4ec1-8465-c2c2fefc24ca
[ { "from": "human", "value": "Walk me through designing a basic RAG pipeline from scratch. What are the core components and how do they fit together?" }, { "from": "gpt", "value": "A Retrieval-Augmented Generation (RAG) pipeline has five core stages: document loading, chunking, embedding, retriev...
{ "category": "rag_architecture", "context": "basic RAG pipeline design" }
1e57ea61-a39a-4764-8bc9-fe777bb8f8bf
[ { "from": "human", "value": "How do I evaluate my RAG system using RAGAS? Walk me through faithfulness, answer relevancy, and context recall metrics with code." }, { "from": "gpt", "value": "RAGAS (Retrieval Augmented Generation Assessment) provides reference-free and reference-based metrics tha...
{ "category": "retrieval_evaluation", "context": "RAGAS evaluation pipeline for RAG" }
a2cbb900-d148-445e-98de-855d0945d17f
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
070aad5e-b07c-4f65-ab5d-93092e773ddf
[ { "from": "human", "value": "How do I optimize a RAG system for production — caching, latency, and cost at scale?" }, { "from": "gpt", "value": "Production RAG at scale has three main cost centres: embedding API calls, vector search latency, and LLM generation tokens. Here is how to tackle each....
{ "category": "rag_production", "context": "RAG caching, latency optimization, and cost control" }
3652aa95-e2ef-47ff-814e-daeef83e0320
[ { "from": "human", "value": "Walk me through designing a basic RAG pipeline from scratch. What are the core components and how do they fit together?" }, { "from": "gpt", "value": "A Retrieval-Augmented Generation (RAG) pipeline has five core stages: document loading, chunking, embedding, retriev...
{ "category": "rag_architecture", "context": "basic RAG pipeline design" }
4ebfec67-b85d-4c44-b371-e873e272cda8
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
ba99b1b9-f3bc-4d92-bcd9-96f1c564734c
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
494f227d-7782-4eeb-ab3d-dda20331a980
[ { "from": "human", "value": "My RAG system has poor answer quality. How do I diagnose whether the problem is low recall, hallucinations, or context stuffing, and fix each?" }, { "from": "gpt", "value": "Poor RAG quality always traces back to one of three failure modes: the right document was nev...
{ "category": "retrieval_evaluation", "context": "debugging RAG failures — low recall, hallucinations, context stuffing" }
3414c3f8-f924-460c-a8e8-5ca11374aac2
[ { "from": "human", "value": "How do I evaluate my RAG system using RAGAS? Walk me through faithfulness, answer relevancy, and context recall metrics with code." }, { "from": "gpt", "value": "RAGAS (Retrieval Augmented Generation Assessment) provides reference-free and reference-based metrics tha...
{ "category": "retrieval_evaluation", "context": "RAGAS evaluation pipeline for RAG" }
761ebcd0-dd7b-4aa2-94ac-8cf45c54bce7
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
2cf053c3-ec3a-4215-97a3-411f7edf160c
[ { "from": "human", "value": "How do I optimize a RAG system for production — caching, latency, and cost at scale?" }, { "from": "gpt", "value": "Production RAG at scale has three main cost centres: embedding API calls, vector search latency, and LLM generation tokens. Here is how to tackle each....
{ "category": "rag_production", "context": "RAG caching, latency optimization, and cost control" }
5abbdf4e-7d96-4a1d-998c-f659eec07047
[ { "from": "human", "value": "Compare Pinecone, Weaviate, ChromaDB, and pgvector for RAG. How do I connect to each from Python?" }, { "from": "gpt", "value": "Each vector database targets a different part of the spectrum from developer convenience to enterprise scale. Here is a practical comparis...
{ "category": "vector_databases", "context": "choosing and using vector databases" }
3fe523fb-e835-4701-81a3-231956bc1465
[ { "from": "human", "value": "How do I evaluate my RAG system using RAGAS? Walk me through faithfulness, answer relevancy, and context recall metrics with code." }, { "from": "gpt", "value": "RAGAS (Retrieval Augmented Generation Assessment) provides reference-free and reference-based metrics tha...
{ "category": "retrieval_evaluation", "context": "RAGAS evaluation pipeline for RAG" }
804a1d36-d29d-46ba-93a1-71333f04ea91
[ { "from": "human", "value": "My RAG system has poor answer quality. How do I diagnose whether the problem is low recall, hallucinations, or context stuffing, and fix each?" }, { "from": "gpt", "value": "Poor RAG quality always traces back to one of three failure modes: the right document was nev...
{ "category": "retrieval_evaluation", "context": "debugging RAG failures — low recall, hallucinations, context stuffing" }
79300a15-7d0d-43ef-b91f-29d0193c917a
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
d2cade3a-e613-44e3-bf92-d06f4f64e991
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
23178623-6a0b-4afa-a7de-232d0b6dcc61
[ { "from": "human", "value": "How do I build a RAG system that generates responses with inline citations linking back to source documents?" }, { "from": "gpt", "value": "Citation generation ensures every claim in the answer is traceable to a specific source, which is critical for legal, medical, ...
{ "category": "citation_generation", "context": "generating cited responses linked to source documents" }
eb954c12-f82b-49ee-8251-4e9cfeba4044
[ { "from": "human", "value": "How do I optimize a RAG system for production — caching, latency, and cost at scale?" }, { "from": "gpt", "value": "Production RAG at scale has three main cost centres: embedding API calls, vector search latency, and LLM generation tokens. Here is how to tackle each....
{ "category": "rag_production", "context": "RAG caching, latency optimization, and cost control" }
9bb2ac5b-99ea-48cb-8fb2-131c97d6fafe
[ { "from": "human", "value": "How do I implement multi-hop RAG for questions that require chaining multiple retrieval steps? Give me a concrete example." }, { "from": "gpt", "value": "Multi-hop RAG answers questions like \"What is the population of the country where the CEO of OpenAI was born?\" ...
{ "category": "multi_hop_rag", "context": "multi-hop retrieval for complex questions" }
28645a9d-1a78-49d0-b0f7-835135a5ad14
[ { "from": "human", "value": "How do I optimize a RAG system for production — caching, latency, and cost at scale?" }, { "from": "gpt", "value": "Production RAG at scale has three main cost centres: embedding API calls, vector search latency, and LLM generation tokens. Here is how to tackle each....
{ "category": "rag_production", "context": "RAG caching, latency optimization, and cost control" }
198e50e9-b9af-4f09-9f1a-8c57b67db761
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
639ad7fd-dc5b-4e77-8067-278679918bb2
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
c9bd85eb-4154-47e8-8235-cd998cbe7529
[ { "from": "human", "value": "Compare Pinecone, Weaviate, ChromaDB, and pgvector for RAG. How do I connect to each from Python?" }, { "from": "gpt", "value": "Each vector database targets a different part of the spectrum from developer convenience to enterprise scale. Here is a practical comparis...
{ "category": "vector_databases", "context": "choosing and using vector databases" }
a52c1ba3-9e18-4a28-8786-c51ac59c4cb0
[ { "from": "human", "value": "Explain the main chunking strategies for RAG: fixed-size, semantic chunking, recursive character splitter, and parent-child chunks. When should I use each?" }, { "from": "gpt", "value": "Chunking is one of the highest-leverage decisions in RAG. The wrong strategy cau...
{ "category": "chunking_strategies", "context": "chunking strategies for RAG" }
c3058e33-a49b-4c17-ae5e-8bfbf48897e4
[ { "from": "human", "value": "Explain the main chunking strategies for RAG: fixed-size, semantic chunking, recursive character splitter, and parent-child chunks. When should I use each?" }, { "from": "gpt", "value": "Chunking is one of the highest-leverage decisions in RAG. The wrong strategy cau...
{ "category": "chunking_strategies", "context": "chunking strategies for RAG" }
83ee98a7-c3c3-463a-be1b-6be5f5150414
[ { "from": "human", "value": "How do I build a RAG system that generates responses with inline citations linking back to source documents?" }, { "from": "gpt", "value": "Citation generation ensures every claim in the answer is traceable to a specific source, which is critical for legal, medical, ...
{ "category": "citation_generation", "context": "generating cited responses linked to source documents" }
9a64b4c3-b13e-4e54-90c5-830965cf5008
[ { "from": "human", "value": "My RAG system has poor answer quality. How do I diagnose whether the problem is low recall, hallucinations, or context stuffing, and fix each?" }, { "from": "gpt", "value": "Poor RAG quality always traces back to one of three failure modes: the right document was nev...
{ "category": "retrieval_evaluation", "context": "debugging RAG failures — low recall, hallucinations, context stuffing" }
7f671527-765f-4cc1-874f-2d0c94fb47d3
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
a91adae8-d6bd-409e-b6ce-3bf77fd57c57
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
98bb5c64-a312-41ec-af7d-8e9ffc3e1584
[ { "from": "human", "value": "How do I implement multi-hop RAG for questions that require chaining multiple retrieval steps? Give me a concrete example." }, { "from": "gpt", "value": "Multi-hop RAG answers questions like \"What is the population of the country where the CEO of OpenAI was born?\" ...
{ "category": "multi_hop_rag", "context": "multi-hop retrieval for complex questions" }
5dfdf96a-18e5-4f43-8da3-e76b989fcbaa
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
e15f7342-b226-4a45-88e2-1bebe5611c32
[ { "from": "human", "value": "How do I handle different document types — PDFs, HTML pages, code files, and tables — when ingesting data into a RAG system?" }, { "from": "gpt", "value": "Different document types require specialised loaders and parsers. Using the wrong one loses structure (table ce...
{ "category": "document_ingestion", "context": "handling PDF, HTML, code, and tables in RAG pipelines" }
d1445812-f156-44c2-8308-f66cbbc6174f
[ { "from": "human", "value": "My RAG system has poor answer quality. How do I diagnose whether the problem is low recall, hallucinations, or context stuffing, and fix each?" }, { "from": "gpt", "value": "Poor RAG quality always traces back to one of three failure modes: the right document was nev...
{ "category": "retrieval_evaluation", "context": "debugging RAG failures — low recall, hallucinations, context stuffing" }
2082a16e-2310-422b-b853-5d66e3748370
[ { "from": "human", "value": "How do I implement multi-hop RAG for questions that require chaining multiple retrieval steps? Give me a concrete example." }, { "from": "gpt", "value": "Multi-hop RAG answers questions like \"What is the population of the country where the CEO of OpenAI was born?\" ...
{ "category": "multi_hop_rag", "context": "multi-hop retrieval for complex questions" }
6775562c-6045-485b-95ce-b6c5dfbeae76
[ { "from": "human", "value": "Explain the main chunking strategies for RAG: fixed-size, semantic chunking, recursive character splitter, and parent-child chunks. When should I use each?" }, { "from": "gpt", "value": "Chunking is one of the highest-leverage decisions in RAG. The wrong strategy cau...
{ "category": "chunking_strategies", "context": "chunking strategies for RAG" }
35882648-6e4f-46c5-bf4e-909aab866f54
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
d61f794e-fc10-4ed3-a19e-dae88c8cee6c
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
3362036a-3ab8-4df4-956e-ecd6eb591c84
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
34a942d4-f3a9-4d2d-84a3-c261c3858e79
[ { "from": "human", "value": "How do I build a RAG system that generates responses with inline citations linking back to source documents?" }, { "from": "gpt", "value": "Citation generation ensures every claim in the answer is traceable to a specific source, which is critical for legal, medical, ...
{ "category": "citation_generation", "context": "generating cited responses linked to source documents" }
b007b1e5-aa30-464a-bdfa-02d96b98c016
[ { "from": "human", "value": "Walk me through designing a basic RAG pipeline from scratch. What are the core components and how do they fit together?" }, { "from": "gpt", "value": "A Retrieval-Augmented Generation (RAG) pipeline has five core stages: document loading, chunking, embedding, retriev...
{ "category": "rag_architecture", "context": "basic RAG pipeline design" }
d0ade982-9a48-463b-9c8c-41b43d102c73
[ { "from": "human", "value": "How do I handle different document types — PDFs, HTML pages, code files, and tables — when ingesting data into a RAG system?" }, { "from": "gpt", "value": "Different document types require specialised loaders and parsers. Using the wrong one loses structure (table ce...
{ "category": "document_ingestion", "context": "handling PDF, HTML, code, and tables in RAG pipelines" }
3b67e636-0341-40f8-bd97-77bd3806a973
[ { "from": "human", "value": "My RAG system has poor answer quality. How do I diagnose whether the problem is low recall, hallucinations, or context stuffing, and fix each?" }, { "from": "gpt", "value": "Poor RAG quality always traces back to one of three failure modes: the right document was nev...
{ "category": "retrieval_evaluation", "context": "debugging RAG failures — low recall, hallucinations, context stuffing" }
0d6dce25-4892-4c85-90b3-17db217bd0a9
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
129a1a55-1804-48fe-93f4-13ad6bd8d38a
[ { "from": "human", "value": "Explain the main chunking strategies for RAG: fixed-size, semantic chunking, recursive character splitter, and parent-child chunks. When should I use each?" }, { "from": "gpt", "value": "Chunking is one of the highest-leverage decisions in RAG. The wrong strategy cau...
{ "category": "chunking_strategies", "context": "chunking strategies for RAG" }
0b0781b6-c284-46fe-bc83-45bf0f43107e
[ { "from": "human", "value": "How does reranking improve RAG? Show me how to implement a reranking step using Cohere and FlashRank." }, { "from": "gpt", "value": "Initial retrieval (BM25 or dense ANN) optimises for speed: it runs a single dot product against all vectors. Rerankers run a slower bu...
{ "category": "reranking", "context": "cross-encoder reranking in RAG" }
4284c176-3e87-4bd5-8195-bd7ea3408467
[ { "from": "human", "value": "What is GraphRAG and how do knowledge graphs enhance retrieval compared to standard vector search?" }, { "from": "gpt", "value": "GraphRAG combines vector similarity search with graph traversal, enabling retrieval of information that requires understanding entity rel...
{ "category": "rag_architecture", "context": "GraphRAG and knowledge graph-enhanced retrieval" }
4546ef2d-24f0-435d-b37f-7bf4b9c54d11
[ { "from": "human", "value": "What is contextual compression in RAG and how do I use LLMChainExtractor and EmbeddingsFilter to reduce context window usage?" }, { "from": "gpt", "value": "Contextual compression sits between retrieval and generation. Instead of passing entire chunks verbatim to the...
{ "category": "contextual_compression", "context": "compressing retrieved context to reduce LLM costs" }
0dd3f545-27f9-4aa2-82c5-06706ec9f2cc
[ { "from": "human", "value": "How do I optimize a RAG system for production — caching, latency, and cost at scale?" }, { "from": "gpt", "value": "Production RAG at scale has three main cost centres: embedding API calls, vector search latency, and LLM generation tokens. Here is how to tackle each....
{ "category": "rag_production", "context": "RAG caching, latency optimization, and cost control" }
eacf5a29-81fd-4785-8522-86090b46b411
[ { "from": "human", "value": "How does reranking improve RAG? Show me how to implement a reranking step using Cohere and FlashRank." }, { "from": "gpt", "value": "Initial retrieval (BM25 or dense ANN) optimises for speed: it runs a single dot product against all vectors. Rerankers run a slower bu...
{ "category": "reranking", "context": "cross-encoder reranking in RAG" }
1ba7a433-875a-4c0f-a4dc-9a2ea264312e
[ { "from": "human", "value": "How do I build a RAG system that generates responses with inline citations linking back to source documents?" }, { "from": "gpt", "value": "Citation generation ensures every claim in the answer is traceable to a specific source, which is critical for legal, medical, ...
{ "category": "citation_generation", "context": "generating cited responses linked to source documents" }
37858acd-a152-4b19-8ef6-d024745423f2
[ { "from": "human", "value": "What is contextual compression in RAG and how do I use LLMChainExtractor and EmbeddingsFilter to reduce context window usage?" }, { "from": "gpt", "value": "Contextual compression sits between retrieval and generation. Instead of passing entire chunks verbatim to the...
{ "category": "contextual_compression", "context": "compressing retrieved context to reduce LLM costs" }
c51f1623-cac9-41fe-aa51-0a5b07717881
[ { "from": "human", "value": "How does hybrid search work in RAG? Show me how to combine BM25 sparse retrieval with dense embeddings using Reciprocal Rank Fusion." }, { "from": "gpt", "value": "Hybrid search combines keyword-based BM25 (sparse) with semantic embedding search (dense). Each method ...
{ "category": "hybrid_search", "context": "combining BM25 sparse search with dense embeddings" }
4c90a429-5be1-4887-afe9-9ac185d62d40
[ { "from": "human", "value": "How do I evaluate my RAG system using RAGAS? Walk me through faithfulness, answer relevancy, and context recall metrics with code." }, { "from": "gpt", "value": "RAGAS (Retrieval Augmented Generation Assessment) provides reference-free and reference-based metrics tha...
{ "category": "retrieval_evaluation", "context": "RAGAS evaluation pipeline for RAG" }
ecea7bd8-da4c-42b7-953a-0172f78f32b3
[ { "from": "human", "value": "How does reranking improve RAG? Show me how to implement a reranking step using Cohere and FlashRank." }, { "from": "gpt", "value": "Initial retrieval (BM25 or dense ANN) optimises for speed: it runs a single dot product against all vectors. Rerankers run a slower bu...
{ "category": "reranking", "context": "cross-encoder reranking in RAG" }
290476f3-baac-469e-a59d-7b61110a8bb6
[ { "from": "human", "value": "Walk me through designing a basic RAG pipeline from scratch. What are the core components and how do they fit together?" }, { "from": "gpt", "value": "A Retrieval-Augmented Generation (RAG) pipeline has five core stages: document loading, chunking, embedding, retriev...
{ "category": "rag_architecture", "context": "basic RAG pipeline design" }
52ccbd36-b82d-4cad-9e3f-8f2328ecf968
[ { "from": "human", "value": "How does hybrid search work in RAG? Show me how to combine BM25 sparse retrieval with dense embeddings using Reciprocal Rank Fusion." }, { "from": "gpt", "value": "Hybrid search combines keyword-based BM25 (sparse) with semantic embedding search (dense). Each method ...
{ "category": "hybrid_search", "context": "combining BM25 sparse search with dense embeddings" }
629a6ebe-77b7-4316-8e9c-5ee3211918a9
[ { "from": "human", "value": "How do I handle different document types — PDFs, HTML pages, code files, and tables — when ingesting data into a RAG system?" }, { "from": "gpt", "value": "Different document types require specialised loaders and parsers. Using the wrong one loses structure (table ce...
{ "category": "document_ingestion", "context": "handling PDF, HTML, code, and tables in RAG pipelines" }
8209219d-aa08-4fd4-aa03-9ece204acca3
[ { "from": "human", "value": "How do I handle different document types — PDFs, HTML pages, code files, and tables — when ingesting data into a RAG system?" }, { "from": "gpt", "value": "Different document types require specialised loaders and parsers. Using the wrong one loses structure (table ce...
{ "category": "document_ingestion", "context": "handling PDF, HTML, code, and tables in RAG pipelines" }
7686a34d-3fa8-4175-b15c-8740cf9e47de
[ { "from": "human", "value": "How do I build a RAG system that generates responses with inline citations linking back to source documents?" }, { "from": "gpt", "value": "Citation generation ensures every claim in the answer is traceable to a specific source, which is critical for legal, medical, ...
{ "category": "citation_generation", "context": "generating cited responses linked to source documents" }
33e42767-e99d-45d9-8538-66dae2377e26
[ { "from": "human", "value": "My RAG system has poor answer quality. How do I diagnose whether the problem is low recall, hallucinations, or context stuffing, and fix each?" }, { "from": "gpt", "value": "Poor RAG quality always traces back to one of three failure modes: the right document was nev...
{ "category": "retrieval_evaluation", "context": "debugging RAG failures — low recall, hallucinations, context stuffing" }
64bd1239-a2fb-4855-89ab-a46baff1b718
[ { "from": "human", "value": "How do I implement multi-hop RAG for questions that require chaining multiple retrieval steps? Give me a concrete example." }, { "from": "gpt", "value": "Multi-hop RAG answers questions like \"What is the population of the country where the CEO of OpenAI was born?\" ...
{ "category": "multi_hop_rag", "context": "multi-hop retrieval for complex questions" }
fe38929e-8dc3-4a91-95f3-a251d9126553
[ { "from": "human", "value": "Compare Pinecone, Weaviate, ChromaDB, and pgvector for RAG. How do I connect to each from Python?" }, { "from": "gpt", "value": "Each vector database targets a different part of the spectrum from developer convenience to enterprise scale. Here is a practical comparis...
{ "category": "vector_databases", "context": "choosing and using vector databases" }
48d36c0f-2a98-4956-aad2-368cb780b4c8
[ { "from": "human", "value": "Compare Pinecone, Weaviate, ChromaDB, and pgvector for RAG. How do I connect to each from Python?" }, { "from": "gpt", "value": "Each vector database targets a different part of the spectrum from developer convenience to enterprise scale. Here is a practical comparis...
{ "category": "vector_databases", "context": "choosing and using vector databases" }
2a90aeb9-7557-4879-a15d-4db6dd9678c8
[ { "from": "human", "value": "How do I build a RAG system that generates responses with inline citations linking back to source documents?" }, { "from": "gpt", "value": "Citation generation ensures every claim in the answer is traceable to a specific source, which is critical for legal, medical, ...
{ "category": "citation_generation", "context": "generating cited responses linked to source documents" }
8ff025da-2c5b-4315-b324-28bb65fa2537
[ { "from": "human", "value": "My RAG system has poor answer quality. How do I diagnose whether the problem is low recall, hallucinations, or context stuffing, and fix each?" }, { "from": "gpt", "value": "Poor RAG quality always traces back to one of three failure modes: the right document was nev...
{ "category": "retrieval_evaluation", "context": "debugging RAG failures — low recall, hallucinations, context stuffing" }
32560531-654f-4e30-8751-b01c944af6b9
[ { "from": "human", "value": "How do I optimize a RAG system for production — caching, latency, and cost at scale?" }, { "from": "gpt", "value": "Production RAG at scale has three main cost centres: embedding API calls, vector search latency, and LLM generation tokens. Here is how to tackle each....
{ "category": "rag_production", "context": "RAG caching, latency optimization, and cost control" }
9e37e839-2015-48f1-bcd5-fe3d816c199b
[ { "from": "human", "value": "What are advanced RAG patterns like HyDE, RAG-Fusion, FLARE, and Self-RAG? Give me code examples for at least two of them." }, { "from": "gpt", "value": "Advanced RAG patterns address the core weaknesses of naive retrieval: query-document mismatch, single-query blind...
{ "category": "rag_architecture", "context": "advanced RAG patterns" }
96680067-cbb3-4f93-b9b1-8df2eae72174
[ { "from": "human", "value": "How do I handle different document types — PDFs, HTML pages, code files, and tables — when ingesting data into a RAG system?" }, { "from": "gpt", "value": "Different document types require specialised loaders and parsers. Using the wrong one loses structure (table ce...
{ "category": "document_ingestion", "context": "handling PDF, HTML, code, and tables in RAG pipelines" }
e2d1f4ab-90fb-4029-9607-64d6e07ccf0d
[ { "from": "human", "value": "How do I build a RAG system that generates responses with inline citations linking back to source documents?" }, { "from": "gpt", "value": "Citation generation ensures every claim in the answer is traceable to a specific source, which is critical for legal, medical, ...
{ "category": "citation_generation", "context": "generating cited responses linked to source documents" }
243feb0c-05db-492d-9140-f71ed899eb8b
[ { "from": "human", "value": "How does reranking improve RAG? Show me how to implement a reranking step using Cohere and FlashRank." }, { "from": "gpt", "value": "Initial retrieval (BM25 or dense ANN) optimises for speed: it runs a single dot product against all vectors. Rerankers run a slower bu...
{ "category": "reranking", "context": "cross-encoder reranking in RAG" }
44fef4e0-7402-4d9b-aadd-3d11efa66609
[ { "from": "human", "value": "How do I optimize a RAG system for production — caching, latency, and cost at scale?" }, { "from": "gpt", "value": "Production RAG at scale has three main cost centres: embedding API calls, vector search latency, and LLM generation tokens. Here is how to tackle each....
{ "category": "rag_production", "context": "RAG caching, latency optimization, and cost control" }
054d4cc9-bfbe-488a-99e9-ed24ca852a81
[ { "from": "human", "value": "How do I handle different document types — PDFs, HTML pages, code files, and tables — when ingesting data into a RAG system?" }, { "from": "gpt", "value": "Different document types require specialised loaders and parsers. Using the wrong one loses structure (table ce...
{ "category": "document_ingestion", "context": "handling PDF, HTML, code, and tables in RAG pipelines" }
f3b34d4e-430f-4be4-9e99-1c5480377cfa
[ { "from": "human", "value": "How do I choose between text-embedding-3-small, BGE embeddings, sentence-transformers, and Cohere Embed for my RAG system?" }, { "from": "gpt", "value": "Embedding model choice affects retrieval quality, latency, and cost more than any other single component. Here is...
{ "category": "embedding_models", "context": "comparing embedding models for RAG" }
f1c48fb8-0aa5-4748-8f5f-bcb81fe1ce7f