Skip to content
focoit.com
Back to the canvas

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.

An agentic Q&A assistant, end to end A site user's question enters a code-defined workflow that runs a PII screen, a prompt shield and a cache lookup; on a miss it retrieves claims-scoped grounding from a knowledge layer that plans the query, runs parallel subqueries over per-study sources and synthesizes references, then drafts through a model router, applies a content filter and safety verdict, pauses at a human review port and delivers or refuses. A cache hit goes straight to delivery. Every step is audited and the workflow is checkpointed. WORKFLOW · CODE-DEFINED GRAPH · CHECKPOINTED PII screen Prompt Shield Cache lookup SHA-256 key Retrieve claims-scoped Draft persona: site Content filter + safety verdict Review port human in the loop Deliver / Refuse MISS HIT Site user asks a question Model router Azure OpenAI · PHI Claude · non-PHI Reviewer UI accept · edit · reject REQUEST / RESPONSE KNOWLEDGE LAYER · AZURE AI SEARCH Query planning (LLM) effort: minimal · low · medium Parallel subqueries + semantic rerank Study A source Study B source Synthesis + references + activity log GROUNDING Other enterprise agents MCP ENDPOINT Checkpoint store pending requests persisted Audit App Insights + compliance store EVERY STEP LEGEND Safety gate Human review step Store Audit
Reference designOpen full size

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.