Intelligent tax strategy engine — AI-powered deduction discovery using RAG over the IRC tax code.
TaxCode AI scans your financial documents and cross-references 75,000+ pages of IRC tax code to find every legitimate deduction you're entitled to.
- Multi-Format Support — PDF, Excel, CSV upload
- OCR Extraction — Automatic data extraction from scanned docs
- Smart Categorization — AI classifies income and expenses
- RAG-Powered Search — Semantic search over full IRC tax code
- Section Matching — Links your data to relevant tax sections
- Plain English Explanations — Translates legalese to actionable advice
- Deduction Discovery — Finds deductions you might have missed
- Savings Calculator — Dollar value of each optimization
- Compliance Scoring — Audit-readiness assessment
┌─────────────────────────────────────────────────────────┐
│ 📋 TaxCode AI - Intelligent Tax Strategy Engine │
├─────────────────────────────────────────────────────────┤
│ │
│ 💰 Optimization Results │
│ ┌────────────────┬────────────────┬────────────────┐ │
│ │ $47,832 │ 14 Deductions │ 100% │ │
│ │ Savings │ Found │ Compliance │ │
│ └────────────────┴────────────────┴────────────────┘ │
│ │
│ 📄 Deduction Breakdown │
│ ┌─────────┬──────────────────────────┬───────────┐ │
│ │ § 179 │ Business Property Expense │ $18,200 │ │
│ │ § 199A │ QBI Deduction │ $12,450 │ │
│ │ § 401(k)│ Retirement Contributions │ $6,500 │ │
│ │ § 280A │ Home Office │ $4,200 │ │
│ │ § 170 │ Charitable Contributions │ $3,800 │ │
│ │ § 164 │ SALT Deduction │ $2,682 │ │
│ └─────────┴──────────────────────────┴───────────┘ │
└─────────────────────────────────────────────────────────┘
┌────────────────┐ ┌────────────────┐ ┌────────────────┐
│ Upload Docs │ → │ AI Extracts │ → │ IRC Lookup │
│ PDF / Excel │ │ Income/Expense│ │ RAG Search │
└────────────────┘ └────────────────┘ └────────────────┘
│
┌────────────────┐ ┌────────────────┐ │
│ Compliance │ ← │ Deductions │ ←─────────┘
│ Check │ │ Identified │
└────────────────┘ └────────────────┘
| Component | Technology |
|---|---|
| Frontend | Streamlit |
| Document Processing | PyPDF2, pandas |
| Vector Search | LanceDB |
| AI Engine | Groq API |
| Tax Code Data | IRC Sections indexed |
# Clone and setup
git clone https://github.com/nickstafford/taxcodeai.git
cd taxcodeai
pip install -r requirements.txt
# Configure
cp .env.example .env
# Add GROQ_API_KEY
# Run
streamlit run app.py| Category | IRC Section | Description |
|---|---|---|
| Business | § 179 | Equipment & property expense |
| Income | § 199A | Qualified business income |
| Retirement | § 401(k), 403(b) | Retirement contributions |
| Home Office | § 280A | Home office deduction |
| Charitable | § 170 | Charitable contributions |
| State/Local | § 164 | SALT deduction |
TaxCodeAI/
├── app.py # Streamlit entry point
├── data/
│ └── irc_sections/ # Indexed tax code
└── src/
├── document_processor.py
├── irc_scanner.py # RAG over tax code
├── strategy_engine.py
└── compliance_checker.py
This tool is for educational and planning purposes. Always consult a licensed tax professional for filing decisions.
MIT License
Built by Nick Stafford