Skip to main content
Challenge

Anti-Inflammatory Cardiovascular Trial Matching with LangChain and LangGraph

Targeted anti-inflammatory cardiovascular therapies require precise patient selection based on biomarker thresholds like IL-6 and hsCRP. Build a stateful trial-matching agent using LangChain and LangGraph to evaluate EHR data against eligibility criteria. Achieve 95% precision on clinical trial inclusion/exclusion evaluations.

Data ScienceHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build a stateful EHR trial matching agent using LangChain and LangGraph to identify anti-inflammatory cardiovascular therapy candidates.

Delivery guide

How work is evaluated

Evaluation

Evaluates accuracy and precision of patient eligibility decisions against clinical trial protocols.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

decision_present

Output contains clear boolean eligible flag.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

precision

Precision of patient inclusion determinations • target: 0.95 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Build complex multi-step decision state graphs using LangGraph and LangChain

  • Parse and evaluate temporal biomarker trends (hsCRP, IL-6) from EHR data

  • Implement conditional branching for inclusion vs exclusion rule evaluation

  • Export transparent audit logs of trial eligibility determinations

Resources and assets

Reference links and supporting material

Dataset notes

Synthetic EHR dataset of 250 adult cardiac patients with longitudinal lab measurements for inflammatory markers.

Challenge setup

Evaluates accuracy and precision of patient eligibility decisions against clinical trial protocols.

Challenge input

JSON patient record containing medical history, hsCRP, IL-6 levels, and eGFR rates.

LangChain

Framework required for prompt chaining and tool integration.

LangGraph

Enables creation of state machines with dynamic branching for clinical logic.

Evaluated output

JSON object with eligible boolean, matched_criteria list, excluded_criteria list, and reason.

Evaluation checks
  • Output contains clear boolean eligible flag.
  • Precision of patient inclusion determinations • target: 0.95 • range: 0-1
Configured evaluation evidence
  • Benchmark: Clinical Trial Patient Eligibility Benchmark
  • Precision target: 0.95
  • 1 public reference case
Configured runtime
  • Python execution harness
  • Python sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Langchain · Required
  • LangGraph · Optional
  • HeyBoss AI · Optional
Orchestration
  • Langchain · Required
  • LangGraph · Optional

Evaluation contract

  • decision_present · Weight 1
  • precision · Weight 1

Metrics

  • precision · Target 0.95

Benchmarks

  • Clinical Trial Patient Eligibility Benchmark
  • biotech

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON patient record containing medical history, hsCRP, IL-6 levels, and eGFR rates.

    Output: JSON object with eligible boolean, matched_criteria list, excluded_criteria list, and reason.

    Execution harness: Python

Evaluation tools

  • LangChain · LLM Orchestration Toolkit
  • LangGraph · Stateful Agent Workflow Engine

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Anti-Inflammatory Cardiovascular Trial Matching with LangChain and LangGraph