Building a RAG API with FastAPI and a Vector Database: Step by Step

Posted on Fri 13 November 2026 in Tutorial • Tagged with GenAI, RAG, FastAPI, vector-database, Python, API, ChromaDB, production

What We're Building

Retrieval-Augmented Generation (RAG) is the pattern where an LLM answers questions using documents you provide, rather than relying only on what it learned during training. It's the foundation of most real-world AI apps: document Q&A, support bots, knowledge assistants.

This post builds a working RAG API …


Continue reading

The "Lost in the Middle" Problem in RAG and How to Work Around It

Posted on Thu 22 October 2026 in GenAI • Tagged with GenAI, RAG, LLM, context-window, retrieval, reranking

Why This Matters

You build a RAG pipeline. Retrieval works: the right chunk is definitely in the top results. You send everything to the LLM, and it still gives a wrong or incomplete answer, as if it never saw the one piece of text that contained the answer.

Very often …


Continue reading

Why Your Chunks Overlap — and Why That's Actually Intentional

Posted on Fri 18 September 2026 in Beginner Guide • Tagged with GenAI, RAG, chunking, vector-database, beginner

Why This Matters

If you've built even a basic RAG pipeline, you've probably run into "chunk overlap" as a setting — usually with some default value like 50 or 200 tokens — and wondered why you'd deliberately want the same text to appear in two different chunks. Doesn't that just waste storage …


Continue reading