Skip to content

[Refactor]: AI-01/AI-05 tone 파라미터 독립화 및 프롬프트 개선#101

Merged
munwalk merged 1 commit intomoduwa-aac:developfrom
munwalk:refactor/#98-ai-tone-refactor
Feb 18, 2026
Merged

[Refactor]: AI-01/AI-05 tone 파라미터 독립화 및 프롬프트 개선#101
munwalk merged 1 commit intomoduwa-aac:developfrom
munwalk:refactor/#98-ai-tone-refactor

Conversation

@munwalk
Copy link
Copy Markdown
Contributor

@munwalk munwalk commented Feb 18, 2026

📌 PR 요약

  • AI-01/AI-05에 tone 독립 파라미터 추가 (HONORIFIC/INFORMAL)
  • tone을 endingCards에 합성하던 방식 제거 → FastAPI에 직접 전달
  • AI-01/AI-05 프롬프트 품질 개선 및 max_tokens 최적화

⚡ 주요 변경 사항

  • tone 독립화 (AI-05): 기존에 tone을 ["반말", "질문"]처럼 endingCards 앞에 삽입하던 로직 제거 → FastAPI에 tone 파라미터로 직접 전달
  • AI-01 tone 지원: POST /api/ai/predictions에 tone 파라미터 추가 (DTO, validator, controller, service, FastAPI)
  • 캐시 분리: generateCacheKey에 tone 인자 추가 → 반말/존댓말 캐시 분리
  • AI-01 프롬프트 개선: 단어 분산 금지 규칙 명확화, 예시 간결화
  • AI-05 프롬프트 개선: 질문 카드 처리 강화 (평서형+? 금지, 어미 자체를 의문형으로 변환), 스타일 단어 삽입 방지 로직 동적 감지
  • max_tokens 최적화: AI-01/AI-05 단어 수 구간별 토큰 감소
  • Swagger: tone 스펙 업데이트, 에러 예시 추가, 캐싱 방지 미들웨어 추가

✅ 테스트 내용

  • AI-01 tone=HONORIFIC/INFORMAL 정상 동작 확인
  • AI-05 tone 단독 사용 / endingCards 병용 정상 동작 확인
  • 질문 카드 + tone 조합 의문형 어미 정상 생성 확인
  • 캐시 분리 동작 확인 (tone 다르면 별도 캐시)

📎 관련 이슈

📝 기타 참고사항

  • 머지 후 별도 패키지 설치/환경변수 추가 없음
  • Swagger 캐싱 방지 미들웨어로 spec 변경 시 즉시 반영됨

@munwalk munwalk self-assigned this Feb 18, 2026
@munwalk munwalk added the ♻️ Refactor 리팩토링 label Feb 18, 2026
@munwalk munwalk merged commit 3497b1e into moduwa-aac:develop Feb 18, 2026
3 checks passed
@munwalk munwalk deleted the refactor/#98-ai-tone-refactor branch February 18, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ Refactor 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor] AI-01/AI-05 tone 파라미터 독립화 및 프롬프트 개선

1 participant