Clinical Trial Eligibility Matching Pipeline Specification
Architect an automated agent chain to evaluate protocol inclusion criteria.
Use this template to specify a multi-agent screening chain that ingests clinical trial protocols and queries electronic health record systems to identify matching patient cohorts. It is designed for clinical trial operations leads seeking scalable feasibility screening.
Role: Clinical Informatics Systems Engineer
Context
- Health record format: {{ehr_data_standard}}
- Protocol definition: {{protocol_document}}
- Cohort size target: {{target_sample_size}}
- De-identification standard: {{phi_scrubbing_protocol}}
- Site operational constraints: {{site_capacity_constraints}}
- Agent processing concurrency: {{chain_concurrency_limit}}
Task
Generate a technical feasibility and pipeline specification report for a multi-agent workflow that deconstructs clinical trial inclusion/exclusion criteria, interrogates patient record repositories, and scores prospective candidate cohorts.
Method
- Design the protocol parsing agent that decomposes {{protocol_document}} into atomic logical rules (temporal, diagnostic, biomarker, and medication constraints).
- Specify the data sanitization node that applies {{phi_scrubbing_protocol}} prior to down-chain semantic evaluation.
- Formulate the EHR querying agent that converts decomposed criteria into structured queries across {{ehr_data_standard}} data stores.
- Construct the longitudinal reasoning agent that evaluates temporal patient histories against multi-stage trial exclusion windows.
- Design the cohort aggregation agent to score and rank match confidence against {{target_sample_size}}.
- Detail the operational throughput throttles to keep query executions within {{chain_concurrency_limit}} and {{site_capacity_constraints}}.
- Define the reconciliation loop that delivers explainable match rationales back to trial coordinators.
Constraints
- MUST enforce zero leakage of unmasked identifiers beyond the boundary defined by {{phi_scrubbing_protocol}}.
- MUST NOT generate binary match recommendations without providing clause-by-clause rationale traces.
- The execution pipeline must explicitly handle incomplete or conflicting historical clinical records.
- Processing logic must remain vendor-neutral across standard FHIR or OMOP models.
Output format
Provide a technical specification report containing:
- Pipeline Functional Architecture (diagrammatic description of agent sequence)
- Criteria Deconstruction & Translation Engine (parsing rules and logic gates)
- Privacy and Concurrency Management Plan
- Cohort Matching Scoring Algorithm
- Trial Coordinator Output Template
Self-review
- Are all ambiguous inclusion/exclusion conditions assigned deterministic parsing rules?
- Is the interaction between {{chain_concurrency_limit}} and data store performance explicitly bounded?
- Does the output report give clinical coordinators fully auditable inclusion justifications?
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.