#rag
24 articles
Long Context vs RAG: The Million-Token Question
When does stuffing a million tokens beat retrieval? The empirics on lost-in-the-middle accuracy, context-stuffing costs, and when RAG still wins at 1M tokens.
Text-to-SQL and Structured Data Retrieval
How to build production text-to-SQL systems: schema injection, SQL generation, execution sandboxing, error-retry loops, and NL-to-Cypher for graph databases.
Indirect Prompt Injection: The Attack Hiding in Your Data
How attackers embed instructions inside documents, emails, and tool outputs that your LLM retrieves and obeys — and the defenses that actually reduce the blast radius.
Document Ingestion Pipelines: The Unglamorous 80% of RAG
PDF parsing, metadata design, PII scrubbing, chunk-at-ingest vs chunk-at-query, and incremental index updates — the ingestion work that determines whether RAG succeeds or fails.
Agent Memory Architectures: Episodic, Semantic, Procedural
How production agents store and recall knowledge across sessions — episodic logs, semantic stores, procedural caches, and sane forgetting policies.
RAG evaluation, failure modes, and when to use long context or fine-tuning instead
Measure a RAG pipeline with RAGAS, spot the failure modes that kill production quality, and decide between RAG, long context, or fine-tuning.
Metadata Filtering, Scaling, and Production Cost Control
How metadata filtering interacts with ANN indexes, multi-tenancy patterns, quantization tradeoffs, and why your vector DB bill runs 2.5–4x over forecast at scale.
Hallucination mitigation and output validation for production systems
Factuality vs. faithfulness, grounding techniques, structured outputs, LLM-as-judge, and conformal prediction — practical controls that reduce hallucination in deployed LLMs.
Agentic RAG: When Retrieval Becomes a Reasoning Loop
Agentic RAG swaps single-shot retrieval for a decision loop — retrieve, judge, rewrite, repeat. The patterns, failure modes, and when it pays off.
Hybrid Search: Fusing Dense Vectors and Sparse BM25 Correctly
Combine vector search and BM25 without ruining either — RRF, score normalization, dynamic weighting, and the failure modes that drop precision.
RAG Evaluation with Ragas: Measuring Retrieval and Generation Separately
Measure retrieval and generation separately with RAGAS — faithfulness, context precision, answer relevancy — and catch the failures end-to-end scores hide.
GraphRAG and Structured Retrieval for Multi-Hop Reasoning
How knowledge graphs replace flat vector indexes to answer multi-hop and global queries flat retrieval cannot handle — with real costs, when to use it, and when not to.
Vector Database Landscape 2026: Pinecone, Qdrant, Weaviate, Milvus, pgvector
A hardheaded comparison of Pinecone, Qdrant, Weaviate, Milvus, and pgvector: architecture, real costs, hybrid search maturity, and when each wins in production.
Multimodal RAG: retrieving images, PDFs, and text together
Build a RAG pipeline that handles mixed corpora of images, charts, and PDFs — covering embedding strategy, retrieval architecture, and production failure modes.
Query Transformation: Rewriting, HyDE, and Multi-Query Expansion
How query rewriting, HyDE, multi-query expansion, and step-back prompting close the gap between what users type and what your retrieval index can actually find.
Agent Memory: From Context Window to Persistent Knowledge
How agents remember things across tool calls, sessions, and deployments — in-context working memory, episodic stores, semantic vector DBs, and when each breaks.
Hybrid Search: BM25 Plus Dense Retrieval Plus Reranking
How to combine BM25 keyword search with dense vector retrieval and a cross-encoder reranker to build a RAG pipeline that beats either approach alone.
Choosing an embedding model in 2026: OpenAI, Cohere, Gemini, Voyage, and open-source
A decision framework for picking an embedding model: MTEB scores, latency, cost, multimodal needs, and when to self-host — with 2026 benchmarks.
Chunking Strategies That Actually Matter: From Fixed-Size to Late Chunking
Chunking is the highest-variance, least-discussed decision in RAG. The wrong strategy silently kills retrieval quality no matter how good your embeddings are.
The Decision Ladder: Fine-Tuning vs RAG vs Prompting
A concrete decision framework for when prompting, RAG, or fine-tuning pays off — grounded in real cost, latency, and data trade-offs, not vendor marketing.
RAG from Scratch: Ingestion, Retrieval, and Generation in One Pass
Build a working RAG pipeline end-to-end — parse, chunk, embed, index, retrieve, and generate — understanding every decision before layering on complexity.
What Are Embeddings? Geometry, Meaning, and the Math That Makes Them Work
How embedding models project text into vectors, what semantic neighborhoods mean in practice, and where the math breaks down in production RAG.
RAG in One Pass: Build, Measure, Improve
Build a complete RAG pipeline end-to-end — ingest, chunk, embed, index, retrieve, generate — with evaluation wired in from day one so you catch failures before users do.
Embeddings and Vector Databases That Scale
What embeddings really encode, how ANN indexes work, which vector database to pick at your scale, and the metadata-filtering pitfalls that quietly destroy recall in production.