diff --git a/web/scan_city_ai_prompt.py b/web/scan_city_ai_prompt.py index c0482912..646a7e66 100644 --- a/web/scan_city_ai_prompt.py +++ b/web/scan_city_ai_prompt.py @@ -45,7 +45,7 @@ def build_city_ai_request_json( "独立判断该城市今日最高温路径。不要写套利、交易、BUY YES/NO、价格、edge 或 Kelly。" f"你的核心输出是:最终最高温点估计、置信区间、置信度、最终判断、{observation_label_zh}、判断依据和风险。" "预测方法:首先查看 model_cluster.sources 中的全部模型(含 DEB)的集中区间和中位数作为基线;" - "然后重点阅读 metar_context 中的最新观测/报文(温度趋势、风向风速、云量、能见度、露点)," + "然后重点阅读 metar_context 和 current 中的最新观测数据(温度趋势、风向风速、湿度、云量、能见度、露点)," "根据实测信号独立判断基线应该是上修、下修还是维持,并在 predicted_max 中给出你的独立判断。" "DEB 只是模型集群中的一个融合参考,不应该直接照搬为 predicted_max;" "你必须综合所有模型 + 观测信号后给出自己的数字,与 DEB 有差异是正常的。" @@ -211,7 +211,7 @@ def build_city_ai_stream_request( f"必须基于最新观测/报文独立判断该城市今日最高温,输出 metar_read_zh、metar_read_en、predicted_max、range_low、range_high、unit、confidence、final_judgment_zh、final_judgment_en、reasoning_zh、reasoning_en 字段,便于前端快速显示{read_label}和最高温预测;" "模型一致性和风险清单由后端规则补齐,不要生成这些字段。" f"预测方法:先看 model_cluster.sources 中各模型(含 DEB)的集中区间作为基线;" - "然后重点阅读 metar_context 中的报文/观测信号——温度趋势、风向风速、云量、能见度——" + "然后重点阅读 metar_context 和 current 中的观测信号——温度趋势、风向风速、湿度、云量、能见度——" "独立判断 predicted_max 应该落在基线区间的哪个位置(偏上/偏下/中枢),不要直接照搬 DEB 的值。" f"{source_instruction}" "观测解读必须具体说明观测/报文时间、温度、风向风速、云量/天气/能见度/露点中与温度路径相关的因素;每个字段最多 1-2 句。" diff --git a/web/scan_terminal_ai_compact.py b/web/scan_terminal_ai_compact.py index 994973bc..241ad87c 100644 --- a/web/scan_terminal_ai_compact.py +++ b/web/scan_terminal_ai_compact.py @@ -330,8 +330,24 @@ def _city_observation_anchor(data: Dict[str, Any]) -> Dict[str, Any]: "station_label": station_label, "read_label_zh": "香港天文台观测解读", "read_label_en": "Hong Kong Observatory observation read", - "instruction_zh": "该城市使用香港天文台/HKO 官方站点观测,不是机场 METAR;不得称为机场报文或 METAR。", - "instruction_en": "This city uses Hong Kong Observatory/HKO station observations, not an airport METAR; do not call it an airport bulletin or METAR.", + "instruction_zh": ( + "该城市使用香港天文台/HKO 官方站点观测,提供温度、今日最高/最低温、相对湿度、" + "10分钟平均风速和风向数据。它不是机场 METAR,不得使用 METAR、TAF、机场报文、报文时间等称谓," + "应使用「观测时间」「风速」「风向」「湿度」等官方气象站用语。" + "观测解读必须具体说明:最新观测时间、温度、风向风速对升温路径的影响(增温/降温/中性)、" + "湿度是否可能压制日间升温。涉及风时必须说明具体风向及来源(如「偏北风」「海风/陆风」)。" + "如果有今日最高温和最低温数据,应结合判断温度走势。" + ), + "instruction_en": ( + "This city uses Hong Kong Observatory/HKO official station observations, providing temperature, " + "today's high/low, relative humidity, 10-min mean wind speed and direction. " + "It is NOT an airport METAR; do not use METAR, TAF, airport bulletin, or report time terminology. " + "Use terms like observation time, wind speed, wind direction, humidity. " + "The observation read must be specific: latest observation time, temperature, whether the wind " + "direction tends to warm, cool or be neutral for today's high path and why, and whether humidity " + "may suppress daytime heating. When mentioning wind, specify the direction and source " + "(e.g. northerly, sea breeze/land breeze). If today's high/low are available, use them to assess the trend." + ), } return { "source": "metar", diff --git a/web/scan_terminal_service.py b/web/scan_terminal_service.py index f6e89b62..892e5502 100644 --- a/web/scan_terminal_service.py +++ b/web/scan_terminal_service.py @@ -348,6 +348,9 @@ def _build_city_ai_prompt(data: Dict[str, Any]) -> Dict[str, Any]: "obs_time": current.get("obs_time"), "station_code": current.get("station_code"), "station_name": current.get("station_name"), + "wind_speed_kt": current.get("wind_speed_kt"), + "wind_dir": current.get("wind_dir"), + "humidity": current.get("humidity"), }, "airport": { "name": risk.get("airport") or airport_current.get("station_label") or airport_primary.get("station_label"),