How tetra4ge/interlock-tg works
Interlock builds a temporal corporate-disclosure knowledge graph and answers governance questions through three comparable retrieval architectures: RAG, GraphRAG, and an agentic GraphRAG. Its user-facing workflow is a question sent through the API, answered by a selected pipeline, then presented with evidence; the dashboard also supports live asking, pipeline comparison, quality inspection, and human review of flagged facts. Ingest, parsing, extraction, entity resolution, graph construction, and evaluation are major supporting capabilities. Some subsystem links are based on README descriptions or the SOURCE INDEX; unsampled implementation details are not asserted.
Main entry points: api HTTP API · rag.py Standard RAG · graphrag/pipeline.py GraphRAG · agent/pipeline.py Agentic GraphRAG
Components 24
Disclosure corpus
- Document acquisition
server/ingest/fetcher.py - Disclosure sources
server/ingest/sources - PDF parsing
server/parse/pdf.py - Section chunking
server/parse/chunk.py
Knowledge construction
- Fact extraction
server/extract/runner.py - Grounding review
server/extract/review.py - Entity resolution
server/resolve/mentions.py - Graph loading
server/graph/loader.py - TigerGraph
- Vector retrieval index
server/embed/index.py - Run and corpus store
server/store/db.py
Answering pipelines
- Standard RAG
server/pipelines/rag.py - GraphRAG
server/pipelines/graphrag/pipeline.py - Agentic GraphRAG
server/pipelines/agent/pipeline.py - LLM gateway
server/llm/gateway.py
API and dashboard
- HTTP API
server/api - Research dashboard
dashboard/src/app - Live ask UI
dashboard/src/components/LiveAsk.tsx - Pipeline inspector
dashboard/src/app/inspector/page.tsx - Quality views
dashboard/src/app/data-quality/page.tsx - Review queue UI
dashboard/src/app/review-queue/page.tsx
Evaluation and review
- Evaluation harness
server/eval/runner.py - Quality reporting
server/reporting/quality.py
Other components
- Research user
Connections 31
- Research user → Research dashboard: asks and inspects
README.md - Research dashboard → HTTP API: requests data
README.md - Live ask UI → HTTP API: submits question
- HTTP API → Standard RAG: dispatches pipeline
- HTTP API → GraphRAG: dispatches pipeline
- HTTP API → Agentic GraphRAG: dispatches pipeline
- Disclosure sources → Document acquisition: provides filings
README.md - Document acquisition → PDF parsing: fetches for parsing
- PDF parsing → Section chunking: produces text
- Section chunking → Vector retrieval index: embeds chunks
server/embed/index.py - Section chunking → Fact extraction: supplies disclosure text
- Fact extraction → Grounding review: flags facts
README.md - Fact extraction → Entity resolution: resolves extracted entities
- Entity resolution → Graph loading: links entities
- Graph loading → TigerGraph: loads graph
README.md - Standard RAG → Vector retrieval index: retrieves chunks
server/pipelines/rag.py - Standard RAG → LLM gateway: generates answer
server/pipelines/rag.py - GraphRAG → TigerGraph: expands subgraph
README.md - GraphRAG → Vector retrieval index: falls back to retrieval
server/pipelines/graphrag/pipeline.py - GraphRAG → LLM gateway: generates answer
server/pipelines/graphrag/pipeline.py - Agentic GraphRAG → LLM gateway: runs and verifies
server/pipelines/agent/pipeline.py - Agentic GraphRAG → TigerGraph: traverses with tools
README.md - Agentic GraphRAG → Vector retrieval index: searches text
README.md - Standard RAG → Run and corpus store: reads excluded docs
server/pipelines/rag.py - Evaluation harness → Standard RAG: scores pipeline
server/eval/runner.py - Evaluation harness → GraphRAG: scores pipeline
server/eval/runner.py - Evaluation harness → Agentic GraphRAG: scores pipeline
server/eval/runner.py - Quality views → Quality reporting: shows quality stats
- Review queue UI → Grounding review: reviews flagged facts
README.md - Pipeline inspector → HTTP API: loads run details
- Quality reporting → Run and corpus store: reads run metrics