How ldele/doc_assistant works
Provenote is a local-first research assistant for searching a personal document library, producing cited answers, and examining answer quality. The main workflow runs from adding documents through indexing, hybrid retrieval, reranking, and answer synthesis to citation inspection and optional review. The desktop client talks to a FastAPI/SSE backend; SQLite and Chroma hold document and vector data. The README documents the broader ingestion and capability branches; unsampled implementation details are represented at subsystem level rather than inferred call-by-call.
Main entry points: __init__.py Ingest runner · App.svelte Desktop workspace · controller.py Chat orchestration · pipeline.py Retrieve and synthesize
Components 23
Desktop and API
- Desktop workspace
apps/desktop/src/App.svelte - FastAPI service
apps/api/main.py - API job services
apps/api/services.py
Document ingestion
- Ingest runner
src/doc_assistant/ingest/__init__.py - Format extraction
src/doc_assistant/extractors.py - Ingest registry
src/doc_assistant/ingest/registry.py - Extraction cache
src/doc_assistant/ingest/cache.py - Embedding models
src/doc_assistant/embeddings.py - Figure sidecar
src/doc_assistant/ingest/figures.py
Question answering
- Chat orchestration
src/doc_assistant/chat_controller/controller.py - Retrieve and synthesize
src/doc_assistant/pipeline.py - LLM providers
src/doc_assistant/llm.py - Answer provenance
src/doc_assistant/provenance.py - Chroma vectors
Library and knowledge
- Library data access
src/doc_assistant/library/__init__.py - SQLite records
src/doc_assistant/db/session.py - Document models
src/doc_assistant/db/models.py - Document import
src/doc_assistant/library/add.py - Zotero catalogue
src/doc_assistant/adapters/catalogue.py - Concept graph and gaps
src/doc_assistant/knowledge/concept_skeleton.py
Quality and review
- Answer reviewer
src/doc_assistant/reviewer.py - Evaluation harness
src/doc_assistant/eval/runner.py
Other components
- Researcher
Connections 24
- Researcher → Desktop workspace: uses
README.md - Desktop workspace → FastAPI service: requests
README.md - FastAPI service → API job services: wires jobs
apps/api/main.py - API job services → Ingest runner: runs ingest
apps/api/services.py - Ingest runner → Format extraction: extracts formats
README.md - Ingest runner → Ingest registry: registers ingestion
README.md - Ingest runner → Extraction cache: caches extraction
README.md - Ingest runner → Embedding models: builds vectors
README.md - Embedding models → Chroma vectors: writes vectors
README.md - Ingest runner → SQLite records: stores documents
README.md - Ingest runner → Figure sidecar: derives figures
README.md - Desktop workspace → Chat orchestration: starts chat
README.md - Chat orchestration → Retrieve and synthesize: retrieves and streams
src/doc_assistant/chat_controller/controller.py - Retrieve and synthesize → Chroma vectors: retrieves vectors
README.md - Retrieve and synthesize → LLM providers: generates answers
README.md - Chat orchestration → Answer provenance: records provenance
README.md - Desktop workspace → Library data access: browses library
README.md - Library data access → SQLite records: reads and writes
src/doc_assistant/library/__init__.py - SQLite records → Document models: maps records
src/doc_assistant/db/session.py - Desktop workspace → Document import: adds documents
README.md - Document import → Zotero catalogue: imports Zotero
- Desktop workspace → Concept graph and gaps: explores concepts
README.md - Chat orchestration → Answer reviewer: flags for review
README.md - Evaluation harness → Retrieve and synthesize: evaluates pipeline
README.md