AskDoc Local is a fully offline, API-first Retrieval-Augmented Generation (RAG) system built using:
- 🧩 FastAPI – For REST APIs
- 💬 Ollama – For running lightweight LLMs like
mistral
locally - 🔗 LangChain – For document chunking, embedding, and querying
- 📄 PDF/CSV/XLSX/DOCX – Multi-format document support
- 🧠 Chroma (or replaceable) – Local vector store (swappable with FAISS or Weaviate)
Feature | Status |
---|---|
Upload documents (PDF, CSV, XLSX, DOCX) | ✅ |
Parse and chunk text using LangChain | ✅ |
Embed using Ollama models (e.g., mistral) | ✅ |
Store embeddings locally in ChromaDB | ✅ |
Ask questions via /query/ API |
✅ |
Delete single or all documents | ✅ |
Debug API to inspect indexed documents | ✅ |
Reset API to wipe everything clean | ✅ |
git clone https://github.com/sonwanesuresh95/askdoc-local.git
cd askdoc-local
pip install -r requirements.txt
ollama run mistral
Make sure Ollama is running and the model is pulled.
uvicorn app.main:app --reload
POST /upload/
Content-Type: multipart/form-data
Upload .pdf
, .docx
, .csv
, or .xlsx
. The document is parsed, chunked, embedded, and stored.
POST /query/
{
"query": "What is Acme Corp's revenue?"
}
Returns an answer based on uploaded and embedded documents.
DELETE /api/documents/{doc_id}
Deletes uploaded file, parsed .txt
, and embeddings.
POST /reset/
Deletes all uploaded files, parsed text, and vector DB.
GET /debug/vectorstore
Returns a list of indexed documents and their chunk counts.
askdoc-local/
├── app/
│ ├── main.py
│ ├── routes/
│ ├── services/
├── data/
│ ├── documents/ # Uploaded files
│ ├── parsed_text/ # Parsed .txt files
│ ├── vector_store/ # Chroma DB data
│ └── document_index.json
- Uses
OllamaEmbeddings(model="mistral")
fromlangchain_ollama
- You can replace with any local model supported by Ollama (e.g.,
llama2
,codellama
,phi
)
- Frontend UI using React + Material UI
- Weaviate-based vector backend
- Docker + CI/CD setup
- Streamlit Playground UI
Suresh Sonwane
GitHub: @sonwanesuresh95
MIT License