Architecture
An agentic Q&A assistant, end to end
A code-defined workflow with safety gates, a cache, claims-scoped retrieval, a human review step, model routing, checkpoints and audit.
What it shows
A site user's question enters a workflow whose order is written in code, not left to a model. It passes a PII screen and a prompt shield, then a cache lookup. A cache hit goes straight to delivery, because only reviewed answers are cached.
On a miss the workflow retrieves grounding from a knowledge layer on Azure AI Search: a model plans the query, subqueries run in parallel over one source per study, and a synthesis step returns references and an activity log. Other enterprise agents reach the same layer through an MCP endpoint.
The draft goes through a model router, then a content filter and a safety verdict, and stops at a review port where a person accepts, edits or rejects it. Every step is audited, and the workflow is checkpointed so a pending review survives a restart.
This is a reference design for an agentic clinical-trials Q&A assistant. It is a design, not a description of a system built as shown.
Key decisions
- The order of the steps is a graph in code, so the safety gates cannot be skipped or reordered by a prompt.
- Retrieval is scoped by the caller's claims, never by what the caller types.
- A person reviews before delivery; the review step is part of the workflow, not a side channel.
- Model choice is a routing decision per step: data with PHI stays on the deployment covered by the BAA.