We use cookies to operate this site, measure performance, and improve your experience. See our Privacy Policy or manage your privacy choices.

    Demo kits / Pharmaceuticals

    Pharmaceutical demo kit

    The quality system of Fennelmoor Pharmaceuticals, a fictional generics manufacturer tracing an out-of-specification impurity back through its batches and forward into its markets, plus a real product-listing corpus from the FDA drug directory. Packaged as a loadable knowledge graph with fifteen competency questions and their expected answers, it loads into a free Fluree ledger in about two minutes.

    Create a Free Workspace

    No signup needed. After downloading, hand it to a coding agent, load it in a free workspace, or run it locally: the setup section covers all three, and takes about two minutes either way. Background reading: Fluree for Pharma.

    Kit facts

    Download
    18 KB zip, 8 files
    Model
    15 classes and 70 properties
    Data
    146 entities, 80 real openFDA listings
    Questions
    15, each with an expected answer
    Standards used
    openFDA drug NDC directory
    Data source
    CC0 1.0 public domain, openFDA
    Runs on
    Free hosted workspace, or the Fluree CLI
    Updated
    August 2026
    The Scenario

    Fennelmoor Pharmaceuticals, August 2026

    Two layers in one graph: a fictional quality system working a live impurity investigation, and a real registry corpus of published drug listings. The questions join what QMS, ERP, regulatory, and distribution systems normally keep apart.

    An incoming API lot from Kestrel Fine Chemicals failed the Impurity A specification at 0.19% against a 0.15% limit. One batch made from it never left the building. The harder question is the three released batches made from earlier Kestrel lots that passed: 1,150,000 units already in four markets, two of them with a one-day reporting clock.

    The warnings were on file long before the failure. A February audit recorded that the supplier tested for the impurity only at end of batch, with no in-process control. The certificates of analysis trended upward across three lots. The supplier disclosed a process change four days after the result came back, not before it.

    Every molecule in the fictional layer is invented and verified against the FDA registries as non-existent, so a fabricated quality failure never lands on a real medicine. The 80 openFDA listings alongside it carry only what the FDA publishes.

    What you can answer with it

    • Batch genealogy an ingredient lot forward to every batch, shipment, and market
    • Recall scope size it in units and countries before the clock runs out
    • Early warnings which audit findings and test trends predicted the failure
    • Decision trail tie a hold, release, or recall to its exact evidence
    • Partner access batch visibility without exposing open investigations

    The documented trail

    1. Feb 6Audit observation: no in-process control on the impurity pathway
    2. Jun 28Certificate of analysis: 0.14%, highest of three lots, still in limit
    3. Jul 2Incoming test: 0.19% against a 0.15% limit. Out of specification
    4. Jul 6Supplier discloses a May process change, after the fact
    5. Aug 4German authority requests the full distribution list
    6. Aug 18Batch TVX-2603 recalled in Germany and Great Britain
    Setup

    Loading the kit

    Three ways to run the kit, all free and all about two minutes. Every step is also written out in the README inside the download.

    Fastest · Your coding agent does it

    Paste this into Claude Code or Cursor

    Any agent with terminal access can install the CLI, load the kit, validate it, and then answer the packaged questions and check itself against the expected answers that ship inside.

    I downloaded pharma-demo-kit.zip from flur.ee. Please set it up and check that it works:
    
    1. Unzip it and read README.md.
    2. Install the Fluree CLI if I don't have it: brew install fluree/tap/fluree
    3. Create a ledger and load the files in the order the README gives.
    4. Run the SHACL validation and confirm the data conforms.
    5. Then open competency-questions.md. Answer each question by querying the graph,
       and compare your answer to the expected answer written under it.
    
    Tell me which questions matched, which did not, and what the graph let you
    answer that separate systems could not.
    Or · No install

    Fluree AI, hosted

    A workspace in the browser with the AI agent built in. Free tier, no credit card. This is the path for asking the questions in plain English.

    Or · Local, for developers

    The Fluree CLI

    A single binary installed with Homebrew. This is the path for running the included SPARQL queries directly and for scripting.

    brew install fluree/tap/fluree

    CLI reference and install docs at docs.flur.ee

    1. 01

      Create an empty ledger

      In the workspace, add a new ledger; on the CLI, run fluree create. A ledger is a Fluree database, empty until you load it.

    2. 02

      Import the five data files

      Load model.jsonld first, then the four instances files. The model file defines the vocabulary the instance files use.

    3. 03

      Run the questions

      Ask the AI agent the competency questions as written and compare each response against the expected answer. CLI users can run the included SPARQL queries directly.

    pharma-demo · load and validate
    $ fluree create pharma-demo
    $ fluree insert -f model.jsonld
    Committed t=1 · 527 flakes
    $ fluree insert -f instances-ndc-corpus.jsonld
    Committed t=5 · 805 flakes
    $ fluree validate --shacl shapes.json
    Conforms: true (6 shapes checked)
    Competency Questions

    Questions with the answers attached

    Fifteen questions ship in the kit, each with the expected answer, so you can verify the responses are grounded rather than guessed. Here is one, exactly as packaged.

    Question 4

    How many units of supplier-affected product are in the market?

    Expected answer

    1,150,000 units across six shipments, spanning three released batches that used Kestrel material and reached the US, Germany, and Great Britain. This is the number a recall decision has to size, and it comes from one traversal: supplier to API lot to batch to shipment to market.

    The nine quality questions

    Each is answerable only by combining more than one source domain. The note under each describes what the query touches.

    1. 01Which batches used the out-of-specification API lot, and where do they stand?Traverses API lot to the batches that consumed it
    2. 02What does the Impurity A trend across API lots look like?Compares every incoming result against the same specification
    3. 03Which batches contain Kestrel material, and which markets did they reach?Walks supplier to lot to batch to shipment to market
    4. 04How many units of Kestrel-sourced product are in the market?Aggregates shipment quantities across the affected genealogy
    5. 05If we have to notify health authorities, which market has the tightest clock?Reads reporting windows on the market registrations
    6. 06What was on file about this supplier before the out-of-specification result?Filters the document trail by date against the failure

    Six further questions ship in the kit: three over the real openFDA corpus and three over the policy module.

    Modules

    Extend the kit, one capability at a time

    Each module is a separate download that adds one capability to the same scenario. Load the core kit first; each module’s README carries the full recipe with its outputs pasted verbatim.

    Module · 3 questions

    Governed access

    One question, asked by different people, returns different answers, enforced by the database rather than by prompts or separate copies.

    A contract manufacturer sees every batch it needs, while open deviation investigations stay invisible and the reasoning on quality decisions stays internal.

    One insert adds two identity records and five stored access policies. Pass the identity with --as; the query text never changes.

    Download the module (4 KB, 5 files)

    q-deviations.sparql · same query, twice
    $ fluree query -f q-deviations.sparql --as …#qualityLead
    1 row · critical impurity deviation, under investigation
    $ fluree query -f q-deviations.sparql --as …#cmoPartner
    0 rows · decisions stay visible, rationale blank
    Downloads

    What is in each zip

    The core kit is eight files. The policy module is a separate zip, self-contained with its own README. Nothing requires a signup.

    pharma-demo-kit.zip

    Download (18 KB)
    • model.jsonldThe vocabulary: lots, batches, specifications, deviations, registrations. Annotated throughout.
    • instances-supply.jsonldThe manufacturer, four products, three API suppliers, six lots, and the incoming test trend.
    • instances-quality.jsonldBatches and their genealogy, the deviation and its evidence, CAPAs, decisions, documents.
    • instances-market.jsonldNine market registrations with reporting windows, and ten shipments.
    • instances-ndc-corpus.jsonld80 real openFDA drug listings, per-record provenance.
    • shapes.jsonSHACL integrity rules, run in-database with fluree validate.
    • competency-questions.mdAll 15 questions with expected answers.
    • README.mdLoad instructions, data-source and license details, and the fiction firewall.
    pharma-policy-module.zip4 KB · 5 files

    Governed access

    policy.jsonld, three queries, README with verified outputs

    Download

    The shipped data conforms to the included SHACL shapes; break it and fluree validate names the violations.

    Support

    Questions about the kit

    For a guided walkthrough of the kit, or to talk about running the same pattern on your own data, contact us.