fix(voice): 음성 프롬프트를 farming 도메인·기록 화면 표기와 정합 - #59
Draft
Kimseungin0529 wants to merge 3 commits into
Draft
Conversation
파종량(g)·모종수(주)·총 살포량(ml)은 단위 enum이 하나뿐인데 프롬프트가 단위를 되묻게 유도해 불필요한 질문이 나가던 문제를 수정한다. 되묻기는 단위가 두 가지인 시비량·농약량에만 적용하고, 단일 단위는 자동으로 채운다. 또한 심기를 기록하는 중에 수확량·재배기간 등 다른 작업 유형의 항목을 묻던 문제를 막기 위해, 감지된 작업 유형의 항목만 질문하라는 경계 규칙을 추가한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
농지·작물을 물을 때 AI가 사용자의 농장과 각 농장의 작물 목록을 먼저 읽어주고 그중에서 고르게 하도록 지시한다(선제 안내가 없어 사용자가 옵션을 모른 채 답해야 했음). 또한 도메인이 선택한 농지에 등록된 작물만 허용(FARMING_RECORD_CROP_NOT_IN_FARM) 하는 것에 맞춰, 각 농지에는 그 농지에 나열된 작물만 고를 수 있고 아니면 되묻도록 규칙을 명시한다. 목록 데이터는 이미 농지별로 주입되고 있어 문구만 보강한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
음성이 말하는 용어가 화면 표기와 달라 혼란을 주던 문제를 해결한다. 관수→물주기, 파종량→심은 씨앗량, 모종수→심은 갯수, 심기 방법→심은 방법, 비료명→사용 비료, 시비량→비료 사용량, 농약명→사용 농약, 농약량→농약 사용량, 방제 대상→대상 병해충, 마지막 수확→최종 수확으로 통일하고, 작업 유형을 말할 때 화면과 같은 이름(심기/물주기/… )을 쓰도록 명시한다. 수확 출처(harvestSource)는 프론트가 화면에 노출하지 않고 항상 CULTIVATED로 저장하므로, 음성 tool 스키마에서 제거해 불필요한 질문을 없앤다(도메인 기본값 CULTIVATED, 선택 필드라 안전). 관련 프롬프트 문자열 단언 테스트를 갱신하고, 단일 단위 자동 채움·작업 유형 경계·harvestSource 제거를 검증하는 테스트를 추가한다. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 내용
음성 기록 프롬프트를 farming 도메인 규칙·기록 화면 표기와 정합시킨다. (백엔드 프롬프트만 수정, 도메인/DTO/저장 경로 무변경)
existsByMemberIdAndFarmIdAndCropId와 정합).변경 이유
음성 기록 실사용에서 심기 중 수확 질문, g 하나뿐인 단위 되묻기, 화면과 다른 용어(관수 vs 물주기)로 사용자 혼란이 발생. 도메인(검증기·enum)과 기록 화면 표기를 정답으로 삼아 프롬프트를 정합.
영향 범위
VoiceSessionInstructions.kt,FarmingRecordVoiceToolSchema.kt(application/voice) 수정.VoiceSessionInstructionsTest,FarmingRecordVoiceToolSchemaTest).검증
cd backend && ./gradlew test→ BUILD SUCCESSFUL (전체 통과).배포 및 호환성
체크리스트
./gradlew test)