02

Five years of tax credits, recovered in hours instead of months

TaxAgent

Of tax credits, recovered in hours

PIS/COFINS credit recovery in Brazil is a five-year retroactive audit across three independent legal theses. Reaver audits the raw filings, calculates the credit per thesis, applies Selic correction, and formalizes the claim.

At a glance
Client
Tax practices and in-house tax teams (Brazil)
Industry
Tax · Legal services
Problem
Manual PIS/COFINS credit recovery: months per client, error-prone
Solution
Document-grounded recovery agent: audit, calculate, formalize
Stack
XML/EFD ingestion · rules engine per tax regime · Selic correction · claim generation
Live at
turing.com.br/produto-reaver
The challenge

Brazilian companies routinely overpay federal PIS/COFINS taxes, and the law lets them recover five years of it. The recovery is not a form. It is a retroactive audit built on three independent legal theses (exclusion of ICMS from the tax base, input credits, single-phase/ST products), each with its own base, rate, and eligibility depending on the company's tax regime.

The evidence is raw: thousands of invoice XMLs and sixty months of EFD-Contribuições filings. A firm does the work by hand: export the filings, rebuild the ledger in a spreadsheet, apply the thesis, compute statutory interest from each payment date, then formalize the claim with the tax authority. It takes months per client. Errors compound quietly, and a wrong claim invites an audit.

Most firms therefore only pursue the largest clients. The long tail of recoverable credit goes unclaimed.

What they needed
  • A calculation grounded in the actual filings, not an estimate from revenue
  • Regime-aware logic: Lucro Real, Lucro Presumido, and Simples each behave differently
  • Full traceability: every credit must point back to the filing line that supports it
  • Correct Selic correction from each original payment date
  • Output the tax authority accepts, not a spreadsheet a human still has to rewrite
Goals & success metrics
  • Cut recovery time per client from months to hours
  • Make the long tail economical: recovery viable beyond only the largest clients
How we did it
  1. 01

    Phase 1: Encode the theses

    Before any model, the three theses were written as rules with explicit inputs and eligibility conditions per regime. This is the part that cannot be “prompted.”

  2. 02

    Phase 2: Ingestion

    Parsers for invoice XMLs and EFD-Contribuições, normalizing sixty months of filings into a single ledger with payment dates preserved.

  3. 03

    Phase 3: Classification and calculation

    Each ledger line is classified against the applicable thesis; credits are calculated per period and corrected by Selic from the payment date. Every output line carries its source reference.

  4. 04

    Phase 4: Formalization

    The agent produces the claim package in the format the authority expects, plus a reviewer-facing reconciliation view.

Results
  • Recovery cycle: months → hours
  • Firms can now quote the recovery upfront using the same engine. The public calculator on the product page runs on it.

See it live

turing.com.br/produto-reaver

FAQ

Still have a question?

Ask us directly. A person reads it and gets back to you quickly.

Contact us