A local, privacy-first Retrieval-Augmented Generation (RAG) chat app. Upload documents, ask questions, and get answers with sources—powered by open-source LLMs running on your own machine.
unstructured, python-docx, pdfplumber)./api route organization.mistral (chat) and nomic-embed-text (embeddings)ollama serve (must be running for backend to work)bash
brew install ollamabash
ollama servebash
ollama pull mistral
ollama pull nomic-embed-textmistral: Used for chat and answering questionsnomic-embed-text: Used for document embeddingsYou can substitute
mistralwith any compatible model (e.g.llama3,llama2), but the backend defaults tomistral.
bash
cd backend
python -m venv .venv
source .venv/bin/activatebash
pip install --upgrade pip
pip install -r requirements.txtbash
uvicorn app.main:app --reloadbash
cd frontend
npm installbash
npm run devmistral and nomic-embed-text models pulledollama serve runningollama serve is running in a terminal window before starting the backend.llama3 and nomic-embed-text models.ollama list.pip is up to date.node_modules if issues persist.libmagic and poppler-utils (see backend gotchas).backend/gotchas.md and backend/implementation_details.md.langchain-ollamaChatRAG/
backend/
app/
main.py # FastAPI app & API endpoints
db/ # Database models & session
rag/ # RAG pipeline logic
requirements.txt
...
frontend/
src/
components/ # UI components (Chat, Files, Layout)
state/ # Zustand stores
...
vite.config.ts
...
backend/app/main.py (OllamaLLM(model="mistral")).frontend/src/components.backend/implementation_details.md, gotchas.md, and quick_reference.md.$ claude mcp add Local_Chat_RAG \
-- python -m otcore.mcp_server <graph>