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
| Category | Detail |
|---|---|
| LLM runtime | Ollama (local HTTP API) |
| Generation model | qwen2.5 |
| Embedding model | nomic-embed-text |
| Vector store | Chroma (embedded, in-process) |
| Backend | Python, FastAPI |
| Frontend | React, 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) -> strPOST /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.