Copilot Comptable
Freelance mission for a Swiss fiduciary firm — an AI backend that reads their inbox, classifies every accounting document, extracts the data and books it automatically. Sovereign: self-hosted Llama 3.2 Vision on OVH, no data leaves Europe.
Private demo
This freelance project is confidential. The screenshots above are shared with client approval.
// recruiter view
Freelance mission for a Swiss fiduciary firm around a clearly identified market need: Swiss fiduciaries still spend hours a day classifying, sorting, reading and re-typing accounting documents, and hand-replying to every client email — without being able to lean on US-based AI SaaS due to FADP. Backend, AI engine and deployment carried end-to-end, in direct partnership with the client, with a multi-tenant SaaS ambition at the end.
- ▸Sorting, classification, reading and key-data extraction now automatic across 9 document types — no more hours spent every day classifying and re-typing what landed in the fiduciary's inbox
- ▸Client emails answered fully automatically: the AI reads the entire thread history and every attachment to draft acknowledgements, reminders and error reports — no more replies typed one by one
- ▸Several hours of manual entry saved every day for accountants at the client firm
- ▸Sovereign AI choice (self-hosted Llama 3.2 Vision on OVH) to tick GDPR + FADP — a decisive argument for the fiduciary
- ▸Architecture, AI engine and production rollout owned solo, in direct partnership with the client
- ▸Designed from day one as a commercial product: multi-tenant SaaS or on-premise license for the French- and German-speaking Swiss market
The story behind
- Chapter 01
The freelance mission
Freelance mission for a Swiss fiduciary firm: I own the architecture, the AI engine, the backend and the deployment, working in direct partnership with the client. A focused engagement with one clear goal — take the data-entry workload off the accountants' desk and ship it to production.
- Chapter 02
The trigger
The client fiduciary firm was spending several hours a day manually re-typing PDF invoices into Cresus. Swiss accounting tools offer almost no AI automation, and entrusting client data to a non-European SaaS was unthinkable from a FADP compliance standpoint.
- Chapter 03
Technical choices
Instead of an OpenAI API call, I chose self-hosted Llama 3.2 Vision on a dedicated OVH server: data 100% in Europe, controlled costs, zero third-party dependency. Async FastAPI + Celery to digest batches of up to 100 files, Alembic for zero-downtime migrations, Fernet encryption on all sensitive data.
- Chapter 04
The obstacles
First obstacle: the model was hallucinating amounts because of the Swiss format (apostrophe as thousands separator, VAT 8.1%/2.6%/3.8%, QR-invoices). Solution: strict JSON mode + few-shot prompts specialized on Swiss documents. Second obstacle: Gmail/Outlook threads sometimes hide attachments inside nested messages — full rewrite of the IMAP parser.
- Chapter 05
Going to production
Progressive rollout rather than a big bang: first classification in read-only, then automatic acknowledgement emails, finally direct export to Cresus. Each step validated by a human accountant before activating the next — zero regressions, gradual trust.
- Chapter 06
What's next? Toward a SaaS
Beyond its current usage, the product answers a market need that goes well beyond any single client: no Swiss fiduciary today offers sovereign AI automation for accounting entry. The logical next step — package the whole thing as a multi-tenant SaaS (or as an on-premise license for firms with the strictest data requirements) and open it up to the entire French- and German-speaking Swiss market.
After going live
Monitoring & observability
Full observability stack to monitor the AI pipeline and email automation in production, with alerting on vision model drift and OAuth2 errors.
Stack
Tracked metrics
- ●Ollama Vision latency (p50 / p95)
- ●Classification accuracy per document type
- ●Celery queue depth and per-batch processing time
- ●OAuth2 error rate for Gmail / Outlook / Bexio
- ●OVH Swift storage consumed
- ●Sentry alerts on LLM hallucinations and timeouts
Production impact
Deployed as a pilot at the client fiduciary firm, the system now absorbs the data-entry tasks that used to dominate accountants' daily work.
- ▸Manual entry replaced on the 9 most frequent document types (invoices, statements, expenses, contracts…)
- ▸Acknowledgements and reminders sent automatically — no more forgotten follow-ups
- ▸FADP + GDPR compliance maintained: AES-encrypted data, European hosting, zero external API
- ▸Automatic detection of Swiss VAT rates (8.1% / 2.6% / 3.8%) — entry errors eliminated
- ▸User feedback: accountants refocused on client advisory work rather than repetitive entry
// results
// stack