Add your description here
Project description
TaxMeMate
A Retrieval-Augmented Generation (RAG) CLI assistant for tax reduction strategies. Feed it your local PDFs and TXTs of tax forms, regulations, and guidelines—TaxMeMate will index the content and let you ask natural-language questions to discover tax-saving opportunities.
Features
- ETL Pipeline: Extracts, cleans, and deduplicates headers from PDF/TXT documents.
- Chunking: Splits text into overlapping 512-token windows for context continuity.
- Vector Indexing: Embeds chunks with Sentence-Transformers and indexes via FAISS for sub-second retrieval.
- RAG Chat: Combines retrieved context with Mistral-3B-Instruct (default) or OpenAI GPT to generate concise, actionable tax advice.
- Fine-Tuning: Supervised fine-tuning pipeline via Unsloth + TRL’s SFTTrainer to specialize responses on custom Q&A datasets.
- Multi-Backend: Supports CUDA, Apple MPS, or CPU for local inference, plus optional OpenAI API fallback.
Installation
# Clone the repo
git clone https://github.com/yourusername/taxmemate.git
cd taxmemate
# Create and activate a Python 3.12+ virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install from PyPI
pip install taxmemate
(Or install directly from source: pip install .)
Commands
All commands are available under the taxmemate entry point:
# Show global help
taxmemate --help
Clean
Extract and clean raw documents into a JSONL corpus.
taxmemate clean <input_dir> <output_file>
# e.g.:
taxmemate clean ./raw_pdfs cleaned.jsonl
Chunk
Tokenize and split cleaned text into overlapping passages.
taxmemate chunk cleaned.jsonl chunks.jsonl [--model MODEL]
# default MODEL: mistralai/Mistral-3B-Instruct-v0.1
Index
Embed chunks and build a FAISS index plus metadata.
taxmemate index chunks.jsonl faiss.index meta.pkl [--embed-model EMBED_MODEL]
Train-SFT
Fine-tune the base LLM on your own Q&A dataset.
taxmemate train-sft sft_data.jsonl sft_model_dir [--model MODEL]
Chat
Interactively ask tax questions with RAG-driven generation.
taxmemate chat faiss.index meta.pkl [--rag-model MODEL] [--openai-model MODEL] [--openai-api-key KEY]
Usage Example
# 1. Clean source PDFs
taxmemate clean ./raw_pdfs cleaned.jsonl
# 2. Chunk into passages
taxmemate chunk cleaned.jsonl chunks.jsonl
# 3. Build the FAISS index
taxmemate index chunks.jsonl faiss.index meta.pkl
# 4. (Optional) Fine-tune on your Q&A
taxmemate train-sft my_sft.jsonl fine_tuned_model/
# 5. Chat for tax advice
taxmemate chat faiss.index meta.pkl
Tip: For snappier responses, use the OpenAI backend:
taxmemate chat faiss.index meta.pkl --openai-model gpt-3.5-turbo --openai-api-key $OPENAI_API_KEY
Configuration
-
DEFAULT_MODEL: Override by passing--modelor--rag-modelflags. -
Environment Variables:
TRANSFORMERS_CACHE,HF_HOME,HF_DATASETS_CACHEfor cache location.OPENAI_API_KEYfor OpenAI chat backend.
Development & Contributing
-
Fork the repository
-
Create a feature branch (
git checkout -b feature/XYZ) -
Install dev dependencies:
pip install -e .[dev]
-
Run tests & linters:
pytest && flake8
-
Submit a pull request
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taxmemate-0.5.1.tar.gz.
File metadata
- Download URL: taxmemate-0.5.1.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6bf43fbdb352f5b3268193f1388f1a5612377789429730c2052793549c19a62
|
|
| MD5 |
7dbe41bb8b95ecc4c90e80e090764cca
|
|
| BLAKE2b-256 |
c5bd0058f19e500dcf09f31e36b5c1eda730829e600c7205f2d9b0a7f29f1e94
|
File details
Details for the file taxmemate-0.5.1-py3-none-any.whl.
File metadata
- Download URL: taxmemate-0.5.1-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec4c6800f99247fd863f475194ea16d23bdb57ffca8e9257ffa27a9d0bbba29f
|
|
| MD5 |
5b2edd9d438cd8acf39e5f30173944d6
|
|
| BLAKE2b-256 |
28aaeeeddcaac9612f56a25e6b00997a832737eb5a4854623ff4de5c0d49ece4
|