Skip to content

[DP-404] Top 5 콘텐츠 LLM 서사 요약 구현#55

Merged
suheon98 merged 1 commit intodevelopV2from
feature/DP-404-trend-top-posts-summary
Apr 24, 2026
Merged

[DP-404] Top 5 콘텐츠 LLM 서사 요약 구현#55
suheon98 merged 1 commit intodevelopV2from
feature/DP-404-trend-top-posts-summary

Conversation

@suheon98
Copy link
Copy Markdown
Collaborator

Summary

  • SummaryRepository.find_summaries_for_trend() 추가 — DynamoDB mid 레벨에서 one_line_summary, keywords, tags, category 배치 조회
  • app/core/prompts/trend_top_posts.py 신규 — 서사 요약 프롬프트, 일단위 시간 범위 레이블(M월 D일 HH시~HH시), 이전 기간 비교 섹션
  • TopPostsSummaryGenerator.generate() 신규 — prev_summary 옵셔널 파라미터로 이전 기간 차이점 서술 지원, 빈 입력 → None, LLM 실패 → AIUpstreamError/AITimeoutError 전파

Test plan

  • pytest tests/test_trend_top_posts_summary.py — 6개 케이스 통과 확인
    • 정상 반환 / 빈 입력 → None / LLM 실패 예외 / daily 시간 범위 레이블 / prev_summary 프롬프트 주입 / one_line_summary 누락 fallback
  • pytest tests/test_summary_repository.py — find_summaries_for_trend mid 레벨 조회 확인
  • pytest -q 전체 399개 통과
  • ruff check . && black --check . 클린

🤖 Generated with Claude Code

- SummaryRepository.find_summaries_for_trend(): mid 레벨 one_line_summary + keywords 배치 조회
- app/core/prompts/trend_top_posts.py: 서사 요약 프롬프트 + 일단위 시간 범위 레이블(M월 D일 HH시~HH시) + 이전 기간 비교 섹션
- TopPostsSummaryGenerator.generate(): prev_summary 주입으로 이전 기간 차이점 서술 지원

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@suheon98 suheon98 merged commit d4e9d47 into developV2 Apr 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant