diff --git a/journey/research/intent_classification/390_human_in_the_loop_intent_learning.md b/journey/research/intent_classification/390_human_in_the_loop_intent_learning.md index 3e35533..8b3a421 100644 --- a/journey/research/intent_classification/390_human_in_the_loop_intent_learning.md +++ b/journey/research/intent_classification/390_human_in_the_loop_intent_learning.md @@ -90,13 +90,15 @@ - Request Body: `{"message_id": "...", "feedback": "up" | "down"}` - `get_current_user`로 JWT에서 **UUID** 추출. 2. `handle_chat_feedback(user_id, message_id, feedback)` 호출: - - `message_id`에서 `conversation_log_id`를 파싱 (`"123_robeing" → 123`) + - `message_id`에서 `conversation_log_id`를 파싱 (`"123_rb8001" → 123`) - `conversation_log_id`로 `ConversationLog`를 찾아서 `message`, `intent`, `confidence`를 가져옴(있으면). - 해당 `(conversation_log_id, user_id)` 조합에 대해 리뷰 큐 행을 생성/업데이트: - `feedback='up'` → `status='confirmed'` - `feedback='down'` → `status='corrected'` 3. ConversationLog가 없는 경우(예: 임시 ID)에는 `conversation_log_id=None`으로 리뷰 큐에 최소 정보만 남긴다. +> **중요 (2025-11-17 수정)**: `/api/message` 응답에 `message_id` 필드가 포함되도록 수정됨 (`{conversation_log_id}_rb8001` 형식). 이를 통해 프론트엔드에서 피드백 전송 시 정확한 `conversation_log_id` 매칭이 가능해졌다. + > **원칙**: 피드백 API는 실패하더라도 사용자 경험을 깨지 않기 위해 항상 200을 반환하며, 내부 에러는 로그로만 남긴다. ---