- detail (only when the user asks for more detail) adds the humidity, the wind in m/s and the rain amount: now the last hour's rain (KMA RN1, open-meteo precipitation), a 단기예보 day its mean humidity and strongest wind, an open-meteo day its strongest wind and rain total. - 단기예보's PTY 4 (소나기) was missing, so a showery afternoon under a clear sky came out as 맑음. - days_ahead's description lists each coming weekday's count from today: with the new argument qwen3:8b counted a Wednesday's weekend as 2. Evals: evals/test_weather_detail.py, test_weather_forecast_days.py, test_weather_district_place.py (qwen3:8b, 27/27 over three runs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.3 KiB
Python
33 lines
1.3 KiB
Python
"""
|
|
Eval: a request for the weather in detail reaches getWeather as detail=true, and a plain one does not.
|
|
|
|
With detail getWeather also gives the humidity, the wind and the rain amount (2026-11-18);
|
|
without it the answer stays one short sentence for the voice reply.
|
|
|
|
Run: EVAL_JUDGE_MODEL=qwen3:8b ./scripts/run_evals.sh weather_detail
|
|
"""
|
|
|
|
import pytest
|
|
|
|
from conftest import requires_judge_llm
|
|
from test_weather_forecast_days import _ask
|
|
|
|
|
|
def _detail(args):
|
|
return (args or {}).get("detail") in (True, "true", "True")
|
|
|
|
|
|
@pytest.mark.eval
|
|
@requires_judge_llm
|
|
class TestWeatherDetail:
|
|
@pytest.mark.parametrize("query", ["부산 연제구 날씨 자세히 알려 줘", "give me the detailed weather for Busan"])
|
|
def test_asked_in_detail_detail_is_set(self, mock_config, eval_db, eval_dialogue_memory, query):
|
|
args = _ask(mock_config, eval_db, eval_dialogue_memory, query)
|
|
assert args is not None, "getWeather was not called"
|
|
assert _detail(args), args
|
|
|
|
def test_a_plain_question_is_not_detailed(self, mock_config, eval_db, eval_dialogue_memory):
|
|
args = _ask(mock_config, eval_db, eval_dialogue_memory, "부산 연제구 날씨 어때?")
|
|
assert args is not None, "getWeather was not called"
|
|
assert not _detail(args), args
|