Skip to main content

Retrieval-Augmented Generation (RAG)

9 articles · written by Niraj Kumar

Retrieval-Augmented Generation is the pattern behind most useful LLM products: instead of fine-tuning a model on your data, you retrieve the relevant passages at query time and put them in the prompt. It is easy to demo and hard to ship — the difficulty is never the LLM call, it is chunking, retrieval quality, tenant isolation, and knowing when your answers have quietly degraded.

These articles work through that gap. They cover the ingestion side (document parsing, chunk sizing, embedding choice), the retrieval side (pgvector similarity search, PostgreSQL full-text search, Reciprocal Rank Fusion for hybrid scoring, rerankers, and graph traversal for multi-hop questions), and the operational side (per-tenant isolation with Row-Level Security, cost attribution, and evaluation harnesses that catch regressions before users do).

Every guide is written against a concrete stack rather than pseudocode — mostly PostgreSQL with pgvector, LangChain or LangGraph, and Next.js or Node.js — and each one names the trade-off it is making.

New to the topic? Start with the RAG Architecture Guide — the end-to-end overview these tutorials build on.

Need this built rather than explained?

Custom RAG chatbots with LangChain, pgvector/Pinecone, and citation tracking.

RAG Chatbot Development

Related topics

← All articles