TaxWiki India is a demonstration repository that showcases the "Wiki Way" of building LLM-powered knowledge bases for legal professionals. It specifically addresses why the Wiki Way (compounding, structured knowledge) is superior to Traditional RAG (stateless retrieval) for high-stakes domains like Indian Tax Law.
Traditional RAG systems find "chunks" of text at query time. In the legal world, this leads to Context Collision: the AI sees an old threshold (e.g., ₹50 Lakhs) and a new amended threshold (e.g., ₹75 Lakhs) in the same prompt and becomes confused.
TaxWiki India solves this by:
- Hierarchical Parsing: Breaking Acts into Sections, Sub-sections, and Provisos.
- Evolution Engine: When a new Amendment/Notification arrives, the system patches the existing Wiki page for that section instead of just indexing a new file.
- One Source of Truth: The AI always reads the current state of the law, with a clear "Amendment History" at the bottom of the page.
knowledge_base/:raw_source/: Immutable official documents (Bare Acts, Finance Acts).wiki/: The living, LLM-generated repository representing the status quo.
core/:wiki_parser.py: Structures raw legal text into Wiki pages.wiki_maintainer.py: The evolution engine that patches wiki pages with new amendments.query_engine.py: Comparison tools for Wiki vs RAG.
dashboard/: A premium side-by-side visualization of the results.
-
Clone the repo:
git clone https://github.com/subhamlistingsmanager/CA_wikiIndia.git cd CA_wikiIndia -
Run the demo:
- To build the initial wiki:
python3 core/wiki_parser.py - To apply the 2023 amendments:
python3 core/wiki_maintainer.py
- To build the initial wiki:
-
View the Comparison: Open
dashboard/index.htmlin any browser to see the side-by-side comparison of the Wiki Way vs Traditional RAG.
This is an experimental demonstration tool and not a substitute for professional tax advice or literal interpretation of the Income Tax Act.