--- type: Roadmap purpose: Carry only what is still ahead — phases, their verify steps, and live risk. answers: - "What is askme building next, and how is each phase verified?" cites: - justfile - src/askme/evaluation/compare.py - src/askme/rag.py - docker-compose.yml --- # askme — roadmap ## Locked decisions TODO(chart) — the why-register: `decisions/index.md` (not written yet). Settled so far, pending a decisions/ entry each: - **Fully local.** Models run in Ollama or a local llama.cpp router; no corpus text goes to an external API — this rules out a hosted RAGAS judge. - **Testsets are private.** Real testsets live in `data/` (gitignored); the repo ships only `eval/*.example.json`. - **Model config lives in the justfile** (`LLM_MODEL`, `EMBEDDING_MODEL`, `EMBEDDING_DIM`, `EVAL_MODELS`); `config.py` keeps fallback defaults. - **Embedding is fixed per store** — guarded by `askme_meta.json` (`src/askme/rag.py:_check_embedding_meta`). - **Publication by snapshot.** Git history contains private testsets, so a cleaned snapshot becomes a fresh `askme-public` repo; this repo stays private. ## Phases 1. **Validate the knowledge graph** — shipped (ingest of 821 docs, 2026-06-17; retrieval eval 10/10). Open: confirm which model built the graph — see Risks. 2. **Test coverage** — test file per source file exists (`tests/`). Open: measure and close gaps to ~70%. **Verify:** `uv run --extra dev pytest tests/ --cov` ≥ 70%. 3. **Query quality** — open. Shipped: one prompt budget for every query path and `num_ctx` 16384 (was 4096, silently truncating). - [x] `naive` vs `hybrid`, qwen2.5:7b as generator and judge, n=20, pinned keywords (2026-11-03): naive faithfulness 0.830 / relevancy 0.801 / context_precision 0.454 vs hybrid 0.668 / 0.781 / 0.268. The current graph hurts retrieval → re-ingest is justified. gemma-4 as second judge agrees on every metric (naive 0.637 / 0.822 / 0.549 vs hybrid 0.528 / 0.801 / 0.484). Tables: `results/2026-11-03-eval.md`. - [ ] Re-ingest (justified by the item above): first ~10 notebooks into a separate store with qwen2.5:7b at 16k, inspect entities, then the full archive (hours to days). Consider feeding extraction prose and markdown rather than every code line. - [ ] Analyse low-faithfulness questions (thin-coverage topics). - [ ] Tune chunk size/overlap; compare query modes per question type. - [ ] Re-ranking if retrieval recall is the bottleneck (LightRAG warns "Rerank is enabled but no rerank model is configured"). - [ ] Query rewrite / synonym expansion (retrieval is vocabulary-sensitive). **Verify:** eval-compare scores move with a fixed judge. 4. **Usability** — shipped: `/health`, `/collections`, `just serve`, usage guide. Open: streaming `/query` responses. 5. **Incremental ingestion** — shipped: manifest + `just ingest-new`. **Verify (still to run):** re-ingest of an unchanged archive inserts 0 docs. 6. **Generator × judge comparison** — built (`just eval-compare`). - [ ] 2×2 pilot, n=20: qwen2.5:7b × gemma-4-12b-qat (running 2026-11-03). - [ ] Decide: full n=50, `pinned` keyword run, more models. **Verify:** `data/eval_compare//comparison.md` written with all cells. 7. **Ingest tuning per run** — model is selectable (`LLM_MODEL`); open: expose `LLM_TIMEOUT` and `MAX_ASYNC` as justfile variables. Parallelism above the Ollama container's `OLLAMA_NUM_PARALLEL` only queues. 8. **Publication** — open. - [ ] Audit tracked files for private content. - [x] Snapshot to `~/Documents/askme-public`, single initial commit. Re-sync with `jj file list | grep -v '^results/' | rsync -a --files-from=- ./ ../askme-public/` — `results/` stays private. - [ ] Create and push the GitHub repo (explicit go-ahead first). **Verify:** grep of the snapshot finds no testset questions or notebook names. 9. **Rootless docker** — open: migrate askme and the other projects' volumes, then disable rootful docker. ## Risks & gotchas - **The knowledge graph is low quality** (checked 2026-11-03: 22,144 entities, 33% `UNKNOWN`, 1.2% `gene`, hubs are `adata` and plotting calls, extraction-example garbage such as `Tokyo2023World…`). Likely cause: truncated extraction prompts (`num_ctx` 4096 at ingest) and/or the `qwen2.5:3b` swap. Hybrid retrieval runs through these entities — the probable reason for low context_precision (0.29–0.37 in the pilot). Phase 3 measures it before any re-ingest. - **Silent CPU fallback** — Ollama runs on CPU without error if CUDA fails inside the container; check `size_vram` via `/api/ps`. See learnings/operations.md. - **Eval wall-clock** — judging is ~90% of matrix cost; a 4×4 × 50 matrix is ~2 days on 8 GB. ## Out of scope - Hosted LLM judges or LLMs (violates fully-local). - PDF ingestion, multi-user isolation, web UI — backlog, unscheduled.