Guide
Operational context in pharma: ontologies, knowledge graphs, and source grounding

In brief
Operational context is what makes data from different plant systems usable together: a definition of the things an operation deals with and how they relate, a graph holding the actual instances and their links, and a record of where every value came from. Collecting data in one place does not produce it. A data lake solves location and access, but it does not tell you that a tag in one system and an asset number in another describe the same vessel. This guide covers that distinction, the standards that already exist, and what regulators expect of traceability.
Key takeaways
- Copying records does not create a relationship. Where equivalent identifiers are not already mapped, someone in the operation has to state the mapping and keep it current.
- A taxonomy sorts agreed terms into broader and narrower categories. An ontology adds the relationships and constraints that let a system interpret them, and a knowledge graph holds the specific vessels, batches, and materials those definitions describe.
- Replacing a vessel can break a trend without anyone noticing. The second edition of IEC 61512-1, published in 2026, and the 2025 update to ISA-95 Part 1 both separate role-based equipment from the physical asset, for this reason.
- Matching identifiers across systems is addressed by ISA-95 Part 7, the Alias Service Model. Deciding who owns and maintains each mapping is not, and stays with the operation.
- Regulators already ask for the context, not just the value. MHRA's March 2018 data integrity guidance defines metadata as what supplies context and meaning, and PIC/S PI 041-1 requires records to be complete and consistent, including formats and units.
One vessel, five names
A 2,000-liter bioreactor in Suite 2 appears in the process historian as the tag path S2.A14.BR003.TT01.PV, which encodes site, area, equipment, instrument, and process value. The maintenance system holds it as asset BIO-2291, described as Bioreactor #3, Suite 2. The batch system calls it work unit WU-BR-03 under a work center. The engineering drawing register calls it V-2140. The validation master plan calls it BRX-3.
Five identifiers, one vessel, and no system records the equivalence. A question as ordinary as which deviations touched this bioreactor last quarter is answered by a person who holds the mapping in their head, and that person is a single point of failure.
It gets worse when the asset changes. Replace the vessel after a failure and maintenance retires BIO-2291 and issues BIO-2847, while the historian keeps BR003, because that tag names a position rather than a thing, and the batch system keeps WU-BR-03, because a work unit is a role. A trend drawn across the replacement date now mixes two physical vessels without saying so. The standards bodies have been separating these two ideas for the same reason: the second edition of IEC 61512-1, published in 2026, describes a role-based equipment model distinct from an equipment entity model, and the 2025 update to ISA-95 Part 1 similarly separates role-based equipment from physical assets.
*Values in the description are illustrative only.
Materials behave the same way. Procurement knows a vendor part number and a supplier code. The warehouse knows a lot number and a bin. The laboratory knows a sample identifier drawn from that lot and tested against a specification. The batch record references a raw material code consumed at step 14. The dossier identifies the substance by its FDA Unique Ingredient Identifier. Answering which batches used a given supplier's material means reconciling those records first.
Then there’s the collision that produces a wrong answer rather than no answer. Two systems both record a column called yield. One means grams of product per liter of harvest. The other means percent of theoretical. Both are consistent with themselves. Averaged together they mean nothing, and nothing in either system flags the overlap or disconnect.
What operational context is
Operational context is the set of statements that make those five names resolve to one vessel.
It has three parts, and they do different work. The first is a definition of the things the operation deals with and how they relate to each other: vessels, materials, lots, batches, procedures, results, and people. The second is a store of the actual instances and their links: this vessel, this lot, this batch, consumed at this step. The third is a record, attached to every value, of the document or system it was read from.
The hard part is not getting the data. It’s knowing what the data refers to. An operation can hold a complete copy of every system it runs and still be unable to answer a question that crosses two of them, because the information needed to do the crossing itself was never in either one.
Taxonomy, ontology, and knowledge graph
These three words are often used interchangeably in conversations, but they shouldn’t be. Each item is distinct.
| Term | What it contributes | Plant example |
|---|---|---|
| Taxonomy | Organizes agreed terms into broader and narrower categories, so records can be classified consistently | A bioreactor is a type of process equipment |
| Ontology | Defines concepts, their properties, relationships, and constraints, so systems can interpret them consistently | A bioreactor has a working volume and can be used in a batch step |
| Knowledge graph | Connects specific entities and their properties across records, so their relationships can be queried together | Vessel BIO-2291 was used in a particular batch and is also recorded as BRX-3 in the validation system |
The distinction matters at the moment a question crosses systems. Shared definitions explain what the records mean. The knowledge graph records which vessel, batch, or material they refer to and how those things are connected. Someone still has to establish and maintain the connections.
Why collecting it in one place does not solve this
The standard response to data scattered across systems is to centralize it. The instinct is reasonable, but it only addresses one half of the problem.
The FAIR principles, published in Scientific Data in 2016, separate the halves explicitly. Findable and Accessible concern location and retrieval. Interoperable is a separate requirement, specified as three things: a formal shared language for representing knowledge, vocabularies that are themselves governed, and qualified references between records. Centralized storage can support findability and access. It does not by itself satisfy interoperability, which FAIR enumerates separately because it’s not a consequence of access.
The technical reason is narrow. Copying a record preserves its contents and its original structure. It does not create a missing assertion that two records describe the same real-world thing. The historian's BR003 is not linked to the maintenance system's BIO-2291 in the historian, not linked in the maintenance system, and therefore not linked in any copy of either. Ingestion is faithful to the data and empty with respect to the relationship.
Deferring interpretation to query time moves the problem rather than solving it. Every analyst reconstructs the mapping independently, and each reconstruction is undocumented, unversioned, unreviewed, and invisible to the next person. Ten analysts produce ten mappings, and the risk is several different answers to one question. Mappings written into query code can be inspected, tested, and approved, but only if the code is governed. Without versioning, ownership, and review, they cannot be reused or audited.
Three consequences follow, and they’re the ones an operation cares about.
- Joins become inference. With no shared identifier, systems are joined on timestamps, on fuzzy matches against free-text descriptions, or on an analyst's recollection. Without recorded evidence and review, an inferred match can be mistaken for an established fact. Joining on time also depends on clocks that may differ between systems and may not record a time zone at all.
- The answer is not reproducible. The same question asked twice, by two people or six months apart, can return different numbers.
- There’s nothing to inspect. No artifact records what was mapped to what, so a reviewer or an inspector has nothing to review.
What a knowledge graph holds
A graph is a plain structure. Nodes are things. Edges are relations between them.
In a plant the nodes are the vessel, the lot, the batch, the step, the result, the specification, the procedure, the deviation, and the person. The edges are the statements that connect them: this batch was produced on that vessel, consumed that lot, executed that procedure version, produced that result, raised that deviation. Each entity carries a globally unique identifier, so a reference to it is unambiguous wherever it appears.
The benefit is that the join is retrieved rather than inferred. Which batches used material from lot 2231-B, and which of them raised a deviation, becomes a traversal of recorded edges rather than a reconstruction. The links were defined once, by an accountable party, and can be examined.
A shared vocabulary is a living artifact rather than a one-time decision. The OBO Foundry's principles state the strongest version of the rule: a term's identifier must always denote the same referents, and a change substantive enough to alter meaning requires a new identifier rather than a redefinition of the old one. That rule is what keeps an answer given two years ago still meaning what it meant then. Without it, historical results drift silently.
Published work exists in this domain. A paper in PLOS ONE in January 2026 described a bioprocess knowledge graph built on a four-level ontology, with a dictionary mapping term variants to standard names, and an interface that shows the source sentence and the identifier of the publication behind every link. A NIST-authored paper presented at ASME IDETC-CIE in 2024 built an ontology and knowledge graph for verification of a fed-batch bioreactor operation and tested it with executable queries derived from competency questions. Both are worth reading, and both are careful about what a graph is: a record of what the sources say, not an oracle.
Source grounding is not the same as being right
Source grounding means that every value carries a path back to the record it came from, so a result can be taken apart and checked.
A grounded answer can still be wrong. That’s the point. When it is wrong, the error is findable, because the chain from conclusion to source is recorded. An answer without source links needs other adequate evidence before it can support a regulated decision, and apparent correctness is not that evidence.
The W3C has published a vocabulary for this since 2013. PROV-O names three core classes. An entity is a thing: physical, digital, or conceptual. An activity is something occurring over a period that acts on entities. An agent is a person, an organization, or a piece of software bearing responsibility for an entity or activity. Three of its relations state that an entity was generated by an activity, was derived from another entity, and was attributed to an agent. Mapped onto a plant, a value is an entity, the batch step or instrument run that produced it is an activity, and the operator or system responsible is an agent. Three statements give a traceable chain, in a vocabulary that has been stable for over a decade.
The Allotrope Data Format implements the same idea at file level. It carries the numbers as multidimensional data cubes, the meaning as an RDF graph built over the Allotrope ontology, shape constraints that define what a valid instance must contain, and an audit trail, in one file. The ontology suite is versioned, so an implementation should record the release it uses.
The connection to AI is direct, because an AI answer is only as inspectable as its grounding. The draft EU GMP Annex 22 asks for recorded intended use, a characterized description of input data, recorded feature attribution, logged confidence scores, and monitoring of whether inputs stay within the range the model was built for. The EMA and FDA guiding principles published in January 2026 ask for data provenance, processing steps, and analytical decisions to be documented in a traceable and verifiable manner. Both also address model quality. Provenance supports review; it does not demonstrate that a model performs.
The vocabularies already published
A plant building an ontology doesn’t start from nothing. Several bodies have already assigned definitions, which makes the remaining work smaller than it looks and different in kind.
| Publisher | What it supplies | What's pre-defined for the operation |
|---|---|---|
| ISA-88, as IEC 61512-1 | Batch, recipe, procedure, unit, equipment module, and phase, with recipe procedural elements kept separate from equipment procedural elements | The vocabulary of batch manufacturing itself |
| ISA-95, as IEC 62264 | The equipment hierarchy, material, personnel, process segment, and work order | How the plant's layers and work objects relate to each other |
| ISA-95 Part 7, the Alias Service Model | A model for exchanging equivalent identifiers and their context across manufacturing and other applications | A mechanism for carrying mappings, though not the mappings themselves |
| Allotrope | An ontology suite aligned at its upper layer with the Basic Formal Ontology, modeling equipment, material, process, and results, plus the Allotrope Data Format and a lighter JSON-based model | A model for analytical results and their meaning |
| ISO IDMP | Identification standards for substances, dose forms, units of measurement, medicinal products, and pharmaceutical products | Naming products and substances consistently with the dossier |
| GS1 | Supply-chain identification keys and EPCIS, ratified as an ISO standard, which models visibility events as what, when, where, why, and how | A structure for supply-chain event records |
| W3C | RDF, OWL 2, SKOS, SPARQL, and PROV-O: the languages for representing knowledge, relating terms, querying, and recording attribution | A representation language |
| Pistoia Alliance | An IDMP Ontology released publicly under an open license, with pharmaceutical organizations named among its supporters | Construction of an IDMP ontology |
A plant can bind its own names and records to those definitions. What cannot be bought is the part specific to one operation: which of its systems hold which entities, under which names, and who keeps those mappings current. ISA-95 Part 7 is explicit about the boundary. Section 1 of ISA's public preview separates the exchange mechanism from system ownership and namespace lifecycle management, so defining a mapping service does not assign responsibility for maintaining any particular operation's mappings.
What regulators already expect
Existing data integrity guidance addresses context and metadata directly, so none of this is an obligation invented for AI.
The MHRA's data integrity guidance, published in March 2018, defines metadata as data that describes the attributes of other data and supplies context and meaning, and names audit trails as an example. A regulator has already said, in plain language, that a value without its context is not a complete record.
PIC/S PI 041-1, which entered into force on July 1, 2021, sets out ALCOA and its four additions. Two of them bear directly here. Complete requires that all information needed to recreate an event be retained, including relevant metadata. Consistent requires that records be created, processed, and stored in a logical, defined way, including standard date formats, units, and rounding. Extending consistency from units to identifiers and terms is a difference of degree rather than of kind.
The draft revision of EU GMP Annex 11 is more specific still. It asks for documented traceability between requirements, design, and testing. It asks that routine transfer of critical data between systems rest on validated interfaces rather than manual transcription. On the migration of critical data, it asks that constraints on both the sending and the receiving side be considered, which can support an assessment of semantic mismatch during migration. That is an implication of the provision, not an express requirement to build an ontology.
Four tests for whether context is working
Ask what a value's source is. A result should resolve to the document, page, field, or system record it came from, in one step. If the answer is a table name, the grounding is incomplete.
Ask who owns the mapping. For a given entity, ask which identifiers in which systems have been declared equivalent, where that declaration lives, who approved it, and how it is versioned. Mappings need an owner, a version history, and review, whether they sit in query code or in a separate record.
Ask what happens to a term whose meaning changes. The right answer is a new identifier and a preserved old one, so that historical results still mean what they meant.
Ask what’s missing. A context layer that returns only what it found is less useful than one that reports what it expected and could not locate. Missing evidence is a finding.
One distinction is worth holding on to at the end. Connecting systems is not the same as migrating out of them, and the two have different consequences for the people who own those systems and validated them. The Context Layer approach keeps customer systems as the source of truth and holds pointers back to them, so the records stay where their owners and their validation already are.
Questions
- Is a knowledge graph just a graph database?
- No. A graph database stores nodes and connections. A knowledge graph uses those connections to represent specific things and their relationships with shared meaning. Storing records in a graph database does not establish that meaning.
- Why develop a context layer if we already have a data lake?
- A data lake solves location and access. It does not create equivalence mappings that were never recorded in the source systems. Format conversion and column alignment address differences in how values are encoded, not differences in what they mean.
- Does this require moving data out of existing systems?
- No. The links can be held as pointers back to the records in the systems that own them, which keeps those systems as the source of truth and avoids a migration.
- Can an ontology be bought off the shelf?
- Parts of it. The vocabularies for equipment, batch, material, substance, and analytical results are published by ISA, Allotrope, ISO, and others, and binding local names to them is the sensible starting point. The part that cannot be bought is the mapping specific to one operation: which of its systems hold which entities, under which names, maintained by whom.
- What is the role of AI in developing a context layer?
- AI can extract terms and relationships from documents, suggest matches between identifiers, and flag gaps or conflicting descriptions across systems. It might suggest that a maintenance record and a validation document refer to the same vessel, with links to the passages behind the match. Those are suggestions, and they need checking before they become accepted mappings. People still have to agree what the terms mean, resolve the ambiguous cases, and take responsibility for keeping the connections current.
Sources
- The FAIR Guiding Principles for scientific data management and stewardship, Nature, Scientific Data, March 15, 2016
- PROV-O: The PROV Ontology, W3C, April 30, 2013
- RDF 1.1 Concepts and Abstract Syntax, W3C, February 25, 2014
- OWL 2 Web Ontology Language Document Overview, Second Edition, W3C, December 11, 2012
- IEC 61512-1, Batch control, Part 1: Models and terminology. Second Edition, International Electrotechnical Commission, February 20, 2026
- ANSI/ISA-95.00.01-2025, Enterprise-Control System Integration, Part 1: Models and Terminology., International Society of Automation, April 1, 2025
- Allotrope Foundation Ontologies, Allotrope Foundation
- OBO Foundry Principles, OBO Foundry
- IDMP Ontology, Pistoia Alliance
- EPCIS and CBV standards, GS1
- "GXP" Data Integrity Guidance and Definitions (Revision 1), MHRA, March 1, 2018
- PI 041-1, Good Practices for Data Management and Integrity in Regulated GMP/GDP Environments, PIC/S, July 1, 2021
- Data Integrity and Compliance With Drug CGMP: Questions and Answers, U.S. FDA, December 1, 2018
- Stakeholders' consultation on EudraLex Volume 4, Chapter 4, Annex 11, and new Annex 22, European Commission, July 7, 2025
- Guiding principles of good AI practice in drug development, EMA and U.S. FDA, January 14, 2026
- Integrating text mining and knowledge graph to enhance biopharmaceutical process optimization, PLOS ONE, January 14, 2026
- A Basic Formal Ontology-Based Ontological Modeling for Plan and Occurrence, a Biomanufacturing Process Verification Use Case, ASME IDETC-CIE 2024, November 13, 2024
In this guide
- Why unstructured records slow regulated operationsIn pharmaceutical operations, much of the evidence behind a batch sits in unstructured records: paper batch records, supplier certificates of analysis, lab reports and deviation records that no system can query. The records are complete and controlled, but answering a question across them means finding, reading, and retyping them by hand. That slows investigations, supplier qualification, and batch review, and it keeps experts on assembly work. Turning those records into structured, source-linked data removes that step without replacing the systems that hold them.
- What FDA's draft AI guidance asks for, and what it leaves outFDA's draft guidance Considerations for the Use of Artificial Intelligence To Support Regulatory Decision-Making for Drug and Biological Products, issued in January 2025 and still a draft as of September 2026, sets out a seven-step, risk-based framework for establishing that an AI model is credible for a defined context of use. It applies to AI that produces information supporting regulatory decisions about a drug's safety, effectiveness, or quality. It excludes AI used in drug discovery and AI used for operational efficiencies that do not affect patient safety.
Read next
Context Layer
A connected, source-grounded view of the operational information needed for the work.
See How It Works




