The problem
Translating medical texts isn't just translating. A misplaced decimal in a dosage, a confused acronym (HIV ≠ IBS), an inverted negation, or a drug name swapped for a synonym can have real clinical consequences. While a BLEU score of 35 is already considered good in general-purpose translation, the bar is somewhere else entirely in clinical settings: numbers, units, drug names, terminology codes (SNOMED CT, LOINC, ICD-10), and the argumentative structure of clinical discourse must be preserved exactly.
On top of this technical challenge come the constraints inherent to operating in the healthcare sector:
- Special category of data: the GDPR (Art. 9) prohibits the processing of health data except on specific legal grounds, with enhanced technical and organizational security safeguards.
- Data sovereignty and residency: clinical texts cannot be sent to infrastructure outside the corporate perimeter or travel across public networks.
- Regulatory traceability: any tool that assists healthcare professionals must be auditable end-to-end. Every system decision has to be reproducible.
- No vendor lock-in: a clinical tool that critically depended on an external API outside our control would be an unacceptable operational risk.
Vidas Prime needed a multilingual medical translation tool (Spanish, English, Portuguese, and Catalan, in both directions) that was clinically reliable, fully auditable, and operated within our own perimeter. No commercial solution met all three requirements at once. So we decided to build it.
This article explains how we did it: vidasprime-medical, the translation system that now powers clinical language workflows at Vidas Prime, with measured quality above 93% on the industry-standard benchmark (WMT Biomedical).
Our starting decisions
Three principles shaped the entire architecture from day one, and all three stem from the healthcare nature of the operation.
Principle 1 — Our own platform, a private perimeter
We chose Databricks on Azure as our single platform, with end-to-end private network connectivity (Private Link). This means compute, storage, models, and the inference endpoint all live within the same isolated environment, with no exposure to the public internet. Compute components don't download models, libraries, or data in real time from external repositories: everything they need is already provisioned within the perimeter.
The cost of this decision is operational discipline: every dependency the system needs has to be prepared, validated, and provisioned in advance. The payoff is that no clinical data ever leaves the corporate perimeter at any point in the system's lifecycle, from terminology ingestion to the response delivered to the end user. No external APIs. No live downloads. No blind spots in the chain.
Principle 2 — Open-source models with compatible licenses
Building on open-source models with permissive licenses (MIT, Apache 2.0, CC-BY) gives us three things a clinical tool needs:
- Auditability: the code and weights are available for inspection. We can know exactly what each component was trained on.
- Operational continuity: we don't depend on the availability or policy changes of an external provider. If a provider changes its API tomorrow, our system keeps running.
- Targeted optimization: we can specialize the models for our domain (medicine) and our languages (Spanish, Catalan, Portuguese, plus English) without the limitations of a general-purpose model in a closed service.
Principle 3 — Pipeline-as-data-engineering
We treat model development not as an isolated AI project, but as data infrastructure. Each phase of the process takes the form of an orchestrated job, with its own checkpoints, its own trace in the model lifecycle management system (MLflow), and its own layer of governed tables. This makes building the model reproducible, observable, and resumable: any step can be repeated without having to redo the previous ones. For a tool that has to pass regulatory audits, this is essential.
The core asset: data
A medical translator is only as good as its corpus. Before thinking about models, we invested several sprints in consolidating publicly available terminology sources and parallel corpora, and turning them into a governed asset within Unity Catalog.
Clinical terminology — 6.5 million entries
We combined five industry-standard terminology sources, each contributing a different dimension of the clinical domain:
| Source | Contribution | Volume |
| SNOMED CT (Spanish edition + extension + international) | Clinical concepts, bilingual en/es descriptions, cross-mappings to ICD-10 | 4.7 million entries |
| LOINC | Clinical laboratory terms in 21 languages | 1.3 million entries |
| ICD-10-ES, 6th edition | Diagnoses and procedures in Spanish, with synonyms | 181,000 entries |
| DEMCAT (TERMCAT) | Catalan dictionaries with en/es/fr equivalents | 246,000 entries |
| UMLS (NLM) | Unified concepts with multilingual semantic types | 196 MB |
Each of these sources comes in heterogeneous formats with different conventions. We designed an ingestion process that normalizes, deduplicates, and makes a consolidated gold layer available to the system: 38 language pairs, verified terminology, and identifier codes traceable back to the original source. This layer then feeds the terminology retrieval system that supports translation in real time.
Parallel corpora — 5.5 million sentence pairs
So that the model could learn the register and patterns of clinical language (not just isolated vocabulary), we gathered the highest-quality public medical parallel corpora:
- EMEA / OPUS: 3.5 million pairs from the European Medicines Agency.
- MeSpEn: 1.06 million pairs from Spanish-English glossaries and parallel corpora.
- WMT Biomedical + Scielo: 965,000 pairs from the international research community, including the evaluation benchmark.
After uniform preprocessing, all of this material was integrated into a clean data layer, ready to feed both model training and the evaluation system.
The base models
Building on our open-source approach, we selected the components for each layer of the system based on two criteria: state of the art for its task + a license compatible with commercial use.
| Component | Model chosen | Why |
| Translation engine | X-ALMA 13B (published at ICLR 2025, MIT license) | Designed specifically for multilingual translation, with specialized checkpoints for each language family (Romance, Germanic, etc.) |
| Vector embeddings | BGE-M3 (BAAI, MIT) | Hybrid dense+sparse+ColBERT embeddings with an 8K-token window |
| Clinical entity extraction | Specialized triple NER: Biomedical-NER-All + PharmacoNER + Spanish Clinical NER | Each model covers a different domain (general, drugs, diseases in Spanish); together, they reduce noise and increase accuracy |
| Quality metric | XCOMET-XL/XXL + COMET-22 + COMETKiwi + MetricX-24 | State-of-the-art reference-based and reference-free metrics, validated against human judgment |
All of these models are provisioned within our perimeter and served from governed storage. The production system does not contact HuggingFace or any other external repository at runtime.
The six-phase pipeline
We built the system as a sequence of six phases, each solving a specific problem and producing artifacts the next phase can consume. This granularity is deliberate: it makes traceability easier, allows debugging to be parallelized, and minimizes the cost of iteration.
Phase 1 — Terminology ingestion and normalization
Problem: the terminology sources come from five different systems, each with disparate schemas, language conventions, and quirks of its own. Without a normalization process, the downstream system would be filled with duplicates, ambiguities, and inconsistent entries.
Solution: a declarative three-layer pipeline (bronze → silver → gold). The bronze layer ingests the raw data. The silver layer cleans and normalizes it. The gold layer materializes a consolidated view, ready for real-time consumption. Deduplication is based on normalized content, not just on code, which eliminates equivalent entries across different sources.
Result: a table gold_terminology covering 38 language pairs, ready to feed the retrieval system.
Phase 2 — Synthetic training data generation
Problem: no public corpus adequately covers the specific combination of clinical jargon + patient language + medication vocabulary in the language pairs we need. Training a medical model on public data alone leaves significant coverage gaps.
Solution: a synthetic generation pipeline that takes seed terms from the consolidated terminology, generates realistic clinical sentences in natural context, translates them, back-translates them, and filters them using an automatic quality metric. Only pairs that pass a strict threshold are added to the training corpus.
Result: 12,625 high-quality synthetic pairs, combined with the real corpus to produce the final training set (2.34 million total pairs with a stratified train/val/test split).
Phase 3 — Model fine-tuning
Problem: a general-purpose model, however good, doesn't master clinical register or SNOMED/LOINC terminology with the precision we need. It has to be specialized, but when training a 13B-parameter model, VRAM and compute time are critical resources.
Solution: a three-phase curriculum on two 80 GB A100 GPUs in parallel, using modern efficient fine-tuning techniques that let us adapt the model while preserving the base model's knowledge, without retraining from scratch. The three phases are progressive: (1) continued pre-training on monolingual medical text, (2) a general parallel corpus, (3) final medical specialization.
Result: a model registered in the model lifecycle management system (MLflow), with tracked, reproducible training loss metrics. Total compute time: ~54 hours. Stable throughput of around 7 samples per second.
Phase 4 — RAG System (Retrieval-Augmented Generation)
Problem: a standalone model, no matter how well trained, can't memorize 6.5 million terminology entries. And when it encounters a term it doesn't know well, it tends to paraphrase it or replace it with a close synonym, which is unacceptable in a clinical setting.
Solution: a retrieval system that, for each incoming text, (1) extracts clinical entities using a triple specialized NER approach, (2) looks up their approved translations in a vector index, and (3) injects them as references during generation. The result: the model uses the exact validated terminology, not its best guess.
Key decision: the system injects only término origen → término aprobado, without codes. We tried including SNOMED codes in the context and found that the model ended up copying them into the output. Removing them eliminated that entire category of errors.
Phase 5 — Measurable Evaluation
Problem: without rigorous measurement against professional human references, “better” is just an opinion. We need a standard, repeatable, comparable benchmark.
Solution: we use WMT Biomedical, the most widely recognized evaluation set in medical translation, which provides 50 texts per language pair with professional human translations as references. The evaluation pipeline calculates multi-criteria quality (clinical fidelity + terminology + fluency + structural preservation of numbers/units/doses) and compares it against a baseline.
Result: a reproducible process that produces a structured report after every change to the system. This makes model iteration data-driven, not intuition-driven.
Phase 6 — Production Service
Problem: having a trained model isn't the same as having a service in production. A service has to be reliable under load, handle texts of varying length, recover from transient errors, and expose a clean interface that client applications can consume.
Solution: a managed inference endpoint with autoscaling and built-in observability. The endpoint orchestrates the full pipeline in real time: segmentation → entity extraction → terminology retrieval → translation → verification → assembly. All within the same private perimeter.
Result: the endpoint vidasprime-medical-translation, running in staging, with average latencies of ~8 seconds per text and a success rate above 99%.
The System in Production
At a high level, the runtime architecture is a five-stage pipeline that runs on the endpoint every time a text arrives for translation:
Texto entrante
│
├─→ 1. Segmentación inteligente (preserva límites de párrafo y frase)
│
├─→ 2. Extracción de entidades clínicas (NER triple en paralelo)
│
├─→ 3. Recuperación terminológica (búsqueda vectorial con embeddings)
│
├─→ 4. Generación con contexto (modelo de traducción con guía
│ terminológica + reglas de localización + glosario cliente)
│
└─→ 5. Verificación y ensamblaje
Three components deserve special mention.
The localization rules system
Beyond word-for-word translation, there's a set of localization decisions that separate a mediocre translator from a good one: the decimal separator convention (p = 0.003 in English vs. p = 0,003 in Spanish), the handling of acronyms (some are universal, like SARS-CoV-2, others are translated as HIV ↔ VIH or BMI ↔ IMC), the preservation of identifiers (SNOMED codes, numeric dates), capitalization conventions, and much more.
We encoded these decisions as a system of explicit rules that the model applies consistently. Each rule grew out of a real case observed during evaluation, and every change to the system is validated against the baseline to ensure it doesn't introduce regressions.
The extensible client glossary
Every healthcare client has its own vocabulary: department-specific acronyms, preferred anglicisms in their internal literature, domain conventions (in veterinary medicine, for example, the species code is prefixed to disease abbreviations). We designed a glossary module that is injected with high priority ahead of the generic rules, making it possible to customize the system's behavior for each client without touching the underlying model.
This turns vidasprime-medical into an extensible platform: onboarding a new client with its own terminology is now a matter of configuration, not retraining.
Production robustness
A clinical system can't break down when faced with empty responses or truncated outputs. We implemented three layers of defense: detection and automatic retry for empty responses (transient issues), detection and automatic retry for length-based truncation (with dynamic doubling of the token budget), and error propagation with descriptive messages that enable fast diagnosis in the event of a persistent failure.
Results
On the standard WMT Biomedical benchmark (150 clinical texts split into 50 es→en + 50 en→es + 50 pt→en, with professional human references), evaluated using a multi-criteria clinical quality metric:
| Language pair | Quality | Structural preservation | Improvement over baseline |
| es→en | 0,9325 | 85 % | +0,139 |
| en→es | 0,9209 | 85 % | +0,145 |
| pt→en | 0,9347 | 90 % | — |
| Average | 0,9294 | 86,7 % | > +0.14 |
Takeaways:
- The system preserves all clinical meanings in approximately 93% of the texts evaluated.
- Only 13–15% of samples show any kind of structural failure, typically localization decisions with debatable criteria (for example, a decimal separator convention interpreted differently from the human reference translator).
- The improvement over the baseline (model alone, without RAG or glossary) is more than 14 absolute points on the measurable pairs. This quantifies the value of the orchestration layer: most of the final quality doesn't come from the model in isolation, but from the complete system built around it.
What we've learned
Compliance isn't a cost, it's an architectural advantage
Operating under Private Link and offline discipline requires a level of upfront provisioning that would seem excessive in other contexts. In healthcare, it's not just a regulatory requirement: it becomes an operational guarantee. We know exactly what runs, on what data, on which network, and with which versions. That traceability is an asset, not a toll.
Terminology curation is a competitive advantage
Standard terminology sources (SNOMED, LOINC, ICD-10) are public, but turning them into a governed, deduplicated asset that can be queried at low latency is serious work. That data layer is probably what most sets one medical translator apart from the next: not the model, but the richness and quality of the terminology corpus that supports it.
Quality is built iteratively, with data
Every improvement to the system came from a specific failure pattern observed during evaluation. There are no shortcuts: quality emerges from short cycles of “evaluate → identify pattern → apply targeted change → evaluate again.” The benchmark isn't a final exam; it's the ongoing thermometer of the improvement process.
Open-source + an in-house platform is a powerful combination for healthcare
Combining high-quality open-source models with a well-governed in-house platform gives a healthcare company exactly what it needs: technological independence, auditability, domain specialization, full control over data, and the ability to evolve without relying on third parties. It is, by far, the approach most aligned with the regulatory reality of the sector.
Conclusion
vidasprime-medical is today a medical translation system with measured quality above 93% on the industry-standard benchmark, running entirely within our private perimeter, without sending a single piece of clinical data outside.
We built it in six sequential phases, each solving a specific problem: terminology ingestion and normalization, synthetic data generation, model fine-tuning, a RAG system, rigorous evaluation, and production serving. We deployed it on our own platform (Databricks + Private Link on Azure), with open-source models under compatible licenses, and with an extensible architecture that lets us onboard new clients and new language pairs without retraining.
Medical translation isn't solved by a model alone. It's solved by a complete system that combines curated data, specialized models, contextual retrieval, explicit domain rules, and an infrastructure that respects the constraints of the healthcare sector by design. And a well-built system, on in-house infrastructure, can reach 93% reliability without letting a single clinical byte leave the perimeter.
For Vidas Prime, that's not a technical detail. It's what makes the tool possible in the first place.