Skip to content

ca-who-codes/CA_wikiIndia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TaxWiki India: Compounding Legal Knowledge for CAs

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.

🌟 The Core Innovation: Wiki Way vs RAG

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:

  1. Hierarchical Parsing: Breaking Acts into Sections, Sub-sections, and Provisos.
  2. 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.
  3. 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.

📂 Project Structure

  • 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.

🚀 Getting Started

  1. Clone the repo:

    git clone https://github.com/subhamlistingsmanager/CA_wikiIndia.git
    cd CA_wikiIndia
  2. Run the demo:

    • To build the initial wiki: python3 core/wiki_parser.py
    • To apply the 2023 amendments: python3 core/wiki_maintainer.py
  3. View the Comparison: Open dashboard/index.html in any browser to see the side-by-side comparison of the Wiki Way vs Traditional RAG.

⚖️ Disclaimer

This is an experimental demonstration tool and not a substitute for professional tax advice or literal interpretation of the Income Tax Act.

About

LLM Wiki for Indian tax law (Income Tax Act + GST) — demonstrates why LLM Wiki beats traditional RAG for legal documents that self-update on amendments

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors