Vectorless, agentic QA over the Cyber Ireland 2022 report. ETL ingests the PDF into a PageIndex tree + node map; a single /chat endpoint orchestrates retrieval, math tooling, and streaming answers with citations.
Query test logs: see test_queries directory for the three evaluation scenarios.
- FastAPI backend with LangGraph orchestration
- PageIndex for document ingestion and hierarchical retrieval
- DeepSeek (OpenAI-compatible) for reasoning + tool calls
- Sympy math tool (strict function-calling protocol)
- Static frontend (vanilla HTML/JS) with streamed NDJSON and Mermaid rendering
- Setup — environment, env vars
- ETL — pipeline steps, artifacts
- Backend — endpoints, prompts, flow
- Frontend — UI usage
- Architecture — high-level flow and justification slots
pip install -r requirements.txt
cp .env.example .env # fill PAGEINDEX_API_KEY, API_KEY, BASE_URL, MODELS
python run_etl.py # runs the ETL piepline and generates doc_id, tree, node_map
uvicorn src.backend.api:app --reload # starts backend endpoint
# open src/frontend/index.html (or serve via python -m http.server -d src/frontend 5500)- Data artifacts (
data/processed/*) and logs are git-ignored; regenerate via ETL. /chatstreams NDJSON events: meta → tool (if math) → reason → answer → done.