How nikhilrana2076/ixbrl-qa-demo works
TagTrace is a web app for answering questions about UK company accounts using tagged iXBRL facts rather than unconstrained report reading. The main workflow is upload, parse and store a filing, retrieve relevant tagged facts for a question, then verify the model’s cited evidence before displaying an answer. The graph also preserves documented overview, ratios and fact-explorer capabilities. Relationships are limited to README statements and the supplied source excerpts or index; some unsampled internals are therefore not linked.
Main entry points: __init__.py Web routes · answering.py Answer verification · store.py SQLite fact store · ingest.py Upload handling
Components 18
Web experience
- Web routes
webapp/__init__.py - Filing sessions
webapp/sessions.py
Filing ingestion
- Upload handling
webapp/ingest.py - iXBRL parser
src/ingestion/parser.py - Fact store loader
src/ingestion/store.py - SQLite fact store
src/ingestion/store.py
Evidence and answers
- Question retrieval
src/generation/adhoc_retrieval.py - Fact retrieval
src/generation/retrieval.py - Answer verification
webapp/answering.py - Metered LLM client
webapp/llm.py - Anthropic client
src/generation/client.py - OpenAI client
src/generation/openai_client.py
Filing insights
- Filing overview
webapp/overview.py - Key ratios
webapp/ratios.py - Fact formatting
webapp/formatting.py - Fact explorer
webapp/__init__.py
Other components
- Visitor
- LLM providers
Connections 24
- Visitor → Web routes: uses
README.md - Web routes → Upload handling: routes upload
webapp/__init__.py - Upload handling → iXBRL parser: parses filing
webapp/ingest.py - Upload handling → Fact store loader: loads facts
webapp/ingest.py - Fact store loader → SQLite fact store: writes facts
README.md - Web routes → Filing sessions: manages sessions
webapp/__init__.py - Web routes → Filing overview: builds overview
webapp/__init__.py - Filing overview → SQLite fact store: reads facts
README.md - Web routes → Key ratios: shows ratios
README.md - Key ratios → Fact formatting: formats figures
webapp/ratios.py - Web routes → Fact explorer: serves fact search
webapp/__init__.py - Visitor → Answer verification: asks question
README.md - Web routes → Answer verification: routes question
webapp/__init__.py - Answer verification → Question retrieval: retrieves evidence
webapp/answering.py - Question retrieval → Fact retrieval: uses search
src/generation/adhoc_retrieval.py - Question retrieval → SQLite fact store: queries facts
README.md - Answer verification → Metered LLM client: requests answer
README.md - Metered LLM client → Anthropic client: selects provider
webapp/llm.py - Metered LLM client → OpenAI client: selects provider
webapp/llm.py - Anthropic client → LLM providers: calls API
src/generation/client.py - OpenAI client → LLM providers: calls API
src/generation/openai_client.py - Answer verification → SQLite fact store: hydrates citations
webapp/answering.py - Answer verification → Fact formatting: formats answer
webapp/answering.py - Answer verification → Visitor: returns verified card
README.md