Large Language Models in Pharma: How LLMs Work and Where They May Help

Direct answer

Large language models in pharma are generative AI models trained on large amounts of text that can interpret and produce language. They may help with document question answering, summarisation, extraction and drafting across quality, regulatory, engineering and commercial work. LLMs can generate incorrect statements confidently, so grounding, review, data controls and version management are essential.

AI technology landscape: Large language modelsNested view of AI, machine learning, deep learning, generative AI and large language models, with NLP and computer vision as task fields and related architectures alongside. Highlighted: Large language models.Artificial intelligenceMachine learningDeep learningGenerative AILLMsNLPComputer visionBuilt with or around these modelsPredictive analyticsAI agentsKnowledge graphsRAGDigital twinsRPA with AI
Illustration. All information shown is also available as text on this page.

Executive summary

LLMs have made AI accessible to people who never worked with data science, because they take instructions in plain language. In pharmaceutical settings, most practical value is likely to come from working with documents, provided outputs are grounded in trusted sources and checked by people who know the subject.

This page is part of the technology pillar, AI technologies in Pharma, within the AI in Pharma section. Statements describe potential applications (claim levels 1 and 2) unless a source is cited.

What large language models is

How it works at a high level

An LLM is pre-trained to predict likely continuations of text, then tuned to follow instructions. When used, it takes a prompt plus any supplied context and generates a response. Common deployment patterns include:

Common ways LLMs are deployed
PatternDescriptionTypical use
PromptingInstructions and examples in the requestDrafting, summarising, reformatting
Retrieval-augmented generationRelevant documents are retrieved and supplied as contextAnswering questions from approved documents
Fine-tuningFurther training on domain examplesConsistent style or specialised tasks
Tool use and agentsThe model calls tools such as search or databasesMulti-step tasks

Agent patterns are covered in AI agents in Pharma.

How large language models differs from related technologies

Large language models compared with related technologies
Compared withKey difference
Generative AILLMs are the language subset of generative AI
Natural language processingNLP is the broader task field; LLMs are one method for it
Search enginesSearch returns documents; an LLM generates an answer that may or may not match them
Knowledge basesA knowledge base stores verified facts; an LLM is not a source of truth

Potential applications by audience

Pharmaceutical drug manufacturers

Potential large language models applications for pharmaceutical drug manufacturers (claim level: potential)
Potential applicationWhat it may involveHuman role
SOP and quality document question answeringAnswers grounded in approved proceduresUsers confirm against the source document
Summarisation of investigations or literatureCondensing long recordsExperts check completeness
Extraction from unstructured textPulling fields from reports or correspondenceReviewers verify
Regulatory document comparison supportHighlighting differences between versionsRegulatory professionals assess significance

Track overview: AI for pharmaceutical manufacturers.

Equipment, engineering and allied companies

Potential large language models applications for equipment, engineering and allied companies (claim level: potential)
Potential applicationWhat it may involveHuman role
Specification and tender analysisExtracting requirements from long documentsEngineers confirm interpretation
Proposal draftingReusing approved past contentBid teams verify
Engineering knowledge assistantAnswering from internal standards and lessons learnedEngineers apply judgement

Track overview: AI for pharmaceutical equipment and engineering companies.

Commercial and GTM teams

Potential large language models applications for commercial and gtm teams (claim level: potential)
Potential applicationWhat it may involveHuman role
Account and project briefsSummarising public informationSales verifies facts and sources
Signal extraction from newsIdentifying possible project mentionsAnalysts verify
Outreach and content draftsTailored draftsApproval before use

Track overview: AI for pharma GTM.

A typical workflow

  1. Define the task and the sources the answer must rely on
  2. Prepare and control the source documents
  3. Retrieve relevant passages
  4. Generate an answer with references
  5. User checks the answer against references
  6. Decision or action taken by the user
  7. Log interactions where required
  8. Monitor quality and update sources
A generic large language models workflow. Real implementations vary.

Data requirements

LLMs are usually pre-trained by their developers. The organisation's data work focuses on the documents supplied as context: they must be current, approved, well structured and access-controlled. It also means understanding what the provider does with submitted data, including retention and use for training.

See pharmaceutical data for AI.

The human role

Users formulate questions, check answers against sources and remain responsible for what they do with the output. Content owners keep source documents current. Reviewers with subject knowledge are essential, because LLM errors are often plausible.

Limitations

  • LLMs can state incorrect information fluently, often called hallucination.
  • Answers can vary for the same question.
  • Knowledge from pre-training may be outdated or wrong for a specialised domain.
  • Context limits mean long documents may be partially processed.
  • Provider model updates can change behaviour.

Governance considerations

Governance considerations for large language models
ConsiderationWhy it matters
Grounding and citationMakes answers checkable
Data confidentialityControls what information leaves the organisation
Version managementKeeps behaviour stable and changes controlled
Security testingAddresses prompt injection and data leakage
Use restrictionsDefines where LLM outputs must not be used without further controls

See AI governance in Pharma.

Applicable regulatory guidance differs by product, market and use; consult current guidance from the relevant authorities and standards bodies.

Questions to ask before using it

  1. Which documents must answers be based on, and are they controlled?
  2. How will users verify answers?
  3. What data will be sent to the model, and where is it processed?
  4. How will model version changes be managed?
  5. Which decisions must never rely on an unchecked LLM output?

See also AI implementation in Pharma and the AI use cases in Pharma directory.

Frequently asked questions

What are large language models in pharma?

Large language models in pharma are generative AI models trained on large amounts of text that can interpret and produce language. They may support document question answering, summarisation, extraction and drafting in pharmaceutical and supplier organisations.

What is LLM hallucination?

Hallucination is when a language model generates content that sounds plausible but is incorrect or unsupported, such as a wrong fact or an invented reference. Grounding answers in approved documents and checking them reduces, but does not remove, this risk.

Can LLMs be used in GxP processes?

LLMs may support GxP-related work, for example retrieving procedures, where the intended use, validation approach, data controls, review and monitoring are defined. Using unchecked LLM outputs in GxP decisions would not be appropriate.

What is the difference between an LLM and retrieval-augmented generation?

An LLM generates text from what it learned in training plus the prompt. Retrieval-augmented generation adds a step that retrieves relevant documents and supplies them to the LLM, so answers can be based on, and checked against, specific sources.

Are LLMs a reliable source of pharmaceutical information?

No. LLMs are not a source of truth. They should be used to work with trusted sources, and their outputs should be verified by people with subject knowledge.