Getting Started
Prerequisites
- Python 3.11+
- pip or Docker
Option A: Docker (recommended)
git clone https://github.com/dsantoreis/askbase.git && cd askbasedocker-compose upThe API starts at http://localhost:8080 with sample docs pre-loaded via --seed.
Option B: Local install
git clone https://github.com/dsantoreis/askbase.git && cd askbasepython3 -m venv .venv && source .venv/bin/activatepip install -e '.[dev]'Ingest documents
Drop your .txt, .md, or .pdf files into a folder and ingest them:
rag ingest docs/ data/seed/This chunks, embeds (TF-IDF), and indexes everything into artifacts/rag_index.pkl.
Start the server
rag serve --seed --host 0.0.0.0 --port 8080--seed auto-ingests data/seed/ on first run if no index exists yet.
Ask a question
curl -s -X POST http://localhost:8080/ask \ -H "Authorization: Bearer user-demo-token" \ -H "Content-Type: application/json" \ -d '{"query": "How do I reset my password?"}' | python3 -m json.toolYou get a grounded answer with citations pointing to exact document locations.
CLI commands
| Command | What it does |
|---|---|
rag ingest <paths...> | Chunk and index documents |
rag ask "<question>" | Query the index from the terminal |
rag serve | Start the FastAPI server |
rag evaluate --dataset eval.json | Run context precision evaluation |
rag status | Show index stats (chunk count, path) |
CLI options
# Custom chunk size and overlaprag ingest docs/ --chunk-size 300 --overlap 50
# JSON output for scriptingrag ask "What plans exist?" --json --top-k 5
# Custom index pathrag serve --index /data/production.pkl --port 9090Next steps
- API Reference for full endpoint docs
- Architecture for how the pipeline works
- Deployment for production setup with Kubernetes