RAG starter kit, explained

Build an AI grounded in your content

By Claudia Ng · Live demo · Implementation guide · GitHub

My AI assistant is powered by RAG (retrieval augmented generation). This page explains how everything fits together, including steps for how you can deploy one on your own content.

Built with

Python · Streamlit · Supabase · OpenAI

10
Python files
2.6K+
Lines of code
See the loop
01

The RAG loop: query to grounded answer

This path runs in real time on every user question: embed, search, filter, answer. Walk through the steps below.

Progress

Step 1 / 6

1. User message

src/app.py

The app receives the question and hands it to the retrieval flow.

trace

$ app.py ← active Streamlit session

$ read query + limits from config

02

Architecture explorer

Click a line under src/ or a tile to see what that section of the codebase is for.

Repository layout

rag-starter-kit/
├── src/
├── data/ # your Markdown corpus
└── .env.example

Modules (click a tile or a line under src/)

03

End-to-end ingestion path

Batch RAG ingestion pipeline: I run mine on a schedule (e.g. weekly) so new posts are ingested into the database. Tap a stage for details.

04

Configurations

Below are configurations you can adjust to match your content, models, and budget. Tap a key for what each setting does.

Models

Retrieval

Ingest

05

Ship your own AI assistant grounded in your content

Plug-and-play stack

Follow the guide and deploy an AI assistant grounded in your content in ~60 minutes with these steps:

From clone to deploy

1 Clone & configure
2 Set up database
3 Set up credentials
4 Ingest your data
5 Test system
6 Deploy to live URL

Get the Implementation Guide on Substack (paid tier)

I've documented the exact steps that you can use to deploy an assistant on your own content.

Deploy your own grounded assistant in ~60 minutes when you follow the guide.

Follow the implementation guide