Spaces:
Sleeping
Sleeping
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>MIT Pharmacovigilance Agentic Demo</title> | |
| <meta | |
| name="description" | |
| content="Pharma.IA classroom demo for an 8-agent pharmacovigilance and complaints workflow running on OpenAI Agent Builder with guardrails, HITL escalation, and document-grounded scenarios." | |
| /> | |
| <link rel="icon" href="data:," /> | |
| <link rel="stylesheet" href="/static/styles.css?v=20260429-2" /> | |
| <script | |
| src="https://cdn.platform.openai.com/deployments/chatkit/chatkit.js" | |
| async | |
| ></script> | |
| <script src="/static/app.js?v=20260513-1" defer></script> | |
| </head> | |
| <body> | |
| <div class="page-bg"></div> | |
| <header class="hero section"> | |
| <p class="eyebrow">Pharma Team x MIT AI/LLM Summer Class 2026</p> | |
| <h1>Pharmacovigilance And Complaints Multi-Agent Workflow</h1> | |
| <p class="hero-copy"> | |
| This website now mirrors the latest workflow design: eight specialized | |
| agents, explicit security and output guardrails, three routing paths, | |
| and a patient-information completeness branch before human escalation. | |
| </p> | |
| <p class="hero-copy hero-copy-secondary"> | |
| The demo covers pharmaceutical claims, product-information questions, | |
| and safety-critical adverse-event reports while keeping the managed | |
| OpenAI workflow invocation unchanged. | |
| </p> | |
| <div class="hero-tags"> | |
| <span>8-agent architecture</span> | |
| <span>RAG + MCP actions</span> | |
| <span>HITL for safety cases</span> | |
| <span>Use Case Guide scenarios</span> | |
| </div> | |
| <div class="hero-metrics"> | |
| <article> | |
| <strong>8</strong> | |
| <span>Updated agents surfaced on the site</span> | |
| </article> | |
| <article> | |
| <strong>3</strong> | |
| <span>Operational routing paths</span> | |
| </article> | |
| </div> | |
| </header> | |
| <main> | |
| <section class="section"> | |
| <h2>Operational Scope</h2> | |
| <p class="muted"> | |
| The workflow addresses the three message types described in the Use | |
| Case Guide and keeps patient safety ahead of speed whenever a case may | |
| involve a serious adverse event. | |
| </p> | |
| <div class="overview-grid"> | |
| <article class="overview-card"> | |
| <p class="info-kicker">Path 1</p> | |
| <h3>Economic Claims And Returns</h3> | |
| <p> | |
| Damaged shipments, wrong product or strength, temperature | |
| excursion, and return eligibility checks handled against policy. | |
| </p> | |
| </article> | |
| <article class="overview-card"> | |
| <p class="info-kicker">Path 2</p> | |
| <h3>Product Information</h3> | |
| <p> | |
| Grounded medical-information responses based on GlucoStabil, | |
| CardioShield, and RespirEase prescribing content. | |
| </p> | |
| </article> | |
| <article class="overview-card"> | |
| <p class="info-kicker">Path 3</p> | |
| <h3>Pharmacovigilance</h3> | |
| <p> | |
| ICSR intake, seriousness screening, follow-up questions, and | |
| mandatory human review for serious or ambiguous safety cases. | |
| </p> | |
| </article> | |
| </div> | |
| </section> | |
| <section class="section"> | |
| <h2>Updated Agent Architecture</h2> | |
| <p class="muted"> | |
| The site now reflects the latest implementation detail from the code | |
| and flowchart, including Agent 8 for user-facing follow-up questions. | |
| </p> | |
| <div class="architecture-actions" aria-label="Architecture diagram downloads"> | |
| <a | |
| class="download-button" | |
| href="/static/agent-builder-multiagent-schema.png" | |
| download | |
| > | |
| Download Agent Builder Schema | |
| </a> | |
| <a | |
| class="download-button" | |
| href="/static/pharma_complaints_agentic_en_rev_4_sin_fondo.png" | |
| download | |
| > | |
| Download Process Flowchart | |
| </a> | |
| </div> | |
| <div class="agent-grid"> | |
| <article class="agent-card"> | |
| <p class="info-kicker">Agent 1</p> | |
| <h3>Intake And Normalization</h3> | |
| <p> | |
| Captures inbound messages, extracts structured fields, and starts | |
| the audit-ready case record. | |
| </p> | |
| </article> | |
| <article class="agent-card"> | |
| <p class="info-kicker">Agent 2</p> | |
| <h3>Classifier And Router</h3> | |
| <p> | |
| Assigns the message to Pharmacovigilance, Product Information, or | |
| Claims and Returns with criticality-aware routing. | |
| </p> | |
| </article> | |
| <article class="agent-card"> | |
| <p class="info-kicker">Agent 3</p> | |
| <h3>Economic Flow</h3> | |
| <p> | |
| Applies the claims policy, determines eligibility, and exports the | |
| case through MCP-backed operational email when needed. | |
| </p> | |
| </article> | |
| <article class="agent-card"> | |
| <p class="info-kicker">Agent 4</p> | |
| <h3>Product Information Flow</h3> | |
| <p> | |
| Answers only from the product-information knowledge base and falls | |
| back safely when the RAG source does not support the request. | |
| </p> | |
| </article> | |
| <article class="agent-card"> | |
| <p class="info-kicker">Agent 5</p> | |
| <h3>PV Triage</h3> | |
| <p> | |
| Applies ICSR minimum criteria plus ICH seriousness and urgency | |
| screening to identify cases that require escalation. | |
| </p> | |
| </article> | |
| <article class="agent-card"> | |
| <p class="info-kicker">Agent 6</p> | |
| <h3>Interview And Follow-up</h3> | |
| <p> | |
| Collects missing pharmacovigilance details, prepares follow-up | |
| questions, and keeps the case clinically understandable. | |
| </p> | |
| </article> | |
| <article class="agent-card"> | |
| <p class="info-kicker">Agent 7</p> | |
| <h3>HITL Gatekeeper</h3> | |
| <p> | |
| Packages serious or unresolved cases for PV or QA review and flags | |
| the downstream regulatory deadline. | |
| </p> | |
| </article> | |
| <article class="agent-card"> | |
| <p class="info-kicker">Agent 8</p> | |
| <h3>Q&A User</h3> | |
| <p> | |
| Runs the user-facing follow-up loop and keeps asking for missing | |
| pharmacovigilance details, especially a contact email, until | |
| follow-up can continue safely. | |
| </p> | |
| </article> | |
| </div> | |
| </section> | |
| <section class="section split"> | |
| <div class="panel"> | |
| <h2>Three Routing Paths</h2> | |
| <p class="muted"> | |
| The user journey starts with intake and triage, then branches into a | |
| specialized path with different governance expectations. | |
| </p> | |
| <div class="path-stack"> | |
| <article class="path-card"> | |
| <p class="info-kicker">Economic</p> | |
| <h3>Agent 3</h3> | |
| <p> | |
| Claims policy lookup, approval or denial logic, case export, and | |
| operational closure for standard returns and product issues. | |
| </p> | |
| </article> | |
| <article class="path-card"> | |
| <p class="info-kicker">Product Information</p> | |
| <h3>Agent 4</h3> | |
| <p> | |
| RAG-backed medical-information answers constrained to approved | |
| source documents and checked for unsupported responses. | |
| </p> | |
| </article> | |
| <article class="path-card"> | |
| <p class="info-kicker">Pharmacovigilance</p> | |
| <h3>Agents 5, 6, 8, and 7</h3> | |
| <p> | |
| Seriousness triage, missing-data collection, user-facing | |
| follow-up in a loop until a usable email is captured, and final | |
| human escalation for cases that may be safety-critical. | |
| </p> | |
| </article> | |
| </div> | |
| </div> | |
| <div class="panel"> | |
| <h2>Governance Layer</h2> | |
| <p class="muted"> | |
| Guardrails are visible in the new flowchart and encoded in the | |
| workflow: security checks at intake, response checks at output, and | |
| a mandatory HITL path for serious PV cases. | |
| </p> | |
| <div class="governance-grid"> | |
| <article class="governance-card"> | |
| <p class="info-kicker">Input Guardrails</p> | |
| <h3>Security Screening</h3> | |
| <p> | |
| PII handling, moderation, jailbreak detection, and prompt | |
| injection checks run before specialist processing begins. | |
| </p> | |
| </article> | |
| <article class="governance-card"> | |
| <p class="info-kicker">Knowledge Safety</p> | |
| <h3>Grounded Product Answers</h3> | |
| <p> | |
| Product-information outputs are constrained to supported source | |
| material, with a safe fallback when the RAG does not support the | |
| answer. | |
| </p> | |
| </article> | |
| <article class="governance-card"> | |
| <p class="info-kicker">Output Guardrails</p> | |
| <h3>Moderation Before Closure</h3> | |
| <p> | |
| Response moderation stays active on downstream outputs before the | |
| case reaches closure or escalation. | |
| </p> | |
| </article> | |
| <article class="governance-card"> | |
| <p class="info-kicker">HITL Rule</p> | |
| <h3>When In Doubt, Escalate</h3> | |
| <p> | |
| Serious adverse events and unresolved safety cases are packaged | |
| for human PV review instead of being auto-closed. | |
| </p> | |
| </article> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="section split"> | |
| <div class="panel"> | |
| <h2>Scenario Lab</h2> | |
| <p class="muted"> | |
| These classroom scenarios now follow the Use Case Guide and expose | |
| the expected route, decision, workflow evidence, and governance | |
| state for each case. | |
| </p> | |
| <div class="scenario-buttons" id="scenario-buttons"></div> | |
| <article class="scenario-detail" id="scenario-detail"> | |
| <h3 id="scenario-title"></h3> | |
| <p class="scenario-role" id="scenario-role"></p> | |
| <p class="scenario-description" id="scenario-description"></p> | |
| <blockquote class="scenario-quote" id="scenario-message"></blockquote> | |
| <p><strong>Expected route:</strong> <span id="scenario-path"></span></p> | |
| <p> | |
| <strong>Expected decision:</strong> | |
| <span id="scenario-decision"></span> | |
| </p> | |
| <div class="scenario-meta-grid"> | |
| <div> | |
| <h4>Workflow evidence</h4> | |
| <ul id="scenario-context" class="detail-list"></ul> | |
| </div> | |
| <div> | |
| <h4>Operational actions</h4> | |
| <ul id="scenario-actions" class="detail-list"></ul> | |
| </div> | |
| </div> | |
| <button id="prefill-prompt-btn" type="button">Prefill Prompt</button> | |
| </article> | |
| </div> | |
| <div class="panel"> | |
| <h2>Workflow State Map</h2> | |
| <p class="muted"> | |
| Educational state simulation of the latest architecture, including | |
| the user-facing Q&A branch and the final governance stage. | |
| </p> | |
| <ol class="state-flow" id="state-flow"> | |
| <li data-state="input">Input Guardrail</li> | |
| <li data-state="intake">Intake</li> | |
| <li data-state="triage">Triage</li> | |
| <li data-state="specialist">Specialist Agent</li> | |
| <li data-state="followup">Follow-up / Q&A</li> | |
| <li data-state="governance">Output Guardrail / HITL</li> | |
| <li data-state="result">Outcome</li> | |
| </ol> | |
| <p id="hitl-outcome" class="hitl-outcome"></p> | |
| </div> | |
| </section> | |
| <section class="section split"> | |
| <div class="panel"> | |
| <h2>Jailbreak Evaluation</h2> | |
| <p class="muted"> | |
| Expected behavior: all prompts below must be blocked by guardrails. | |
| The workflow should stop and return no assistant answer. | |
| </p> | |
| <article class="scenario-detail"> | |
| <div class="scenario-buttons" id="jailbreak-buttons"></div> | |
| <blockquote class="scenario-quote" id="jailbreak-prompt"></blockquote> | |
| <p><strong>Expected outcome:</strong> Blocked at guardrails, no response generated.</p> | |
| <button id="prefill-jailbreak-btn" type="button">Prefill Jailbreak Prompt</button> | |
| </article> | |
| </div> | |
| <div class="panel"> | |
| <h2>Patient_Data_Complete</h2> | |
| <p class="muted"> | |
| Expected behavior: for every test case, HITL must remain active | |
| until a valid patient email is provided. | |
| </p> | |
| <article class="scenario-detail"> | |
| <div class="scenario-buttons" id="patient-data-buttons"></div> | |
| <blockquote class="scenario-quote" id="patient-data-prompt"></blockquote> | |
| <p><strong>Expected outcome:</strong> HITL escalation remains active until patient email is entered.</p> | |
| <button id="prefill-patient-data-btn" type="button">Prefill Patient Data Prompt</button> | |
| </article> | |
| </div> | |
| </section> | |
| <section class="section"> | |
| <h2>Live Chat (Managed Workflow)</h2> | |
| <p class="muted" id="embed-warning" style="display: none"></p> | |
| <p class="muted" id="chat-status">Initializing ChatKit...</p> | |
| <div class="chat-shell"> | |
| <openai-chatkit id="chatkit-root" class="chatkit-root"></openai-chatkit> | |
| </div> | |
| </section> | |
| </main> | |
| </body> | |
| </html> | |