How sinsntgit/tax_slm works
This is a framework for a tax-law knowledge graph application, with an Indian income-tax domain pack. The main user workflow is uploading a document, converting and extracting it, loading and embedding its graph content, then asking questions and receiving graph- and vector-grounded answers with citations. The map also preserves validation and domain-pack configuration as distinct capabilities. Some subsystem links are based on README statements or source-index references; unsampled implementation details are not inferred.
Main entry points: pipeline_ops.py Ingestion operations · graphrag.py GraphRAG retrieval · pipeline.py Ingestion dispatcher · neo4j_client.py Neo4j graph
Components 28
User interface
- Web application
framework/webapp/app.py
Tax ingestion
- Ingestion dispatcher
domain_packs/tax/pipeline.py - Tax domain config
domain_packs/tax/config.py - Tax pack
domain_packs/tax/pack.py - Tax prompts
domain_packs/tax/prompts/tax_prompts.py - Act ingestion
domain_packs/tax/converters/ingest_act.py - Case-law ingestion
domain_packs/tax/converters/ingest_caselaw.py - Circular ingestion
domain_packs/tax/converters/ingest_circular.py - Treaty ingestion
domain_packs/tax/converters/ingest_treaty.py
Graph platform
- Ingestion operations
framework/core/ingest/pipeline_ops.py - Graph loader
framework/core/ingest/graph_loader.py - Entity resolution
framework/core/ingest/entity_resolution.py - Provenance
framework/core/ingest/provenance.py - Graph validation
framework/core/ingest/validate.py - Chunk embeddings
framework/core/ingest/embedder.py
Question retrieval
- GraphRAG retrieval
framework/core/retrieve/graphrag.py - Retrieval router
framework/core/retrieve/retrieval_router.py - Category retrieval
framework/core/retrieve/category_retrieval.py - PII masking
framework/core/retrieve/pii.py
Shared services
- Neo4j graph
framework/core/infra/neo4j_client.py - LLM client
framework/core/infra/llm_client.py - LLM observability
framework/core/retrieve/observability.py - Ingestion audit
framework/core/infra/audit_log.py - Runtime settings
framework/core/infra/settings_store.py - Step logging
framework/core/infra/step_logger.py - Environment config
framework/core/infra/dotenv_path.py - Pack loader
framework/cli/pack_loader.py
Other components
- User
Connections 33
- User → Web application: uploads or asks
- Web application → Ingestion dispatcher: starts ingestion
- Ingestion dispatcher → Act ingestion: dispatches Act
- Ingestion dispatcher → Case-law ingestion: dispatches case
- Ingestion dispatcher → Circular ingestion: dispatches circular
- Ingestion dispatcher → Treaty ingestion: dispatches treaty
- Act ingestion → Ingestion operations: loads graph
domain_packs/tax/converters/ingest_act.py - Case-law ingestion → Ingestion operations: loads graph
domain_packs/tax/converters/ingest_caselaw.py - Circular ingestion → Ingestion operations: loads graph
domain_packs/tax/converters/ingest_circular.py - Treaty ingestion → Ingestion operations: loads graph
domain_packs/tax/converters/ingest_treaty.py - Tax pack → Tax domain config: exposes config
- Tax pack → Tax prompts: exposes prompts
- Ingestion operations → Graph loader: loads entities
framework/core/ingest/pipeline_ops.py - Ingestion operations → Neo4j graph: opens session
framework/core/ingest/pipeline_ops.py - Ingestion operations → Ingestion audit: records run
framework/core/ingest/pipeline_ops.py - Graph loader → Entity resolution: resolves entities
framework/core/ingest/graph_loader.py - Graph loader → Provenance: tracks provenance
framework/core/ingest/graph_loader.py - Graph loader → Neo4j graph: writes graph
framework/core/ingest/graph_loader.py - Web application → Graph validation: validates graph
framework/webapp/app.py - Web application → GraphRAG retrieval: runs ask
framework/webapp/app.py - GraphRAG retrieval → Neo4j graph: queries graph
framework/core/retrieve/graphrag.py - GraphRAG retrieval → LLM client: generates queries
framework/core/retrieve/graphrag.py - GraphRAG retrieval → Retrieval router: routes retrieval
framework/core/retrieve/graphrag.py - GraphRAG retrieval → PII masking: masks evidence
framework/core/retrieve/graphrag.py - GraphRAG retrieval → Category retrieval: supports categories
- Chunk embeddings → Neo4j graph: stores vectors
framework/core/ingest/embedder.py - LLM client → LLM observability: traces calls
framework/core/infra/llm_client.py - LLM client → Runtime settings: reads settings
framework/core/infra/llm_client.py - LLM client → Environment config: loads environment
framework/core/infra/llm_client.py - Neo4j graph → Environment config: loads environment
framework/core/infra/neo4j_client.py - Pack loader → Tax pack: loads pack
framework/cli/pack_loader.py - Act ingestion → Tax domain config: uses domain config
domain_packs/tax/converters/ingest_act.py - Act ingestion → Step logging: logs steps
domain_packs/tax/converters/ingest_act.py