How the TaxWise AI answers without making up tax law
The TaxWise AI never lets the language model be the source of a number or a rule. Every figure it shows you is computed by our deterministic tax engine — the same code that builds your IRD return — through a tool call, not from the model's memory. Every claim about the law is retrieved from a knowledge base built on the Inland Revenue Act No. 24 of 2017 and the Amendment Act No. 11 of 2026, and returned with a clickable citation to the exact section. The model's job is to understand your question, call the right tool, and explain the result in plain language. It is explicitly instructed never to invent rates or brackets and never to cite a section it did not actually read — and if the knowledge base doesn't cover something, it says so instead of guessing.
Ask a general-purpose chatbot "how much tax do I owe on Rs. 200,000 of bank interest in Sri Lanka?" and it will answer with total confidence. It will quote a rate. It might even cite a section number. And there is no way for you to know whether any of it is true, because the model generated the number the same way it generated the sentence around it — by predicting the most plausible-looking text, not by doing the arithmetic or reading the law.
For most topics, a confident guess is a minor annoyance. For your tax return, it is a filed figure you are legally responsible for. So we built the TaxWise AI on a simple rule: the language model is never allowed to be the source of a number or a rule. It orchestrates, it explains, it asks good questions — but every figure comes from our deterministic tax engine, and every legal claim comes from the actual text of the Inland Revenue Act.
Here is how that works under the hood.
Two things an AI can get wrong, and where each one is fixed
A wrong tax answer is almost always one of two failures:
- A wrong number — the model invents a bracket, misremembers the personal relief, or does the progressive-band arithmetic in its head and drops a step.
- A wrong rule — the model states a rate, a deadline, or an exemption that isn't in the law, and dresses it up with a citation that doesn't say what it claims.
General chatbots fail at both because a single model is doing everything from memory. TaxWise splits the job so that neither failure has anywhere to happen: numbers come from a calculation engine, rules come from a knowledge base, and the model is told — in no uncertain terms — that it does not know either one on its own.
Numbers come from the engine, never from the model
Every real figure the assistant shows you is computed by @taxwise/tax-engine — the exact same deterministic code that powers our calculators and builds your IRD return. The model cannot type a rupee amount into its answer. Instead, it calls a tool and reports back what the tool returned.
When you ask "show me what I owe if I add Rs. 200,000 of bank interest," this is what actually happens:
- The model recognises that this is a what-if about a single income line.
- It calls the income-impact tool with
bank interest, Rs. 200,000. - That tool runs the same marginal-tax computation as the "Add income" drawer in the app — floor taxable income at zero, apply the 2025/2026 bands, apply the right withholding treatment — and returns a number.
- The model puts that number in the sentence.
The bands, the LKR 1,800,000 personal relief, the 10% withholding on resident interest — none of that lives in the model's memory. It lives in one audited engine. Ask the same question twice and you get the same answer, because a function computed it, not a prediction.
The model's own instructions put it bluntly: numbers come from the tax tools, never from the model's own bracket arithmetic. It is explicitly told it does not know the official brackets and reliefs, and must not write them from memory.
There is even a general-purpose calculator tool for incidental arithmetic — and it is walled off from tax math by design, precisely so the model can't quietly reinvent the brackets under the guise of "just adding some numbers."
Rules come from the law, with a citation you can open
Numbers are only half of it. When the assistant makes a claim about the law — that a rate applies, that a deadline falls on a certain date, that an income type is exempt — it doesn't answer from memory either. It consults a knowledge base built from the primary sources:
- The Inland Revenue Act, No. 24 of 2017 (2025 consolidation)
- The Inland Revenue (Amendment) Act, No. 11 of 2026
- The IRD's own public notices on those changes
That text is stored as the law is actually structured — Part, Chapter, Division, section — so the assistant can navigate to a specific provision, search its wording, and pull the exact passage that answers your question. Section 4 lives at "Section 4 — Assessable income," and that is where a citation about assessable income will land you.
Crucially, the assistant can only cite what the knowledge base handed back. Its instructions forbid it from citing a section for a rule it didn't actually read there, and forbid presenting a remembered rate as if it came from the law. If the answer is in the Act, you get a clickable link straight to the provision. If the knowledge base doesn't cover it, the assistant is told to say so rather than fill the gap with a plausible-sounding guess.
What "it can't make things up" actually means
It's worth being precise, because "AI that can't hallucinate" is a big claim and we'd rather earn it than assert it.
The honest version is this: we removed the two places a hallucination could do damage. The model is not the calculator, so it cannot get your tax wrong by miscounting brackets — that math is done by tested, deterministic code. And the model is not the law book, so it cannot invent a rule — every legal statement is anchored to a passage you can open and read yourself. What's left for the AI to do is the thing language models are genuinely good at: understanding a messy question, deciding which tool to call, and explaining the result in plain language.
| The job | Who does it | Why you can trust it |
|---|---|---|
| Compute your tax | The deterministic tax engine | Same code as the IRD return; reproducible |
| State a rule or rate | The knowledge base of the Act | Cited back to the exact section |
| Understand and explain | The language model | Never the source of a number or a rule |
Why we built it this way
You are the one who signs the return. An assistant that sounds authoritative but can't show its work just moves the risk onto you and hides it. We would rather the assistant occasionally say "the knowledge base doesn't cover that — check with the IRD" than confidently hand you a number it made up.
So when the TaxWise AI tells you what you owe, you can click the figure back to the calculation and the rule back to the Act. That's the whole point: not an AI that promises to be right, but one that shows you exactly why it is — and admits it when it doesn't know.
The TaxWise AI helps you understand and estimate your tax. It is not a substitute for professional tax advice, and you remain responsible for what you file. When a situation is unusual or high-stakes, consult a qualified tax advisor.
Frequently asked questions
Can the TaxWise AI hallucinate my tax numbers?
No. The language model is never allowed to produce a tax figure itself. Every number you see is computed by our deterministic tax engine — the same audited code that powers the calculators and builds your IRD return — and returned to the model through a tool call. Ask the same question twice and you get the same answer, because a function computed it rather than a prediction.
Where do the AI's citations come from?
From a knowledge base built on the primary sources: the Inland Revenue Act No. 24 of 2017 (2025 consolidation), the Inland Revenue (Amendment) Act No. 11 of 2026, and the IRD's public notices. The assistant navigates the Act by its actual structure — Part, Chapter, Division, section — retrieves the relevant passage, and returns a clickable link to that exact provision. It is instructed only to cite what the knowledge base actually returned.
What does the language model actually do, then?
It does the part language models are genuinely good at: understanding a messy, plain-English question, deciding which tool to call, and explaining the result clearly. It orchestrates and communicates — it is never the source of a number or a legal rule.
What happens if the AI doesn't know the answer?
It is instructed to say so rather than guess. If the knowledge base doesn't cover a question, or a rate lives in the engine rather than the Act text, the assistant declines and points you to the IRD or a qualified advisor instead of filling the gap with a plausible-sounding but unverified answer.
Is the TaxWise AI a substitute for a tax advisor?
No. It helps you understand and estimate your tax and shows its working, but you remain responsible for what you file. For unusual or high-stakes situations, consult a qualified tax advisor.
Free, instant, and built on the same 2025/2026 engine. No sign-up needed to estimate.