All work · Retrieval and agents
Local RAG API
Local-first retrieval-augmented generation
- Solo
- February 2026
What it is
A local-first RAG backend: upload a PDF or text file, then ask questions of it. Every answer comes back with its sources and the time it took.
How it works
Ingest–retrieve–generate pipeline on local models, with cited answers
Three FastAPI endpoints: a health check, a multipart ingest for PDF and TXT, and chat. Ingested text is split recursively into 1000-character chunks with 200 characters of overlap, embedded with all-MiniLM-L6-v2 and stored in an embedded ChromaDB. A question retrieves the three nearest chunks and generation runs through Ollama, with an optional OpenAI path. The chat response returns the answer together with its sources and inference time, so a caller can check where an answer came from.