Tanstack Start
Exploration Projects

RAG-259FP

A local Retrieval-Augmented Generation pipeline over a personal document set

Description

A local Retrieval-Augmented Generation pipeline over a personal document set, using a local LLM via Ollama, Chroma for vector search, a FastAPI backend, and a minimal React frontend. The pipeline chunks documents, embeds them, retrieves the most relevant chunks for a query, and generates an answer grounded in that context.

Stack

CategoryDetail
LLM runtimeOllama (local HTTP API)
Generation modelqwen2.5
Embedding modelnomic-embed-text
Vector storeChroma (embedded, in-process)
BackendPython, FastAPI
FrontendReact, TanStack Query

Pipeline

chunk(text) -> list[str]
embed(text) -> list[float]
retrieve(query, k=3) -> list[str]        # via Chroma collection.query()
build_prompt(query, chunks) -> str
generate(prompt) -> str

POST /query {question: str} -> {answer: str, chunks: list[str]}

What I learned

  • Building a full RAG pipeline from scratch: chunking, embedding, retrieval, prompt construction and generation
  • Using Chroma as an embedded, in-process vector store
  • Serving a Python backend with FastAPI alongside a React/TanStack Query frontend
  • Orchestrating local model downloads and startup with a single setup script

Status

Pipeline implemented and running end to end: ingestion, retrieval, and the /query endpoint all work.

Repository

On this page