How gargi-09/museum-qa-agent works
Museum Records QA ingests museum-catalogue data, then answers natural-language questions with hybrid local retrieval and one bounded model call. The query workflow enriches retrieved records with curator corrections, duplicate/entity grouping, and contradiction checks before deterministic verification and confidence scoring; results retain cited, used, and unused records. The README documents persistent normalized data, embedding-cache invalidation, and correction overrides. Edges reflect the excerpts and README; unsampled implementation details are not inferred beyond documented capabilities.
Main entry points: reasoning.py Answer orchestration · main.py CLI commands · retrieval.py Hybrid retrieval · ingest.py Record normalization
Components 15
Corpus preparation
- Record normalization
src/ingest.py - Normalized corpus
Question answering
- CLI commands
src/main.py - Hybrid retrieval
src/retrieval.py - Embedding cache
- Answer orchestration
src/reasoning.py - Verified answer
src/reasoning.py
Record quality
- Entity resolution
src/entity_resolution.py - Prose contradiction checks
src/contradiction.py
State and services
- Correction persistence
src/memory.py - Correction records
- Model API client
src/api_client.py
Other components
- Curator
- Questioner
- Model endpoint
Connections 18
- Curator → CLI commands: adds corrections
README.md - Questioner → CLI commands: asks question
README.md - CLI commands → Record normalization: runs ingest
src/main.py - Record normalization → Model API client: fallback extraction
src/ingest.py - Record normalization → Normalized corpus: writes records
README.md - CLI commands → Hybrid retrieval: loads for queries
src/main.py - Normalized corpus → Hybrid retrieval: loads corpus
README.md - CLI commands → Answer orchestration: dispatches question
src/main.py - Hybrid retrieval → Embedding cache: caches embeddings
README.md - Answer orchestration → Hybrid retrieval: ranks candidates
src/reasoning.py - Answer orchestration → Correction persistence: applies overrides
README.md - Correction persistence → Correction records: reads and writes
src/memory.py - Answer orchestration → Entity resolution: groups records
src/reasoning.py - Answer orchestration → Prose contradiction checks: checks descriptions
src/reasoning.py - Answer orchestration → Model API client: requests generation
src/reasoning.py - Model API client → Model endpoint: sends model request
README.md - Answer orchestration → Verified answer: verifies and scores
src/reasoning.py - CLI commands → Verified answer: prints result
src/main.py