LLM fine-tuning in Barcelona addresses pharmaceutical, clinical trial and enterprise sectors where measured baseline testing shows general-purpose models lack the medical terminology accuracy, MedDRA coding capability and multilingual clinical documentation skills required for production tasks. Barcelona's pharmaceutical ecosystem includes CROs, biotech companies and clinical research centres that process trial documentation in Spanish, Catalan, English and other EU languages. MedDRA medical coding requires matching verbatim adverse event descriptions to the correct terminology hierarchy. General models often select wrong hierarchy levels or conflate similar but distinct medical terms. Baseline testing against a prompted general model quantifies these specific gaps. Fine-tuning adapts the base model's behaviour on measured gaps; cross-task evaluation verifies preservation of broad capabilities. GDPR applies with Article 6 lawful basis and Article 9 conditions for health data. The EU AI Act assigns obligations based on provider, deployer or GPAI model role and intended purpose. ZTABS is remote-first by design, with an office in Houston, Texas. Our LLM fine-tuning services cover data preparation, model training, evaluation and deployment across industries. ZTABS builds custom white-label AI products for clients to brand and resell.
When fine-tuning applies and when it does not
Before fine-tuning, test simpler approaches. Prompt engineering with MedDRA version-specific instructions adjusts model behaviour; measure whether it closes the gap. RAG retrieves versioned MedDRA dictionary entries and current EMA guidelines. Fine-tuning addresses measured behaviour patterns the model has not learned from pre-training.
| Approach | Tested baseline first | What it changes |
|---|
| Prompt engineering | Yes, on target clinical documents | Output framing, not model weights |
| RAG with versioned MedDRA/guidelines | Yes, against terminology coverage | Access to current facts, not learned patterns |
| Fine-tuning | After prompt baseline measured | Model behaviour on medical terminology patterns |
Barcelona domain sectors and workflow choices
Pharmaceutical CRO operations. Barcelona CROs process clinical trial documentation including protocol development, adverse event reporting, safety narratives and regulatory submissions. Fine-tuned models assist with MedDRA coding by identifying candidate LLTs closest to verbatim descriptions and mapping through the hierarchy to PTs. Seriousness, expectedness, causality and reporting are separate processes performed by qualified pharmacovigilance staff. The sponsor bears regulatory responsibility; CROs perform delegated activities per trial agreements.
Clinical trial document processing. Case report forms, investigator brochures, patient information sheets and informed consent forms in Spanish, Catalan, English and other trial languages. Fine-tuning addresses medical terminology consistency across languages and document types. Catalan and other agreed locale-specific variants are scoped and tested per engagement.
MedDRA coding workflow. The model identifies candidate LLTs closest to the verbatim adverse event description, maps upward through the hierarchy to the PT using the versioned MedDRA vocabulary. Coding suggestions go to an authorised qualified human reviewer who confirms the final coding. The model does not determine seriousness, expectedness or causality; these are separate qualified assessments.
Post-authorisation pharmacovigilance. Marketing Authorisation Holders have distinct pharmacovigilance responsibilities. The MAH uses EudraVigilance for individual case safety reports (ICSRs) and signal detection uses EudraVigilance data; PSURs are submitted through the PSUR repository where required. The MAH's pharmacovigilance system operates independently of the clinical trial sponsor's safety reporting. Fine-tuned models assist with ICSR processing, aggregate analysis and signal management for qualified pharmacovigilance staff review.
Biotech and clinical research. Barcelona's biotech cluster includes companies developing biologics, cell and gene therapies, and medical devices. Clinical research documentation for these sectors involves specialised terminology beyond standard pharmaceutical vocabulary. Regulatory submissions to AEMPS (Agencia Espanola de Medicamentos y Productos Sanitarios) for national procedures follow specific formats.
Scope a Barcelona fine-tuning project
Tell us the clinical documentation types, MedDRA requirements and languages involved. We run a baseline test and assess whether fine-tuning addresses the measured gaps.
Training data pipelines with documented GDPR basis
Training pipelines document GDPR Article 6 lawful basis. Where health data or other Article 9 special categories are involved, an additional Article 9(2) condition is established and documented. DPIA where processing is likely to result in high risk. Clinical trial data processing also follows the Clinical Trial Regulation (EU 536/2014) and applicable national implementing measures from AEMPS.
CTIS (Clinical Trials Information System) is the central submission system under the CTR for trial applications, ASRs and other trial documentation. Sponsors report SUSARs to EudraVigilance, the dedicated adverse reaction database. Post-authorisation, the MAH has separate pharmacovigilance obligations under Directive 2001/83/EC and Regulation 726/2004, using EudraVigilance for individual case safety reports and the PSUR repository for periodic reports; signal detection uses EudraVigilance data.
Pseudonymisation of clinical data replaces patient identifiers while preserving the medical terminology and linguistic patterns needed for model training. Anonymisation may remove personal data status; assessed case by case per EDPB guidance. Training data licensing documents purpose, access, retention and deletion scope covering input data, adapter weights, evaluation artifacts, caches and logs.
MedDRA hierarchy and versioned vocabulary management
MedDRA organises medical terminology in five levels: SOC (System Organ Class) at the top, HLGT (High Level Group Term), HLT (High Level Term), PT (Preferred Term) and LLT (Lowest Level Term) closest to the verbatim report. The coding workflow identifies candidate LLTs closest to the verbatim adverse event description, then maps upward through the hierarchy to the PT for standardised reporting. Multiple LLTs can map to the same PT; the model selects the LLT that most closely matches the verbatim wording.
MedDRA is updated with new versions that add, modify or retire terms. The model must use the MedDRA edition specified by the sponsor or MAH. Version management in the deployment ensures the model references the correct edition. When the organisation transitions to a new MedDRA version, the model requires version-specific retraining or vocabulary update to use the new terms correctly. Historical coded data may reference earlier MedDRA versions; the model documents which version it was trained on.
Seriousness assessment (whether the event meets ICH seriousness criteria), expectedness determination (whether the event is listed in the reference safety information), causality evaluation (whether there is a reasonable possibility the product caused the event) and regulatory reporting decisions are distinct processes performed by qualified pharmacovigilance personnel. The model does not make these determinations.
Catalan and multilingual clinical documentation
Barcelona clinical documentation involves Spanish (Castilian), Catalan, English and other EU trial languages depending on the trial protocol, investigator sites and regulatory requirements. Catalan is used in patient communications, informed consent documents and local clinical notes at Catalan investigator sites. The engagement scopes which languages and locale-specific variants are covered; quality on unscoped languages is not guaranteed. Cross-language terminology consistency testing verifies that the same medical concept receives consistent MedDRA coding regardless of the source language. Spanish and Catalan medical terminology overlap substantially but have distinct terms in some clinical areas that require separate evaluation by native speakers of each language.
Contracted deployment architecture
Deployment architecture documented per engagement: approved training and serving endpoints, checkpoint storage, evaluation environment, log and backup retention, remote admin and support scope. Clinical trial data sensitivity typically requires documented data flows. Open-weight models allow self-hosted deployment on EU-region or client-approved infrastructure. Which deployment architecture applies depends on data types, GDPR requirements and the client's preferences.
MedDRA vocabulary versioning is maintained in the deployment: the model uses the correct MedDRA edition and version updates are managed through a documented process.
How delivery works
ZTABS delivers fine-tuning projects remotely from our Houston, Texas office. Barcelona engagements schedule collaboration sessions during agreed overlapping hours. Delivery phases: baseline testing and data assessment, training data curation with pharmacovigilance expert annotation, base model selection and fine-tuning, MedDRA coding evaluation, deployment handover with runbook.
MedDRA coding evaluation. Coding accuracy measured per SOC and PT against authorised qualified reviewer consensus. LLT selection accuracy: does the model select the LLT closest to verbatim? PT mapping accuracy: does the hierarchy mapping reach the correct PT? Version consistency: does the model use the specified MedDRA edition? False positive and false negative rates evaluated separately for different adverse event categories. EU AI Act role assessment documents which obligations apply. Article 25 addresses substantial modification of an already placed high-risk AI system; this is separate from GPAI model provider treatment. High-risk classification follows Article 6: Article 6(1) applies where the AI system is itself, or is a safety component of, a product covered by applicable Annex I harmonisation legislation that requires third-party conformity assessment; Article 6(2) applies to systems with intended uses listed in Annex III, subject to applicable exceptions. Not all pharmaceutical NLP constitutes a high-risk AI system under the Act.
Illustrative Example
Adverse event coding for a Barcelona CRO
Engagement prerequisites. A Barcelona CRO identifies a measured gap: baseline testing shows the prompted general model achieves a specified coding accuracy against qualified reviewer consensus, below the CRO's target threshold. The CRO has historical coded adverse event records with documented licensing and GDPR basis. Senior pharmacovigilance specialists are available for annotation and evaluation. The sponsor has authorised use of the specified data for model training.
Proposed approach. Training data curates annotated adverse event records by therapeutic area, MedDRA SOC and time period. Held-out evaluation keeps therapeutic area and time period groups together. Memorisation probes and deduplication checks. Comparable baseline comparison. Fine-tuning covers LLT identification and PT mapping using the specified MedDRA version. The model presents coding suggestions to authorised qualified reviewers who confirm final coding; seriousness, expectedness, causality and reporting are separate qualified processes.
Release gate. MedDRA coding accuracy measured per SOC against authorised qualified reviewer consensus at thresholds the CRO sets before training. If thresholds are not met, the model is not deployed and the engagement documents fallback to the existing approved manual coding workflow or an independently validated baseline expressly suitable for its limited role.
Residual risks. Novel adverse event descriptions not represented in training data may be coded to incorrect LLTs; qualified reviewers evaluate all coding suggestions. MedDRA version updates may introduce new or modified terms; the model requires explicit vocabulary and version update plus re-evaluation against the new terminology. Retraining is undertaken only if the re-evaluation shows a measured gap and is approved by the sponsor-authorised safety owner.
This is a hypothetical scenario for illustration. Actual scope, timeline and cost depend on your requirements.
Cost and schedule drivers
No standalone fine-tuning cost guide is published. The table below describes practical cost and schedule drivers.
| Stage | What it covers | Cost and schedule drivers |
|---|
| Baseline and data assessment | Prompted model testing, MedDRA coding assessment, language evaluation | Therapeutic areas, MedDRA complexity, number of languages |
| Corpus and annotation | Licensed data access, pharmacovigilance expert annotation, quality review | Data volume, annotation depth, GDPR documentation |
| Training and evaluation | Base model selection, compute, per-SOC evaluation | Model size, MedDRA vocabulary scope, evaluation iterations |
| Deployment and handover | Approved infrastructure setup, coding workflow integration, runbook | Contracted architecture, clinical data handling requirements |
| Ongoing support | Monitoring, MedDRA version updates, re-evaluation and retraining if approved | Version update frequency, therapeutic area expansion |
Budget a Barcelona fine-tuning project
Describe the therapeutic areas, MedDRA coding scope and languages. We provide a scoped estimate based on the measured baseline gap.
Evaluating a fine-tuning proposal
| Criterion | What to check |
|---|
| 1. Contracted deliverables and task acceptance | Does the proposal specify the fine-tuned model, evaluation report, deployment runbook and onboarding? Are acceptance criteria defined before work begins? |
| 2. Data licensing and GDPR documentation | Does the proposal document training data pipelines with GDPR Article 6/9 basis, DPIA where applicable, clinical trial regulation compliance, retention and deletion scope? |
| 3. Evaluation and release methodology | Does the proposal describe grouped held-out splitting, memorisation probes, comparable prompted baseline, authorised qualified MedDRA reviewer evaluation, per-SOC accuracy metrics, abstention thresholds and documented rollback? |
| 4. Deployment and monitoring | Does the proposal document approved endpoints, checkpoint storage, evaluation environment, logs/backups, remote admin/support scope, MedDRA version management, performance monitoring and retraining only when authorised? |
| 5. Transparent costs, dependencies and support | Are data preparation, compute, infrastructure and maintenance costs separately itemised? |
| 6. Provider and customer roles | Provider delivers model training, evaluation, deployment and handover in agreed languages with qualified review. Customer provides licensed training data, authorised pharmacovigilance specialists for annotation and evaluation, approves release criteria and owns coding decisions and regulatory reporting. Written and translation ownership documented. Support scope and escalation documented. |
Engagement fit
Fine-tuning fits when baseline testing shows a measured gap on MedDRA coding, clinical narrative or multilingual adverse event tasks that prompt engineering does not close, the CRO or sponsor has licensed clinical data with a documented Article 9 condition and Article 6 lawful basis, and qualified medical monitors or pharmacovigilance officers are available for annotation and evaluation in the agreed languages with assigned reviewers. Fine-tuning is unlikely to fit when prompted baseline already meets coding thresholds, when the task depends on rapidly updating MedDRA editions or EMA guidance better served by vocabulary update and re-evaluation, or when the sponsor cannot assign qualified persons who own coding and safety decisions. ZTABS is remote-first by design from our Houston, Texas office.
Risks and mitigations
| Risk | Mitigation |
|---|
| Fine-tuned model does not improve on baseline for MedDRA coding | Comparable baseline evaluation; release gate blocks deployment; documented fallback |
| MedDRA version changes introduce new or modified terms | Version-specific evaluation; documented version update and retraining process |
| Multilingual clinical documents have inconsistent terminology | Per-language evaluation by qualified reviewers; cross-language consistency testing |
| Novel adverse events not represented in training data | Qualified reviewer evaluates all coding suggestions; abstention on low-confidence predictions |
Discuss LLM fine-tuning in Barcelona
Contact us with the pharmaceutical domain task, documents and MedDRA requirements. We run a baseline test and scope a fine-tuning engagement.