Skip to main content
Challenge

Bacterial PCR Leaping Artifact Filter and Gene Screener with Pydantic AI

Chimeric PCR leaping artifacts complicate bacterial genome assembly but offer novel long-range screening signals when classified accurately. Build a type-safe agent using Pydantic AI to filter sequence read artifacts and identify resistance gene clusters with a 98% pass rate on benchmark bacterial reads.

Data ScienceHosted by Vera
Challenge brief

What you are building

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

Build a type-safe bacterial screening agent using Pydantic AI to distinguish PCR leaping artifacts from true structural markers.

Delivery guide

How work is evaluated

Evaluation

Evaluates schema pass rate and accuracy of PCR artifact filtering vs AMR gene detection.

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

pydantic_schema_validation

Validates output against Pydantic model definition.

Binary check

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

Dimension 2

schema_pass_rate

Percentage of test responses passing strict type validation. • target: 0.98 • 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 type-safe Python AI agents with Pydantic AI validation.

  • Classify chimeric PCR leaping artifact signatures in FASTQ/FASTA reads.

  • Extract bacterial antimicrobial resistance (AMR) gene clusters.

  • Enforce rigorous output data model schemas with Pydantic dependence injection.

Resources and assets

Reference links and supporting material

Dataset notes

Bacterial sequencing read dataset containing synthetic PCR leaping chimeric junctions and annotated AMR genes.

Challenge setup

Evaluates schema pass rate and accuracy of PCR artifact filtering vs AMR gene detection.

Challenge input

JSON containing read_id and nucleotide_sequence.

Pydantic AI

Type-safe Python framework for structured agent outputs.

Evaluated output

JSON with is_pcr_leaping_artifact (boolean) and target_amr_gene (optional string).

Evaluation checks
  • Validates output against Pydantic model definition.
  • Percentage of test responses passing strict type validation. • target: 0.98 • range: 0-1
Configured evaluation evidence
  • Benchmark: Bacterial AMR & Artifact Detection Benchmark
  • Schema Pass Rate target: 98%
  • 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
  • Pydantic AI · Required
Reward / Eval
  • Guardrails AI · Optional
Policy Serving
  • Grok 4 · Optional
Safety / Guardrails
  • Guardrails AI · Optional
Orchestration
  • Pydantic AI · Required

Evaluation contract

  • pydantic_schema_validation · Weight 1
  • schema_pass_rate · Weight 1

Metrics

  • schema_pass_rate · Target 0.98

Benchmarks

  • Bacterial AMR & Artifact Detection Benchmark
  • biotech

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing read_id and nucleotide_sequence.

    Output: JSON with is_pcr_leaping_artifact (boolean) and target_amr_gene (optional string).

    Execution harness: Python

Evaluation tools

  • Pydantic AI · Agent Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Bacterial PCR Leaping Artifact Filter and Gene Screener with Pydantic AI