Pharma AI glossary
RAG (Retrieval-Augmented Generation)
Architecture in which the system first retrieves relevant passages from a controlled corpus (your SOPs, your regulations, your records) and requires the LLM to answer from them, typically with citations.
Definition
Architecture in which the system first retrieves relevant passages from a controlled corpus (your SOPs, your regulations, your records) and requires the LLM to answer from them, typically with citations. Benefits: grounded answers, current information, checkable sources, reduced hallucination. Limits: retrieval can miss or mis-rank the relevant passage, and the model can still misread what it retrieved, so RAG converts verification from "is this true?" to the faster "does the cited source say this?", which is an improvement, not an exemption.
Grounding generative answers
RAG retrieves relevant documents (SOPs, batch records, CAPA files, change-control packages, prior investigations) then conditions the answer on those chunks inside an agent or application harness. It improves traceability when citations and retrieval logs are stored with the workflow, but stale indexes, wrong permissions, or skipped human review still break GxP expectations.
In regulated use
The validated scope is the end-to-end system: index versioning, access control, retrieval logging, generation, and human approval before official commit. Auditability means an inspector can reconstruct which sources the agent saw and who released the final record, whether that is an investigation narrative, CAPA summary, or training answer.
Knowledge graphs and structured context
Document RAG retrieves text chunks; knowledge graphs store entities (batches, materials, equipment, suppliers, investigations, CAPA) and how they connect. Agents can traverse those relationships for recurrence analysis, impact assessment, and cross-site trending with clearer lineage than flat search alone. The governed object is still the full harness: graph sync from source systems, access control, change control on graph updates, and logged traversals paired with human review before official action.
Frequently asked questions
Is RAG a validated computer system?
When it sits in a GxP workflow, the pipeline (index, retrieve, generate, log, review gate) is what you qualify, not retrieval alone. Scope includes data freshness, security, failure handling, and audit trails when retrieval returns nothing or the wrong corpus.
Can RAG support deviation drafting workflows?
Yes, as part of a governed agent harness. Workflow should keep the agent in read/draft mode until a qualified person approves; governance limits which record types and systems it may access; auditability stores retrieved chunks, citations, and approvals with the record.
Which other GMP workflows commonly use RAG?
SOP and work-instruction lookup, batch record and logbook search, CAPA and change-control research, supplier quality document review, and training Q&A over approved corpora. The harness must mirror source-system permissions and version control for each corpus.
Related terms
Benchmark your AI literacy
Free 20-question assessment, eight modules, and instant scoring, built for pharma quality and manufacturing teams.
Open the Literacy CenterBrowse all terms
See the full 71-term glossary index or search interactively in the Literacy Center.
Back to glossary hub →Educational content only, not legal or regulatory advice. Regulatory guidance cited here includes drafts (FDA AI credibility guidance; EU GMP Annex 22) as of August 2026; verify against final texts before relying on them in submissions. Company-reported figures (Merck CSR timings, Sanofi results) are labeled where used. MIT's ~95% pilot figure carries its own caveat (~150 interviews, contested definitions, not peer-reviewed). Re-check sources on module finalization.