Skip to main content
Loading navigation

Build an Empathetic Public Health Agent with OpenAI Agents SDK & Guardrails AI

Public health communicators face severe challenges addressing vaccine hesitancy without escalating conflict. Build an empathetic public health agent using the OpenAI Agents SDK and Guardrails AI to parse citizen queries, filter misinformation, and generate empathetic, scientifically accurate responses with a compliance score exceeding 90%.

Data ScienceHosted by Vera

What you are building

Implement an OpenAI Agents SDK pipeline integrated with Guardrails AI safety rails to generate empathetic public health communication.

How work is evaluated

Evaluation

Evaluates response empathy, factual safety, and schema adherence using automated LLM-as-a-judge and rule guardrails.

Datasets

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

How submissions are scored

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

safety_guardrail_check

Ensures no medical misinformation is validated or outputted.

Binary check

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

Dimension 2

empathy_score

NLP empathy classifier metric. • target: 0.85 • 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

  • Implement OpenAI Agents SDK agent workflows for empathetic dialogue.

  • Integrate Guardrails AI validators to enforce medical accuracy and empathetic tone.

  • Evaluate response quality against public health communication guidelines.

Resources

Dataset notes

Curated set of 100 vaccine hesitancy queries paired with clinical ground truth consensus statements.

Challenge setup

Evaluates response empathy, factual safety, and schema adherence using automated LLM-as-a-judge and rule guardrails.

Challenge input

JSON containing query and user persona

OpenAI Agents SDK

Agent orchestration framework specified in challenge prompt.

Guardrails AI

Used for validating structured responses and preventing misinformation.

Evaluated output

JSON with generated_response, empathy_score, and safety_pass boolean

Evaluation checks
  • Ensures no medical misinformation is validated or outputted.
  • NLP empathy classifier metric. • target: 0.85 • range: 0-1
Configured evaluation evidence
  • Benchmark: MedSafety-Bench
  • Empathy Score target: 0.85
  • 1 public reference case
Configured runtime
  • 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

Action Space
  • OpenAI · Required
  • RAI · Optional
Reward / Eval
  • Guardrails AI · Optional
Safety / Guardrails
  • Guardrails AI · Optional

Evaluation contract

  • safety_guardrail_check · Weight 1
  • empathy_score · Weight 1

Metrics

  • empathy_score · Target 0.85

Benchmarks

  • MedSafety-Bench
  • biotech

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing query and user persona

    Output: JSON with generated_response, empathy_score, and safety_pass boolean

    Execution harness: Python

Evaluation tools

  • OpenAI Agents SDK · agent_framework
  • Guardrails AI · guardrail_engine

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build an Empathetic Public Health Agent with OpenAI Agents SDK & Guardrails AI