LocalLLMsanddatacompliancewithoutbreakingfintechcalculations

ARTICLE

Keeping math separate from generation: deterministic code handles taxes, local Qwen assists with records, and RAG filters rules by transaction date.

Code calculates, the model only assists

In accounting, even a minor rounding error breaks filings. In GetSaldo, taxes, payroll, and ledger entries are computed by deterministic code backed by 840+ automated tests. A local Qwen model sits alongside to parse statements and draft entries, but never alters records until an accountant confirms.

Filtering rules by transaction date

Tax rules change several times a year, and naive vector search often pulls today's clause instead of the one active when a deal closed. We store validity dates (valid_from and valid_to) on each indexed chunk so retrieval only matches rules in force on the operation date.

Keeping data inside the perimeter

Inference runs on the company's own server or workstation without external cloud API calls. Client records and financial figures never leave the perimeter, and every assistant reply is logged with its source reference.