open-meteo's geocoder knows cities only, in Latin spellings, and matches a non-Latin name loosely: "부산" gave a village called Pusan 140 km from Busan. A non-Latin name now goes to OpenStreetMap's Nominatim first (any language, down to districts), and a Latin name open-meteo does not know goes there before the LLM romanisation and the wider-area retries. The answer names the place in the user's own words, and KMA gets that spot's grid point. Eval: evals/test_weather_district_place.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
908 B
Python
26 lines
908 B
Python
"""
|
|
Eval: a district the user names reaches getWeather whole ("부산 연제구"), not only its city.
|
|
|
|
getWeather finds districts on OpenStreetMap (2026-11-18), so the place argument must keep
|
|
the district for the answer to be about that spot.
|
|
|
|
Run: EVAL_JUDGE_MODEL=qwen3:8b ./scripts/run_evals.sh weather_district_place
|
|
"""
|
|
|
|
import pytest
|
|
|
|
from conftest import requires_judge_llm
|
|
from test_weather_forecast_days import _ask
|
|
|
|
|
|
@pytest.mark.eval
|
|
@requires_judge_llm
|
|
@pytest.mark.parametrize("query,district", [
|
|
("부산 연제구 날씨 어때?", "연제"),
|
|
("서울 강남구 내일 날씨 알려 줘", "강남"),
|
|
])
|
|
def test_the_district_is_in_the_place(mock_config, eval_db, eval_dialogue_memory, query, district):
|
|
args = _ask(mock_config, eval_db, eval_dialogue_memory, query)
|
|
assert args is not None, "getWeather was not called"
|
|
assert district in (args.get("location") or ""), args
|