Develop a Generative AI Clinical Trial Protocol Matching Agent with LangChain and FHIR
Matching cancer patients to active clinical trial eligibility criteria requires complex evaluation of structured health records and unstructured trial protocols. Build an intelligent patient-trial matching agent using LangChain and HL7 FHIR APIs to extract inclusion criteria and evaluate patient eligibility with 92% fidelity.
What you are building
Clinical trial eligibility matching engine built with LangChain framework and FHIR patient data connectors.
How work is evaluated
Evaluates patient-trial eligibility matching accuracy and rationale correctness.
Datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
eligibility_match_check
Verifies correct eligibility classification.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
matching_fidelity
Accuracy of eligibility match decisions across trial portfolio. • target: 0.92 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
Learning goals
Parse FHIR `Patient`, `Condition`, and `Observation` JSON records using LangChain tools.
Extract structured inclusion/exclusion rules from unstructured ClinicalTrials.gov summaries.
Compute patient eligibility match scores with step-by-step clinical rationale.
Resources
Dataset of 40 FHIR patient profiles paired with 20 active oncology trial inclusion protocols.
Challenge setup
Evaluates patient-trial eligibility matching accuracy and rationale correctness.
Challenge input
JSON containing fhir_patient_profile and trial_protocol_text
LangChain
Framework specified for building prompt chains and tools.
FHIR
HL7 clinical data format representation.
Evaluated output
JSON object with is_eligible boolean, matched_criteria array, and exclusion_reasons array
- Verifies correct eligibility classification.
- Accuracy of eligibility match decisions across trial portfolio. • target: 0.92 • range: 0-1
- Benchmark: TrialMatch-Bench
- Matching Fidelity target: 0.92
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
Shows the first task, up to three tools, and up to three evidence items.
View technical recipe
Configured tools
- LangChain · Required
- Langchain · Optional
- Stainless · Optional
- LangChain · Required
- Langchain · Optional
Evaluation contract
- eligibility_match_check · Weight 1
- matching_fidelity · Weight 1
Metrics
- matching_fidelity · Target 0.92
Benchmarks
- TrialMatch-Bench
- biotech
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: JSON containing fhir_patient_profile and trial_protocol_text
Output: JSON object with is_eligible boolean, matched_criteria array, and exclusion_reasons array
Execution harness: Python
Evaluation tools
- LangChain · agent_framework
- FHIR · data_standard
Recipe freeze marker
No recipe freeze time is recorded.