Skip to content

feat: 대화 주제 추천 프롬프팅 작성 - #21

Merged
Hminkyung merged 6 commits into
developfrom
feat/#20-conversation-recommend
Jun 5, 2026
Merged

feat: 대화 주제 추천 프롬프팅 작성#21
Hminkyung merged 6 commits into
developfrom
feat/#20-conversation-recommend

Conversation

@Hminkyung

@Hminkyung Hminkyung commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

📌 작업 요약

🌿 브랜치 정보

  • Source: feat/#20-conversation-recommend
  • Target: develop (기본)

✅ 체크리스트

  • 브랜치 컨벤션 준수 (feat/refac/hotfix/chore/design/bugfix)
  • 커밋 컨벤션 준수 (feat/fix/refactor/docs/style/chore)
  • self-review 완료
  • 테스트 및 로컬 실행 확인 완료

🧪 테스트 결과

  • (테스트 코드 실행 결과 스크린샷이나 로그, 또는 테스트 방법)

Summary by CodeRabbit

  • New Features

    • 뉴스레터 분석 결과에 학부모가 자녀와 나눌 수 있는 대화 주제를 최대 3개까지 제시하는 기능을 추가했습니다. 행정 관련 내용과 개인정보 항목은 제외됩니다.
  • Chores

    • AWS 배포 워크플로우 명령 처리 방식을 최적화했습니다.

@Hminkyung Hminkyung self-assigned this Jun 5, 2026
@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Hminkyung, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 48 minutes and 33 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: dcc8db05-74c9-4933-850f-0fb4b28b47e9

📥 Commits

Reviewing files that changed from the base of the PR and between eaa7d72 and f0d9403.

📒 Files selected for processing (2)
  • app/schemas.py
  • app/services/newsletter_prompt.py
📝 Walkthrough

개요

뉴스레터 분석 응답에 대화주제 추천 기능을 추가하고, AWS 배포 워크플로우의 SSM 명령어 구성을 수정하는 변경입니다.

변경 사항

대화주제 추천 기능

계층 / 파일 요약
데이터 모델 및 분석 스키마
app/schemas.py, app/services/newsletter_prompt.py
ConversationTopic 모델을 정의하고 NewsletterAnalysisResponseconversation_topics 필드를 추가합니다. 분석 응답 JSON 스키마에 최대 3개의 conversationTopics 배열을 정의합니다.
시스템 프롬프트 추출 규칙
app/services/newsletter_prompt.py
다문화 가정 학부모와 초등학생 자녀가 나눌 수 있는 주제 추출 규칙을 명시합니다. 행정·보호자 대상 내용 제외, 시제/질문 유형 구분, 단순 확인 질문 배제, 적합 주제 없을 시 빈 배열 반환을 규칙으로 제시합니다.

AWS SSM 배포 워크플로우

계층 / 파일 요약
SSM 명령어 구성 수정
.github/workflows/deploy-ai-ec2.yml
jq로 구성하는 SSM 파라미터의 commands 필드를 중첩 배열 및 join 로직에서 단순 배열 형태로 변경합니다.

코드 리뷰 난이도

🎯 2 (단순) | ⏱️ ~12분

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 대화 주제 추천 프롬프팅 작성이라는 변경의 핵심을 명확하게 나타내며, 제공된 변경 사항들과 완전히 일치합니다.
Linked Issues check ✅ Passed PR의 변경 사항들이 이슈 #20의 요구 사항을 충족합니다: 대화 주제 추천 기능 추가(ConversationTopic 스키마 추가) 및 필드 추가(conversation_topics 필드)가 구현되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경 사항이 대화 주제 추천 프롬프팅 구현과 직접 관련되어 있으며, 범위를 벗어난 변경사항은 없습니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으나 테스트 결과 섹션이 비어있습니다.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#20-conversation-recommend

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.

@Hminkyung Hminkyung added feat 새로운 기능 추가 작업 fix 버그 수정 작업 labels Jun 5, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@app/schemas.py`:
- Around line 84-86: The ConversationTopic model's topic field lacks validation;
update the ConversationTopic class to enforce sensible constraints by adding a
Pydantic field validator or Field(...) metadata on topic (e.g., min_length and
max_length) and optionally a regex if needed, and include a clear validation
error message; modify the topic declaration in ConversationTopic to use
Field(..., min_length=1, max_length=200) or implement a `@validator`("topic")
method to trim/validate and raise ValueError for invalid values.

In `@app/services/newsletter_prompt.py`:
- Around line 60-67: CONVERSATION_TOPIC_SCHEMA's "topic" property lacks string
length constraints; add "minLength" and "maxLength" to the "topic" schema entry
so the JSON schema enforces the same bounds as the corresponding Pydantic model
(keep values aligned with the Pydantic model's limits), i.e., update the
CONVERSATION_TOPIC_SCHEMA -> properties -> "topic" to include minLength and
maxLength that match the model's validation.
- Around line 137-139: The exclusion rule "학부모가 이미 알고 있는 사실을 단순히 확인하는 질문은 제외한다"
is ambiguous—update the prompt text in newsletter_prompt.py to include 2–3
concrete examples (e.g., "오늘 학교에 갔나요?", "점심은 무엇을 먹었나요?", "숙제를 했나요?") and a brief
clarifier (e.g., "이미 보고된 사실을 재확인하는 질문은 제외"). Locate and modify the exact string
block containing that rule so the LLM sees the examples inline and returns
clearer, consistent behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 58219535-52c0-4422-8ba0-710eda01185a

📥 Commits

Reviewing files that changed from the base of the PR and between 321c541 and eaa7d72.

📒 Files selected for processing (3)
  • .github/workflows/deploy-ai-ec2.yml
  • app/schemas.py
  • app/services/newsletter_prompt.py

Comment thread app/schemas.py
Comment thread app/services/newsletter_prompt.py
Comment thread app/services/newsletter_prompt.py
@Hminkyung
Hminkyung requested a review from deli-minju June 5, 2026 07:52

@deli-minju deli-minju left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

가정통신문 분석 결과에서 학부모가 자녀와 자연스럽게 이야기할 수 있는 주제를 제공하도록 확장된 점이 서비스 흐름에 잘 맞는 것 같습니다. 행정성 내용과 개인정보 항목을 제외하도록 제한한 부분도 적절해 보입니다. 고생하셨습니다!

@Hminkyung
Hminkyung merged commit 1fa3b51 into develop Jun 5, 2026
3 checks passed
@deli-minju deli-minju removed the fix 버그 수정 작업 label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 새로운 기능 추가 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 가정통신문 대화주제 추천 프롬프트 추가

2 participants