Skip to main content
Challenge

Postpartum Psychiatric Risk Monitoring Agent using LangChain and Agno

Monitoring drug liability and psychiatric risk during postpartum clinical care requires synthesizing clinical records and adverse event data. Developers will build a LangChain and Agno stateful agent to extract medication histories, assess liability risk markers, and generate structured clinical review alerts with complete auditability.

Data ScienceHosted by Vera
Challenge brief

What you are building

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

Develop a stateful clinical agent using LangChain and Agno to evaluate postpartum psychiatric medication histories and risk factors.

Delivery guide

How work is evaluated

Evaluation

Evaluates medication extraction recall, polypharmacy risk score calculation, and audit logging validity.

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

review_flag_test

Verifies that high-risk polypharmacy triggers clinician review.

Binary check

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

Dimension 2

entity_extraction_f1

F1 score of medication name extraction from EHR text. • target: 0.92 • 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

  • Configure a LangChain stateful processing graph for electronic health record (EHR) text.

  • Integrate Agno agent structures for multi-modal drug interaction monitoring.

  • Extract psychotropic polypharmacy patterns from patient encounter notes.

  • Generate structured clinical liability and safety alerts with explicit provenance links.

Resources and assets

Reference links and supporting material

Dataset notes

Synthetic postpartum patient clinical notes containing realistic medication histories and symptoms.

Challenge setup

Evaluates medication extraction recall, polypharmacy risk score calculation, and audit logging validity.

Challenge input

JSON containing clinical encounter note text.

LangChain

Provides structured chain execution and state management.

Agno

High-performance agent library for domain-specific tasks.

Evaluated output

JSON containing extracted medications, risk level, and review alert flag.

Evaluation checks
  • Verifies that high-risk polypharmacy triggers clinician review.
  • F1 score of medication name extraction from EHR text. • target: 0.92 • range: 0-1
Configured evaluation evidence
  • Benchmark: Clinical Adverse Event Detection Benchmark
  • Entity Extraction F1 target: 0.92
  • 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
  • Agno · Optional
  • PyTorch Lightning · Optional
Orchestration
  • Langchain · Required
  • Agno · Optional

Evaluation contract

  • review_flag_test · Weight 1
  • entity_extraction_f1 · Weight 1

Metrics

  • entity_extraction_f1 · Target 0.92

Benchmarks

  • Clinical Adverse Event Detection Benchmark
  • biotech

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing clinical encounter note text.

    Output: JSON containing extracted medications, risk level, and review alert flag.

    Execution harness: Python

Evaluation tools

  • LangChain · LLM Orchestration Framework
  • Agno · Agent Intelligence System

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Postpartum Psychiatric Risk Monitoring Agent using LangChain and Agno