RAGAL: A Frugal, Fully Local Retrieval-Augmented Assistant for Technical Support at a Government Agency

· Source: Computation and Language · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cloud Computing & IT Infrastructure, Government & Public Sector · Depth: Advanced, quick

Summary

RAGAL is a retrieval-augmented assistant developed for AFIR, the Romanian Agency for Financing Rural Investments, to provide technical support while adhering to strict data locality. Built on a single 8 GB consumer laptop, it operates under zero data egress and a read-only mandate for sensitive documents. The project demonstrated that retrieval engineering and retriever fine-tuning were crucial, improving internal evaluation from 62% to 81% with hybrid dense-sparse retrieval and intent routing. Fine-tuning the bge-m3 embedder on ~25,000 Romanian chunks boosted recall@10 from 0.663 to 0.850 (MRR 0.489 to 0.684) in 72 minutes. A pitfall of single-domain fine-tuning degrading other domains was identified and resolved using locally generated queries. Counter-intuitive findings included PII masking improving generation quality and "anchor distillation" preventing SQL hallucination. A 744B-parameter model on CPU served as an overnight batch "cloud judge substitute," and sanitized pipeline scripts are released.

Key takeaway

For MLOps Engineers building RAG systems with strict data locality or limited hardware, prioritize retrieval engineering and local embedder fine-tuning over larger generative models. You can achieve significant performance gains, like improving recall@10 from 0.663 to 0.850, even on an 8 GB VRAM machine. Implement hybrid dense-sparse retrieval and use locally generated queries for robust evaluation. This approach ensures secure, efficient, and compliant AI deployments without cloud dependencies.

Key insights

Optimizing retrieval and fine-tuning embedders locally is key for secure, resource-constrained RAG systems.

Principles

Method

Fine-tune bge-m3 embedder on ~25,000 chunks in 8 GB VRAM. Use locally generated queries (GenQ) for domain-specific evaluation and a 744B-parameter CPU model for batch evaluation.

In practice

Topics

Best for: AI Engineer, Machine Learning Engineer, MLOps Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Computation and Language.