- 251225_admin_dashboard_code_refactoring.md → archive/ (커밋 ac96e2a) - 251016_emotion_integration_plan.md → archive/ (커밋 413b1e0) - 251017_intent_analysis_improvement_plan.md → archive/ (커밋 a4738b9) 각 문서에 구현 완료일, 커밋 해시, troubleshooting 링크 및 완료 사항 정리
1.5 KiB
1.5 KiB
감정 분류기 Router 통합 계획
날짜: 2025-10-16 목표: 감정 분석을 대화 흐름에 통합
구현 완료
완료일: 2025-10-16
커밋: 413b1e0 (rb8001)
상세: troubleshooting/251016_emotion_classifier_router_integration.md
완료 사항
- ✅ 환경변수 추가:
USE_EMOTION_ANALYSIS(config.py) - ✅ Router 통합:
router.py:_call_internal_llm()에서 감정 분석 실행 - ✅ skill-embedding 연동: EmotionClassifier → HTTP API 호출
- ✅ Context 전달:
user_emotion,emotion_confidence를 LLM context에 추가 - ✅ Graceful degradation: 실패 시 에러 로그만, 서비스 계속 작동
미구현: 감정 기반 응답 톤 자동 조정
현재 한계
- 감정 분석 → LLM 프롬프트 전달만
- 톤 조정은 LLM 자율 판단 (불안정)
- 명시적 규칙 없음
필요 작업
감정-톤 매핑:
EMOTION_TONE_MAP = {
"fear": {"style": "reassuring", "emoji": False, "length": "short"},
"anger": {"style": "calm", "emoji": False, "length": "medium"},
"sadness": {"style": "empathetic", "emoji": True, "length": "medium"}
}
LLM 시스템 프롬프트 동적 생성:
services/llm/gemini_handler.py수정- 감정별 톤 지시 자동 삽입
- 예: "사용자가 불안(fear)을 느낍니다. 안심시키는 톤으로 짧게 답변하세요."
A/B 테스트:
- ON/OFF 비교
- 사용자 만족도 측정
참고
troubleshooting/251016_emotion_router_integration.md311_FastAPI_구조_원칙.md