Skip to main content
Challenge

Mastra AI & Gemini 2.5 Flash European Chronic Heat Risk Alert Workflows

Chronic heat events in Europe threaten urban infrastructure and public health. Build an automated alert and risk modeling workflow using Mastra AI in TypeScript powered by Gemini 2.5 Flash to process ECMWF heatwave forecasts, calculate wet-bulb globe temperature indices, and issue parametric insurance alerts.

Machine LearningHosted by Vera
Challenge brief

What you are building

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

Develop a Mastra AI TypeScript workflow with Gemini 2.5 Flash to compute extreme heat risk and parametric payouts.

Delivery guide

How work is evaluated

Evaluation

Evaluates heat stress index computation and parametric threshold alert correctness.

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

wbgt_formula_accuracy

Ensures WBGT calculation is within 0.2 deg C tolerance

Binary check

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

Dimension 2

workflow_execution_speed

Workflow response time in milliseconds • target: 800 • range: 0-3000

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 TypeScript workflows in Mastra AI with conditional step execution

  • Integrate Gemini 2.5 Flash for natural language risk summary generation

  • Compute Wet-Bulb Globe Temperature (WBGT) thresholds from weather API feeds

  • Automate trigger decisions for parametric heat resilience policies

Resources and assets

Reference links and supporting material

Dataset notes

European weather time-series dataset featuring extreme summer temperature and humidity data.

Challenge setup

Evaluates heat stress index computation and parametric threshold alert correctness.

Challenge input

JSON containing location, temperature_c, humidity_pct, and consecutive_days.

Mastra AI

TypeScript-native agent workflow engine

Gemini 2.5 Flash

Fast, high-throughput text summaries and insights

Evaluated output

JSON with calculated_wbgt, trigger_activated boolean, and payout_amount.

Evaluation checks
  • Ensures WBGT calculation is within 0.2 deg C tolerance
  • Workflow response time in milliseconds • target: 800 • range: 0-3000
Configured evaluation evidence
  • Benchmark: ParametricHeatBench
  • Workflow Execution Speed target: 800
  • 1 public reference case
Configured runtime
  • JavaScript execution harness
  • javascript 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
  • Google Gemini · Optional
  • Mastra AI · Optional
Policy Serving
  • Gemini 2.5 Flash · Required
Orchestration
  • Mastra AI · Optional

Evaluation contract

  • wbgt_formula_accuracy · Weight 1
  • workflow_execution_speed · Weight 1

Metrics

  • workflow_execution_speed · Target 800

Benchmarks

  • ParametricHeatBench
  • energy

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing location, temperature_c, humidity_pct, and consecutive_days.

    Output: JSON with calculated_wbgt, trigger_activated boolean, and payout_amount.

    Execution harness: JavaScript

Evaluation tools

  • Mastra AI · Agent & Workflow Framework
  • Gemini 2.5 Flash · Reasoning LLM

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Mastra AI & Gemini 2.5 Flash European Chronic Heat Risk Alert Workflows