Magnetic
AI-powered tax preparation platform for CPA firms
Built the document-AI pipeline and model gateway, the fine-tuned Qwen2.5-VL extraction model, and its evaluation and release gates behind Magnetic, an AI tax preparation platform for CPA firms.
Magnetic: AI-powered tax preparation for CPA firms
99% or higher
Field accuracy, clean W-2 and 1099 scans
under 1%
Critical fields corrected by reviewers
92–97%
Accuracy on K-1 boxes
10–30 points
Fine-tuned gain over base model, rare forms
Stack
Overview
Magnetic is an AI-powered tax preparation platform for CPA firms and tax preparation businesses in the United States. A firm uploads a taxpayer's source documents and receives a prepared draft return for its own tax software, with every fact linked to its source and checked by automated QA and a qualified reviewer.
The central idea: Magnetic turns fragmented taxpayer documents into a traceable, professionally reviewable tax-return preparation workflow.
The problem
Tax preparation work is repetitive and document-heavy, and reading a W-2 is not the difficult part: understanding how many documents fit together is.
- Overlapping documents: two documents can describe the same transaction, and the system must recognize it.
- Long-tail layouts: K-1 statements and brokerage 1099s vary by issuer and create most preparer work.
- Proof of origin: every prepared value has to be traceable to where it came from.
My role
I joined Magnetic as an AI engineer on a small engineering team of four to six engineers. I built two parts of the platform: the document AI pipeline with its model gateway, and the Qwen2.5-VL model I fine-tuned, with its evaluation and release gates. Every return is reviewed by Magnetic's licensed EA/CPA reviewers.
What I built
Document AI pipeline
- A model gateway that routes each document to Azure AI Document Intelligence, Azure OpenAI or the fine-tuned Qwen2.5-VL-7B LoRA adapter by form type and firm policy.
- Extraction to typed Pydantic schemas with per-field confidence and an independent second read for low-confidence fields; disagreements become exceptions, not silent choices.
Fine-tuned model and evaluation
- The Qwen2.5-VL-7B LoRA adapter, fine-tuned on synthetic forms only and served by vLLM on Azure serverless GPUs with canary releases and automatic rollback.
- Release gates on golden sets sliced by form type and issuer, with numeric tie-outs for brokerage and K-1 statements.
- A calibrated LLM-as-judge and red-team cases such as prompt injection hidden in documents.
Results
- Field accuracy on W-2s and 1099s: 99% or higher on clean scans and 97% or higher on phone photos.
- K-1s: 92–97% on K-1 boxes and 85–93% on K-1 statement lines.
- Fine-tuned adapter: 10–30 points higher than the base model on rare forms.
- Documents with no exception: 70–85% of documents passed through with no exception.
- Reviewer corrections: reviewers corrected under 1% of critical fields.
- AI and cloud cost: about $1–5 per return.
Tech stack
| Layer | Technologies |
|---|---|
| Frontend | React, Vite, TypeScript, TanStack Router, TanStack Query, Tailwind CSS, shadcn/ui |
| Backend | Python, FastAPI, Pydantic, SQLAlchemy 2, Temporal, PydanticAI, Redis |
| AI | Azure AI Document Intelligence, Azure OpenAI, Qwen2.5-VL-7B-Instruct + LoRA, vLLM, Hugging Face TRL + PEFT, DeepEval, MLflow |
| Data | Amazon RDS for PostgreSQL + pgvector, Amazon S3 |
| Automation | pywinauto, Playwright, Amazon EC2 Windows instances |
| Infrastructure | AWS ECS on Fargate, Azure Container Apps serverless GPU, Azure Machine Learning, Terraform, GitHub Actions, Cloudflare |
Related case studies


