Tanveer

Mar 2026 - Apr 2026

TaxCopilot

A team-built assistant that turns a scanned tax notice into an editable response draft for professional review. It extracts the notice, retrieves relevant legal passages and checks cited sections against the sources. I contributed to the AI workflow, backend and frontend.

CONTEXT
AWS AI for Bharat prototype qualifier
MY ROLE
AI workflows, backend and frontend
AI STACK
FastAPI, Textract, Bedrock
APPLICATION
Next.js, Node.js, PostgreSQL, pgvector

Overview

TaxCopilot helps a tax professional move from an uploaded notice to an editable response draft. It extracts the document, retrieves relevant legal text and keeps source references alongside the generated analysis.

Built with a team, the MVP qualified for the prototype round of AWS AI for Bharat. I contributed across the AI workflow, backend and frontend, connecting document processing and draft generation with the application experience. The resulting draft remains subject to a tax professional's review.

TaxCopilot overview
TaxCopilot product overview.

The problem

Responding to a tax notice involves several different tasks: reading the notice, identifying the issue, finding relevant provisions and preparing a reply. A scanned PDF adds an extraction step before that work can begin.

A generated reply can sound convincing while citing the wrong section or missing a detail in the notice. TaxCopilot therefore needs to preserve a path from the source document and retrieved material to the proposed response.

The solution

AWS Textract handles document extraction. The analysis service classifies the material and uses retrieved legal context to prepare an explanation. The drafting service then produces a response that can be edited in the application.

The knowledge-base service uses Bedrock embeddings and a PostgreSQL vector store to retrieve relevant passages. Draft generation receives that material explicitly, and the application keeps cases, documents and drafts as separate records.

  • Document classification

    A classification step checks the type of uploaded material before the tax-notice drafting flow proceeds.

  • Citation checks with a retry

    The drafting service extracts section references, checks them against retrieved text and retries with a warning when validation fails.

  • Editable output

    The draft editor gives the professional a place to review and revise the proposed reply before using it.

TaxCopilot notice analysis and draft request
Case documents, analysis and draft creation in one workspace.
TaxCopilot response draft editor
An editable response draft with save and PDF export controls.

The document-to-draft pipeline

  1. Notice and OCR

    Textract extracts the uploaded document for classification.

  2. Legal retrieval

    pgvector returns relevant passages for the prompt.

  3. Draft and checks

    The model prepares a reply; citation validation can trigger a retry.

  4. Professional review

    The editable draft is checked against the notice and source material.

Engineering decisions

A Node.js gateway handles routing and request controls. The application backend manages authentication and case data, while a Python FastAPI service handles OCR, retrieval and model workflows. This separation lets the AI pipeline change without moving the application's record keeping into prompts.

Bedrock is the primary model path, with Gemini available as a fallback. Structured response models carry fields such as the draft and citations back to the application. Tests cover parts of the classification, draft, route and Textract behavior.

TaxCopilot document-processing architecture
TaxCopilot document-processing architecture.

Review boundaries

Finding a cited section in the retrieved text does not establish that the legal interpretation is correct. OCR can lose a number, retrieval can miss a relevant provision, and a valid citation can still be used in the wrong context.

The product assists with drafting; the professional reviews and edits the response before using it. TaxCopilot does not automatically file responses or guarantee compliance.

Every generated response needs review against the original notice and the applicable legal sources before it is used.

Outcome and next steps

The MVP connects document upload, analysis with retrieved legal sources and editable drafts. This gives the reviewer a workflow to inspect, from the original notice through the supporting material to the proposed reply.

A next direction would be a review history that shows how a draft changed, which source passages supported it and what the professional approved. That would help a team revisit the reasoning behind a response without reconstructing it from separate documents.

Demo

TaxCopilot product walkthrough

VISUAL ARTIFACTS

TaxCopilot gallery

A closer look at the product and its workflows.

Other projects

VIEW ALL WORK ↗