From efb0e5c5882b2de21bec3af67cfea1ffaeaba729 Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Mon, 15 Jun 2026 10:15:01 -0500 Subject: [PATCH] Add prompts and schemas for today and daily weather reports --- .../daily/daily_generated_text.user.md | 64 +++++++++++++++++++ .../daily/daily_generated_text.yml | 25 ++++++++ .../today/today_generated_text.user.md | 58 +++++++++++++++++ .../today/today_generated_text.yml | 25 ++++++++ .../tomorrow/tomorrow_generated_text.user.md | 4 +- .../daily/daily.generated_text.schema.json | 29 +++++++++ .../today/today.generated_text.schema.json | 29 +++++++++ 7 files changed, 232 insertions(+), 2 deletions(-) create mode 100644 prompts/pipeline-weather/daily/daily_generated_text.user.md create mode 100644 prompts/pipeline-weather/daily/daily_generated_text.yml create mode 100644 prompts/pipeline-weather/today/today_generated_text.user.md create mode 100644 prompts/pipeline-weather/today/today_generated_text.yml create mode 100644 schemas/pipeline-weather/daily/daily.generated_text.schema.json create mode 100644 schemas/pipeline-weather/today/today.generated_text.schema.json diff --git a/prompts/pipeline-weather/daily/daily_generated_text.user.md b/prompts/pipeline-weather/daily/daily_generated_text.user.md new file mode 100644 index 0000000..70b3bde --- /dev/null +++ b/prompts/pipeline-weather/daily/daily_generated_text.user.md @@ -0,0 +1,64 @@ +TASK: You are writing structured prose slots for a daily weather report. + +The calling application will render the final Markdown report. Your job is not to write the full report. Return only a JSON object matching the configured schema. + +Use only the supplied `data_package`. Do not invent weather details, times, hazards, probabilities, or impacts that are not supported by the data. + +The report focuses on the valid period in `report.valid_period`, which corresponds to an upcoming civil day for the configured location. + +Return these fields: + +- `summary`: required. 1-2 sentences summarizing the main weather story for the valid period. +- `forecast_discussion`: required. 3 paragraphs explaining the broader setup, trend, and/or forecast reasoning most relevant to the valid period. +- `precipitation_timing`: optional. Include only when the deterministic `precip_timing` module contains precipitation windows. +- `confidence`: optional. Include only if uncertainty, timing spread, or conflicting signals materially affect how the reader should interpret the forecast. + +Return JSON only. + +# summary + +The summary should typically consist of two sentences. + +If an active warning is relevant during the report period, lead with the hazard. Otherwise, the first sentence should state the most likely local weather outcome for the valid period, including the overall character of the weather and expected temperature/temperature range. + +The second sentence should state the most important active hazard, caveat, uncertainty, or alternate outcome, if one exists. If there is no meaningful caveat, the second sentence may be omitted. + +In the lead, distinguish the main weather outcome from the caveat. If showers and thunderstorms have different timing, state that difference rather than combining them as a single risk throughout the valid period. If the main caveat is a regional severe-weather or precipitation risk displaced from the report location, state that limitation clearly. + +Example style: + +- “Today is expected to be warm and dry, with mostly clear skies. There is a slight chance of isolated showers and thunderstorms developing from late afternoon into early evening.” + +# forecast_discussion + +Use narrative products to explain the “why” behind the local forecast when useful. Useful context may include: + +- synoptic pattern +- fronts or boundaries +- shortwaves, troughs, or ridges +- instability, moisture, shear, forcing, or capping +- regional placement of precipitation or severe-weather chances +- hazard types and timing windows +- confidence or uncertainty +- conditional outcomes +- relevant notes about the following day or days + +In most cases, the `forecast_discussion` should include three paragraphs: + +1. 2–4 sentences summarizing the relevant local/regional setup. +2. 2-4 sentences describing the main forecast uncertainty or conditional factor, if present. +3. 2-4 sentences about the next day or broader pattern if supported. + +# precipitation_timing + +Use 1-2 sentences to add practical context, including: + + - Whether the precipitation is associated with a moving frontal boundary, convective initiation, or wide stratiform rain (if this can be determined from the data package); + - The expected type, intensity, and duration of the precipitation; and + - Any caveats or uncertainty with respect to the onset, duration, or occurrance of the precipitation. + +# Narrative Source Selection + +As previously noted, use `briefing.derived_daily_summary`, `briefing.derived_daypart_summaries`, `briefing.narrative_products.narrative_forecast.periods`, and `briefing.raw_data.hourly_forecast.periods` as your primary reference sources for forecast. + +As previously noted, narrative sources can provide significant added value, but you must think carefully about whether information from the available narrative sources is relevant to the valid period. If the valid period relates to a civil day that is several days in the future, then products such as `briefing.narrative_products.weather_story`, `briefing.narrative_products.area_forecast_discussion.key_messages`, and `briefing.narrative_products.area_forecast_discussion.short_term` may have limited relevance. On the other hand, `briefing.narrative_products.area_forecast_discussion.long_term` may have relatively more relevance. diff --git a/prompts/pipeline-weather/daily/daily_generated_text.yml b/prompts/pipeline-weather/daily/daily_generated_text.yml new file mode 100644 index 0000000..dd73c48 --- /dev/null +++ b/prompts/pipeline-weather/daily/daily_generated_text.yml @@ -0,0 +1,25 @@ +id: weather.daily_generated_text +version: "1.0.0" +default_profile: local-heavy +#default_profile: gemini-3-flash-lite +description: Daily weather report analysis prompt. +inputs: + - name: data_package + required: true + content_type: application/json + description: Structured weather data package +messages: + - role: system + content_file: ../common/system.md + - role: user + content_file: ../common/data_package.user.md + - role: user + content: | + {{input "data_package"}} + - role: user + content_file: ./daily_generated_text.user.md +output: + format: json + validation_mode: json_schema + schema_path: pipeline-weather/daily/daily.generated_text.schema.json + repair_attempts: 1 \ No newline at end of file diff --git a/prompts/pipeline-weather/today/today_generated_text.user.md b/prompts/pipeline-weather/today/today_generated_text.user.md new file mode 100644 index 0000000..7a3af1d --- /dev/null +++ b/prompts/pipeline-weather/today/today_generated_text.user.md @@ -0,0 +1,58 @@ +TASK: You are writing structured prose slots for a daily weather report. + +The calling application will render the final Markdown report. Your job is not to write the full report. Return only a JSON object matching the configured schema. + +Use only the supplied `data_package`. Do not invent weather details, times, hazards, probabilities, or impacts that are not supported by the data. + +The report focuses on the valid period in `report.valid_period`, which corresponds to the current civil day (today) for the configured location. + +Return these fields: + +- `summary`: required. 1-2 sentences summarizing the main weather story for the valid period. +- `forecast_discussion`: required. 3 paragraphs explaining the broader setup, trend, and/or forecast reasoning most relevant to the valid period. +- `precipitation_timing`: optional. Include only when the deterministic `precip_timing` module contains precipitation windows. +- `confidence`: optional. Include only if uncertainty, timing spread, or conflicting signals materially affect how the reader should interpret the forecast. + +Return JSON only. + +# summary + +The summary should typically consist of two sentences. + +If an active warning is relevant during the report period, lead with the hazard. Otherwise, the first sentence should state the most likely local weather outcome for the valid period, including the overall character of the weather and expected temperature/temperature range. + +The second sentence should state the most important active hazard, caveat, uncertainty, or alternate outcome, if one exists. If there is no meaningful caveat, the second sentence may be omitted. + +In the lead, distinguish the main weather outcome from the caveat. If showers and thunderstorms have different timing, state that difference rather than combining them as a single risk throughout the valid period. If the main caveat is a regional severe-weather or precipitation risk displaced from the report location, state that limitation clearly. + +Example style: + +- “Today is expected to be warm and dry, with mostly clear skies. There is a slight chance of isolated showers and thunderstorms developing from late afternoon into early evening.” + +# forecast_discussion + +Use narrative products to explain the “why” behind the local forecast when useful. Useful context may include: + +- synoptic pattern +- fronts or boundaries +- shortwaves, troughs, or ridges +- instability, moisture, shear, forcing, or capping +- regional placement of precipitation or severe-weather chances +- hazard types and timing windows +- confidence or uncertainty +- conditional outcomes +- relevant notes about the following day or days + +In most cases, the `forecast_discussion` should include three paragraphs: + +1. 2–4 sentences summarizing the relevant local/regional setup. +2. 2-4 sentences describing the main forecast uncertainty or conditional factor, if present. +3. 2-4 sentences about the next day or broader pattern if supported. + +# precipitation_timing + +Use 1-2 sentences to add practical context, including: + + - Whether the precipitation is associated with a moving frontal boundary, convective initiation, or wide stratiform rain (if this can be determined from the data package); + - The expected type, intensity, and duration of the precipitation; and + - Any caveats or uncertainty with respect to the onset, duration, or occurrance of the precipitation. diff --git a/prompts/pipeline-weather/today/today_generated_text.yml b/prompts/pipeline-weather/today/today_generated_text.yml new file mode 100644 index 0000000..73f19c7 --- /dev/null +++ b/prompts/pipeline-weather/today/today_generated_text.yml @@ -0,0 +1,25 @@ +id: weather.today_generated_text +version: "1.0.0" +default_profile: local-heavy +#default_profile: gemini-3-flash-lite +description: Today's weather report analysis prompt. +inputs: + - name: data_package + required: true + content_type: application/json + description: Structured weather data package +messages: + - role: system + content_file: ../common/system.md + - role: user + content_file: ../common/data_package.user.md + - role: user + content: | + {{input "data_package"}} + - role: user + content_file: ./today_generated_text.user.md +output: + format: json + validation_mode: json_schema + schema_path: pipeline-weather/today/today.generated_text.schema.json + repair_attempts: 1 \ No newline at end of file diff --git a/prompts/pipeline-weather/tomorrow/tomorrow_generated_text.user.md b/prompts/pipeline-weather/tomorrow/tomorrow_generated_text.user.md index c0176ef..9294334 100644 --- a/prompts/pipeline-weather/tomorrow/tomorrow_generated_text.user.md +++ b/prompts/pipeline-weather/tomorrow/tomorrow_generated_text.user.md @@ -1,10 +1,10 @@ -TASK: You are writing structured prose slots for a short-term hourly weather report. +TASK: You are writing structured prose slots for a daily weather report. The calling application will render the final Markdown report. Your job is not to write the full report. Return only a JSON object matching the configured schema. Use only the supplied `data_package`. Do not invent weather details, times, hazards, probabilities, or impacts that are not supported by the data. -The report focuses on the valid period in `report.valid_period`, typically the next several hours for the configured location. +The report focuses on the valid period in `report.valid_period`, which corresponds to the next civil day (tomorrow) for the configured location. Return these fields: diff --git a/schemas/pipeline-weather/daily/daily.generated_text.schema.json b/schemas/pipeline-weather/daily/daily.generated_text.schema.json new file mode 100644 index 0000000..d7e4944 --- /dev/null +++ b/schemas/pipeline-weather/daily/daily.generated_text.schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "weatherreporter.today.generated_text.schema.json", + "title": "Today GeneratedText", + "type": "object", + "additionalProperties": false, + "required": [ + "summary", + "forecast_discussion" + ], + "properties": { + "summary": { + "type": "string" + }, + "forecast_discussion": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "precipitation_timing": { + "type": "string" + }, + "confidence": { + "type": "string" + } + } +} diff --git a/schemas/pipeline-weather/today/today.generated_text.schema.json b/schemas/pipeline-weather/today/today.generated_text.schema.json new file mode 100644 index 0000000..d7e4944 --- /dev/null +++ b/schemas/pipeline-weather/today/today.generated_text.schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "weatherreporter.today.generated_text.schema.json", + "title": "Today GeneratedText", + "type": "object", + "additionalProperties": false, + "required": [ + "summary", + "forecast_discussion" + ], + "properties": { + "summary": { + "type": "string" + }, + "forecast_discussion": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "precipitation_timing": { + "type": "string" + }, + "confidence": { + "type": "string" + } + } +}