document-intelligence

Quickstart

0. Requirements

1. Install

git clone https://github.com/sachncs/document-intelligence
cd docendo
pip install -e .

For development extras:

pip install -e ".[dev]"

2. Configure

cp .env.example .env
# Edit .env:
#   CHAT_KEY                   (chat model key)
#   CHAT_URL                   (default: https://api.minimax.io/v1)
#   CHAT_MODEL                 (default: MiniMax-M3)
#   VECTOR_KEY                 (your Qwen endpoint key)
#   VECTOR_BASE                (your Qwen endpoint base URL, no trailing /v1)
#   VECTOR_MODEL               (default: Qwen/Qwen3-Embedding-8B)
#   TOKENIZER_MODEL            (default: Qwen/Qwen3-Embedding-8B; must match)
#   VECTOR_DIMS                (default: 4096; verified at startup by checkup)

3. Sanity check

docendo checkup
# All checks should pass: paths, chat_creds, tokenizer_match, sqlite_opens,
# vector_extension, embeddings, tokenizer_load.

For offline CI runs:

docendo checkup --no-embedding --no-tokenizer

4. Run the pipeline

# Scrape RBI and download PDFs into data/raw/.
docendo fetch

# Extract, chunk, embed, and store in SQLite (data/processed/docendo.sqlite3).
docendo ingest

# Run 5 eval cases and write reports/results.jsonl.
docendo eval --limit 5

# Generate reports/eval_report.md from results.jsonl.
docendo report

# Launch the Streamlit A/B demo on http://localhost:8501.
docendo demo

5. Iterate

Re-running docendo ingest skips any PDF whose content_hash is unchanged, so it makes zero embedding calls on an unchanged corpus. To force re-embedding, delete the SQLite database (rm data/processed/docendo.sqlite3) or remove specific rows by hand.

Troubleshooting