Skip to content

fix: 증상 근거 규칙의 「아파」 누락과 통화 시나리오 시험 도구 - #12

Merged
Frekion2002 merged 2 commits into
mainfrom
feat/call-scenarios
Nov 8, 2026
Merged

Frekion2002 merged 2 commits into
mainfrom
feat/call-scenarios

Conversation

@Frekion2002

Copy link
Copy Markdown
Collaborator

변경 내용

  • 버그 수정: 증상 근거 규칙이 「아프」만 보고 「아파·아팠·아픈·아퍼」를 몰라서, 부모가 「가슴이 너무 아파」「머리가 아파」처럼 말한 증상 사실이 Gemini 가 맞게 정리해도 버려지던 문제.
  • 시험 도구: 휴대폰 없이 통화 시나리오 12개를 분석 파이프라인에 넣어 「기대 대 실제」 표를 뽑는다.
    • backend/evals/call_scenarios.json, scripts/scenario_audio.py(ElevenLabs 화자별 음성, 문장 캐시), scripts/run_call_scenarios.py(가짜 모드 기본, --real 은 Deepgram·Gemini 실제 호출).
    • 결과·음성 캐시 폴더는 gitignore.

검증

  • 테스트 422 → 432 통과, ruff 통과.
  • 시나리오 가짜 모드 12개·46항목 전부 통과(수정 전에는 chest-pain-emergency 실패).

…ones

Twelve synthetic call scenarios (sleep, walking, medication change, cough,
negated and real chest pain, breathlessness after stairs vs at rest,
child-only symptoms, disease name from child, short calls) with expected
analysis state, facts, summary words and safety notice.

scenario_audio.py synthesizes each line with ElevenLabs (cached per line)
and assembles parent/child tracks plus a 16 kHz device-raw track.
run_call_scenarios.py runs the real pipeline on a temporary SQLite DB:
fake mode replaces only STT and Gemini; --real replays generated audio
through Deepgram and Gemini. Prints an expected/actual table and writes it
to .scenario-results/.

Fake mode currently fails chest-pain-emergency: the symptom grounding
pattern matches 아프 but not 아파, so the fact is dropped (pinned in tests).
The symptom grounding pattern only matched 「아프」, so a parent saying
「가슴이 너무 아파」, 「머리가 아파」 or 「허리가 아팠어」 had a correct Gemini
symptom fact dropped as ungrounded. The call scenario harness caught it on
chest-pain-emergency; the known-gap entry is removed now that it passes.
@Frekion2002
Frekion2002 merged commit 8827eba into main Nov 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant