// ai · rag
knowledge-base-ai
Problem
There are a thousand RAG demos; most answer questions about a single PDF and send every paragraph to a cloud API to do it. What’s missing: a system that turns mixed sources (PDFs, YouTube transcripts, web pages) into one knowledge base, checks answers against multiple sources — and runs locally when the documents are sensitive.
Approach
An ingest pipeline categorizes documents from arbitrary domains and stores them in Qdrant with metadata. Retrieval is metadata-aware — it filters by domain and document type instead of searching blindly across everything. Answers pass through a cross-reference fact check with confidence scoring: what only one source claims is flagged as exactly that. FastAPI at the core, SvelteKit UIs for use and administration, Docker Compose including a GPU variant.
Decisions
- Privacy-first as architecture, not as an option. The whole stack can run on local Ollama — embeddings and generation included. Cloud models are the special case, not the default.
- Fact checking over trust. A RAG system that doesn’t verify its own answers against the sources is a hallucination with a citation apparatus.
Status & learnings
Running locally for my own use. The learning lives in retrieval: quality comes from metadata and filtering, not from the model — if you’re sloppy at ingest, no prompt will save you.