| Dimension | Semantic Layer | Ontology | Gold Standard Dataset |
|---|---|---|---|
| What it is | Governed business-term definitions — what words mean in this organization's context | Structured map of domain concepts, their properties, and relationships — how things connect | Verified Q&A benchmark — ground truth the agent is scored against |
| Purpose | Ensures consistent meaning across all users, reports, and systems. Eliminates conflicting interpretations. | Gives the agent a reasoning framework — enables it to navigate relationships and apply rules | Provides an objective, expert-validated measure of agent accuracy |
| Food & Bev Example | "GRAS compliant" = FDA GRAS status confirmed, applicable concentration range specified, US jurisdiction only — not EU authorized | Ingredient → contains → Compound → has property → Stability → under condition → Temperature/pH → produces → Byproduct | Q: "Is acrylamide produced when frying potatoes?" | A: "Yes — Maillard reaction above 120°C between asparagine and reducing sugars" | Source: EFSA 2015 |
| Who validates | Business stakeholders + data governance team | R&D scientists and domain experts | R&D scientists — every reference answer requires expert sign-off |
| Primary Tools | Alation (business glossary), dbt metrics layer, Unity Catalog, Tableau semantic layer | Protégé (OWL/RDF), draw.io, JSON-LD, YAML schema | Excel / Google Sheets (curation), Python (scoring), Ragas (eval framework), MLflow (tracking) |
| BA Outputs | Data dictionary, business glossary, report dictionary, metric definitions, lineage maps | Entity-relationship diagram, concept hierarchy, relationship map, JSON/YAML schema for agent consumption | Structured test set (Q | reference answer | source | category | pass criteria), evaluation report, failure analysis |
| Build sequence | First — defines terms before anything else can be consistent | Second — uses semantic layer terms to build the relationship map | Third — uses ontology structure to formulate valid test questions |
| Agent dependency | Agent uses semantic layer to interpret user queries correctly | Agent uses ontology to reason across relationships — finds that "E300" = "Vitamin C" = "Ascorbic Acid" | Agent outputs are scored against gold standard — determines pass/fail, triggers tuning |
| Failure if missing | Same term means different things to different users — agent returns inconsistent answers | Agent cannot navigate relationships — treats synonyms as different entities, misses interactions | No objective measure of correctness — QA is subjective opinion, not evidence |
Your real-world parallel: Alation semantic layer at Evernorth (147 CMS reports) = semantic layer. Canonical schema across 4 EHRs at Invistics = lightweight ontology. NewsRx eval framework (88% human preference) = gold standard dataset process.
| Tool | What you use it for |
|---|---|
| Alation | Business glossary, data catalog, lineage, certified asset governance |
| dbt | Metric definitions, semantic models, governed transformations |
| Unity Catalog | Databricks data governance, asset-level access control |
| Confluence | Plain-language business glossary documentation |
| Tool | What you use it for |
|---|---|
| Protégé | Formal OWL/RDF ontology editor — heavyweight, machine-executable |
| draw.io / Lucidchart | Concept maps and relationship diagrams for stakeholder sessions |
| JSON schema / YAML | Lightweight ontology definitions the engineering team can consume directly |
| FoodOn | Existing open food ontology — starting reference, not built from scratch |
| Tool | What you use it for |
|---|---|
| Excel / Sheets | Question curation, reference answer management, scoring matrices |
| Python | Automated evaluation passes, output scoring, failure pattern detection |
| Ragas | RAG-specific evaluation framework — faithfulness, context recall, answer relevance |
| MLflow / W&B | Experiment tracking, prompt iteration history, score trends over time |
| Source | What it provides |
|---|---|
| PubMed | Peer-reviewed food science and biochemistry literature |
| PubChem | Chemical compound data, FDA-linked safety records |
| Reactome | Biochemical pathway database — metabolic validation |
| FDA GRAS | US ingredient safety classifications and conditions of use |
| EFSA | EU food safety regulatory database |
| USDA FoodData Central | Nutritional composition reference |
| Flavornet | Flavor compound database — aroma descriptors, GC data |
Feature: Agent returns ingredient safety status for a specified ingredient in a specified jurisdiction with traceable sourcing.
User Story:
As an R&D food scientist, I need to query the safety status of an ingredient by name and target market, so that I can confirm formulation compliance before entering stability testing.
Trigger: Scientist enters ingredient name and jurisdiction (US or EU) into agent interface.
Preconditions: Ingredient exists in the knowledge base. Jurisdiction is specified. Knowledge base is current (validated within 90 days).
Acceptance Criteria:
Edge Cases:
Out of Scope: Cross-ingredient interaction analysis (see BA-REQ-002). Supplier-specific sourcing data.
Dependencies: Ontology (ingredient → GRAS status mapping), Semantic layer (definition of "safe" and "authorized"), Knowledge base currency validation process.
Feature: Agent identifies known chemical or biochemical interactions between two or more ingredients under specified processing conditions.
User Story:
As an R&D food scientist developing a new formulation, I need to know whether the ingredients I have selected produce any harmful or unintended compounds during processing, so that I can make informed formulation decisions before lab validation.
Trigger: Scientist provides a list of 2+ ingredients and specifies processing condition (temperature, pH, duration).
Preconditions: All ingredients are present in the knowledge base. Processing condition parameters are within defined ranges (temperature: 0–250°C; pH: 0–14).
Acceptance Criteria:
Edge Cases:
Out of Scope: Sensory/flavor interaction modeling. Shelf-life impact analysis. Supplier-specific ingredient variants.
Dependencies: Ontology (ingredient → compound → reaction → byproduct chain), Reactome (metabolic pathway validation), PubMed integration (interaction evidence), Cross-source conflict resolution protocol (BA-PROC-001).