Skip to content

[Feature] 챌린지 프롬포트 개선 및 모델 변경#143

Merged
ssyoung02 merged 6 commits intodevelopfrom
137-feature/improve-challenge-prompt
Jan 22, 2026
Merged

[Feature] 챌린지 프롬포트 개선 및 모델 변경#143
ssyoung02 merged 6 commits intodevelopfrom
137-feature/improve-challenge-prompt

Conversation

@ssyoung02
Copy link
Contributor

🛠 Related issue 🛠

✏️ Work Description ✏️

  • 챌린지 프롬포트 개선
  • GPT 모델 gpt-5.1로 변경

📸 Screenshot 📸

설명 사진
N/A N/A

😅 Uncompleted Tasks 😅

📢 To Reviewers 📢

@ssyoung02 ssyoung02 requested a review from Kimgyuilli January 22, 2026 16:20
@ssyoung02 ssyoung02 self-assigned this Jan 22, 2026
@ssyoung02 ssyoung02 added ✨ Feature 기능 개발 서영 🦊 서영 담당 작업 P2 우선순위: 2순위 작업 labels Jan 22, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

챌린지 추천 AI 프롬프트를 2030세대 대상 에디토리얼 톤으로 대폭 재작성하고, OpenAI 모델을 gpt-5.1로 변경하며 토큰 설정 키를 max-completion-tokens로 대체했습니다.

Changes

코호트 / 파일(s) 변경 사항
AI 프롬프트 템플릿 업데이트
src/main/java/com/sopt/cherrish/domain/challenge/recommendation/infrastructure/prompt/ChallengePromptTemplate.java
프롬프트 문자열 전면 교체: 대상층을 2030세대로 명시, 계획 규칙·카테고리 규칙·출력 제약(문자수, 금지어 등) 확대·강화. 리턴 메서드 서식 일부 조정(시그니처 불변).
OpenAI 설정 업데이트
src/main/resources/application-openai.yaml
기본 모델을 gpt-4.1-minigpt-5.1로 변경. max-tokens 설정을 max-completion-tokens로 교체 및 관련 환경변수 키 업데이트. 온도 값 로딩은 유지.

Sequence Diagram(s)

(생략 — 변경이 주로 프롬프트 및 설정 텍스트이며 다중 컴포넌트 제어 흐름 변경 사항이 아님)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • Kimgyuilli
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 주요 변경사항을 명확하게 요약하고 있습니다: 챌린지 프롬포트 개선 및 모델 변경은 코드 변경의 핵심을 반영합니다.
Description check ✅ Passed PR 설명이 변경사항과 관련이 있으며, 챌린지 프롬포트 개선 및 GPT 모델 변경에 대해 설명하고 있습니다.
Linked Issues check ✅ Passed PR이 #137 이슈의 '챌린지 프롬포트 개선'이라는 목표를 충족합니다. 프롬포트 템플릿이 확장되고 개선되었으며 모델이 업데이트되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 #137 이슈와 직접 관련이 있습니다: 프롬포트 개선과 모델 변경은 요구사항 범위 내입니다.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 137-feature/improve-challenge-prompt

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In
`@src/main/java/com/sopt/cherrish/domain/challenge/recommendation/infrastructure/prompt/ChallengePromptTemplate.java`:
- Around line 21-33: The prompt text in ChallengePromptTemplate.java contains a
contradiction between the rule "외래어·영어·전문용어는 일반적인 한국어 표현으로 치환" and the
recommended words/examples (e.g., "괄사", "림프", "PDRN", "토너", "마스크팩"); update the
template so the rule and examples are consistent by either (A) relaxing the rule
to explicitly allow a whitelist of common loanwords/industry terms (list those
allowed terms in the template) or (B) converting all example/recommended terms
to their Korean equivalents and removing loanwords (e.g., 괄사→괄사 설명 or
alternative Korean phrase, 림프→림프 순환 설명, PDRN→재생성분(또는 한국어 대체어), 토너→스킨/토너(표준화 뒤
하나로 통일), 마스크팩→마스크 시트 등); modify the constant(s) or string(s) in
ChallengePromptTemplate (look for the prompt template text block and the
sections around the “외래어·영어·전문용어” rule and the examples at lines ~49-53) to
reflect the chosen approach so the rule and examples no longer conflict.
- Around line 41-53: In ChallengePromptTemplate.java update the example phrases
so they all end with "하기" (or remove noncompliant examples) to match the rule
"모든 루틴 문장은 반드시 '~하기' 형태로 끝납니다"; locate the example block inside the prompt
template (ChallengePromptTemplate) and change items like "기상 직후 스트레칭 10분" -> "기상
직후 스트레칭 10분하기", "기상 직후 아침 명상" -> "기상 직후 아침 명상하기", and any other examples not
ending with "하기" (or remove them) so every example strictly follows the "~하기"
ending.

In `@src/main/resources/application-openai.yaml`:
- Around line 7-9: Replace the incorrect Spring AI property prefix so the
max-completion-tokens option binds correctly: change the current properties
under the keys model, temperature, and max-completion-tokens which are using the
prefix spring.ai.openai.chat.options (or plain spring.ai.openai.*) to use
spring.ai.openai-sdk.chat.options.max-completion-tokens (i.e., move
max-completion-tokens under spring.ai.openai-sdk.chat.options) while keeping
model and temperature under the corresponding spring.ai.openai-sdk.chat.*
grouping so the OpenAI options (e.g., gpt-5.1, temperature) bind correctly.

Copy link
Contributor

@Kimgyuilli Kimgyuilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어푸푸푸

@ssyoung02 ssyoung02 merged commit 3cc8e32 into develop Jan 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ Feature 기능 개발 P2 우선순위: 2순위 작업 서영 🦊 서영 담당 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[✨ Feature] 챌린지 프롬포트 개선

2 participants

Comments