Joel Stevick

RAG pipeline builder

A RAG (retrieval-augmented generation) pipeline answers questions from your own documents: it finds the passages that bear on a question, then has a model write the answer from those passages only, citing them. Pick the options below and download a working one, in TypeScript or Python. Every citation it shows is checked in code, and it says "I don't know" when your documents don't answer. It runs and passes its own tests straight after unzipping, with no key.

The zip is built in your browser from templates, and the same choices always give the same files. Documents you drop are read in your browser and never sent anywhere. As with every click on this site, a click on Download is recorded with the options you chose, and a click on Apply with the chunking and widening it set; nothing read from a file is recorded. Privacy

Language
Embeddings
Vector store
Chunking
Retrieval
Reranker
Widening
Eval harness
Run with

Not sure? Let your documents choose

Drop a few of the documents your pipeline will answer from (PDF, Markdown, HTML or text). They are read in this browser only, never uploaded: the page counts headings and numbered sections, measures the paragraphs, and recommends a chunking and a widening you can apply.

What you get

  • The pipeline, as a library. One folder with one entry point, createPipeline (create_pipeline in Python), that you can copy into an existing backend: read PDF, Markdown, HTML and text; chunk; embed; store; retrieve; rerank; widen; answer with citations; check every citation; fall back.
  • A command line. ingest <folder> and ask "<question>", and --offline to try both with no key.
  • Tests that run offline. A fake embedder and a fake model stand in for the real ones, so every component and the whole pipeline are tested on the sample documents with no key and no network.
  • An eval harness, if you include it: a golden set for the sample documents, a runner that scores retrieval hit rate, citation validity, fact recall and fallback correctness, a compare command, a CI workflow, and draft-golden, which has Claude draft cases from your own documents for you to review.
  • Yours to use. The code is yours to use, change and ship, in any project, commercial or not: the zip includes an MIT LICENSE for you to put your name in.
  • A README that explains each stage for an engineer new to RAG, shows how to call the pipeline from an Express, Next.js or FastAPI route, and how to change an option later.

To learn how each stage works, the free video series builds a pipeline like this one a step at a time, and the book explains it chapter by chapter. To try a pipeline on your own PDFs first, ask your docs. To give an AI application such as Claude Code tools of your own, the MCP server builder gives you a working MCP server.