Back to directory

RAG AI Agent Backend

A minimal FastAPI backend that demonstrates retrieval-augmented generation with vector similarity search, built for learning and for wiring into a frontend.

RAG AI Agent Backend

RAG AI Agent Backend is a FastAPI backend demonstrating retrieval-augmented generation (RAG) with vector similarity search, built for educational use and for integration with a frontend such as Next.js.

It uses Supabase and its pgvector extension for vector similarity search, supports both OpenAI and Anthropic as model providers, generates vector embeddings for semantic search, and returns citation-based answers with source tracking. The backend is organized into infrastructure, Pydantic data models, and RAG and embedding services, with a SQL script for initializing the Supabase database.

Setup involves creating a Python virtual environment, installing dependencies, and configuring a Supabase project along with OpenAI and Anthropic API keys; the project also runs in Docker. It is presented alongside a full video walkthrough of building and launching it.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.