Blogs

illustrations illustrations illustrations illustrations illustrations illustrations illustrations

Studio Cuscito: On-Premise RAG Assistant for Fiscal Documentation

Published on Nov 25, 2026 by Samer Kharboush on RAG LLM

Studio Cuscito: On-Premise RAG Assistant for Fiscal Documentation

I built an on-premise RAG assistant for Studio Cuscito that answers questions over complex fiscal documentation, with everything running on the client’s own infrastructure.

Overview

Studio Cuscito is an accounting practice; fiscal questions require answers that are accurate, traceable to source regulations, and private. The assistant answers questions over complex fiscal documentation, combining hybrid retrieval with a language model that has been adapted for the domain, on a fully on-premise deployment.

Goals

The goal is reliable question answering over fiscal regulations: consistent answers to complex queries, exact matching of article numbers and terms as well as semantic meaning, grounding in retrieved source material rather than guessing, and no client documents leaving the firm.

My role

I designed the retrieval and relevance layer, applied model adaptation, and built and operated the on-premise deployment. The work spans ingestion, retrieval, prompt engineering, fine-tuning and the infrastructure that hosts everything.

Architecture

The backend is a microservice monorepo organised into separate services: ingestion, retrieval, conversation, document administration, operator backend and auth, with shared code. Each service is independently deployable and health-checked. Hybrid retrieval combines vector search with BM25 keyword matching on Qdrant. That matters for fiscal regulations, where exact terms, article numbers and section references carry as much weight as semantic meaning: a query about a specific deduction should not depend only on paraphrase similarity. The embedding model is a fine-tuned variant tuned for the domain, downloaded and mounted into the retrieval service. LLM fine-tuning and prompt engineering make the model handle complex fiscal-regulation queries consistently, keeping it grounded in retrieved source material rather than guessing. A chat widget delivers the interface, an operator dashboard exposes administration, and document-admin and auth services round out the system. The infrastructure layer provides PostgreSQL, Redis, Qdrant, reverse proxying, TLS, and monitoring and logging (Prometheus, Grafana, Loki). Fine-tuned models and prompts are mounted read-only, so the serving layer cannot modify them. CI/CD runs per project standards, with unit, integration and end-to-end testing; images are tagged to a registry for staging and production.

Tech stack

Python (3.11+), FastAPI-backed microservices, Qdrant for hybrid vector/BM25 retrieval, a fine-tuned embedding model, LLM fine-tuning and prompt engineering, PostgreSQL, Redis, Docker Compose, Nginx, Prometheus, Grafana, Loki, plus a Node.js chat widget. Exact versions and internal wiring are private.

Results & achievements

No public metrics are published for this private system, so results are stated as delivered capabilities. The delivered system provides hybrid retrieval that is reliable where keyword precision matters, consistent handling of complex fiscal-regulation queries, answers grounded in source material, a multi-service architecture with authentication, containerised deployment with monitoring and logging, read-only model and prompt mounts, and full on-premise operation so no client documents leave the firm. The system is built for staging and production promotion through CI/CD, with unit, integration and end-to-end test suites. The private repositories are available on request.

No public repository; the Studio Cuscito code is private and available on request. The system is delivered as a set of container images built by CI and promoted from staging to production, so the same artefacts that were tested are the ones deployed.

Similar Stories