plan 추가, analysis 오탈자 제거
This commit is contained in:
1 parent
eec682b02c
commit
602c69543c
11 files changed
+440
-43
No files matched your search
@@ -2,6 +2,7 @@ import os
|
||||
from pydantic import BaseModel
|
||||
from common.utils import get_env
|
||||
from integrations.llm.schemas.report import ReportInput, ReportOutput
|
||||
from integrations.llm.schemas.plan import PlanInput, PlanOutput
|
||||
|
||||
_PROMPT_DIR = os.path.join(os.path.dirname(__file__), "temp-prompt")
|
||||
|
||||
@@ -38,3 +39,10 @@ report_prompt = Prompt(
|
||||
input_class=ReportInput,
|
||||
output_class=ReportOutput,
|
||||
)
|
||||
|
||||
plan_prompt = Prompt(
|
||||
file_name="plan_prompt.txt",
|
||||
prompt_model="PLAN_MODEL",
|
||||
input_class=PlanInput,
|
||||
output_class=PlanOutput,
|
||||
)
|
||||
@@ -0,0 +1,239 @@
|
||||
from typing import Literal
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class PlanInput(BaseModel):
|
||||
clinic_name: str | None = None
|
||||
clinic_name_en: str | None = None
|
||||
address: str | None = None
|
||||
phone: str | None = None
|
||||
slogan: str | None = None
|
||||
services: str | None = None
|
||||
doctors: str | None = None
|
||||
report: str | None = None
|
||||
|
||||
|
||||
# --- BrandGuide ---
|
||||
|
||||
class ColorSwatch(BaseModel):
|
||||
name: str
|
||||
hex: str
|
||||
usage: str
|
||||
|
||||
|
||||
class FontSpec(BaseModel):
|
||||
family: str
|
||||
weight: str
|
||||
usage: str
|
||||
sampleText: str
|
||||
|
||||
|
||||
class LogoUsageRule(BaseModel):
|
||||
rule: str
|
||||
description: str
|
||||
correct: bool
|
||||
|
||||
|
||||
class ToneOfVoice(BaseModel):
|
||||
personality: list[str]
|
||||
communicationStyle: str
|
||||
doExamples: list[str]
|
||||
dontExamples: list[str]
|
||||
|
||||
|
||||
class ChannelBrandingRule(BaseModel):
|
||||
channel: str
|
||||
icon: str
|
||||
profilePhoto: str
|
||||
bannerSpec: str
|
||||
bioTemplate: str
|
||||
currentStatus: Literal["correct", "incorrect", "missing"]
|
||||
|
||||
|
||||
class BrandInconsistencyValue(BaseModel):
|
||||
channel: str
|
||||
value: str
|
||||
isCorrect: bool
|
||||
|
||||
|
||||
class BrandInconsistency(BaseModel):
|
||||
field: str
|
||||
values: list[BrandInconsistencyValue]
|
||||
impact: str
|
||||
recommendation: str
|
||||
|
||||
|
||||
class BrandGuide(BaseModel):
|
||||
colors: list[ColorSwatch]
|
||||
fonts: list[FontSpec]
|
||||
logoRules: list[LogoUsageRule]
|
||||
toneOfVoice: ToneOfVoice
|
||||
channelBranding: list[ChannelBrandingRule]
|
||||
brandInconsistencies: list[BrandInconsistency]
|
||||
|
||||
|
||||
# --- ChannelStrategy ---
|
||||
|
||||
class ChannelStrategyCard(BaseModel):
|
||||
channelId: str
|
||||
channelName: str
|
||||
icon: str
|
||||
currentStatus: str
|
||||
targetGoal: str
|
||||
contentTypes: list[str]
|
||||
postingFrequency: str
|
||||
tone: str
|
||||
formatGuidelines: list[str]
|
||||
priority: Literal["P0", "P1", "P2"]
|
||||
customerJourneyStage: Literal["awareness", "interest", "consideration", "conversion", "loyalty"] | None = None
|
||||
|
||||
|
||||
# --- ContentStrategy ---
|
||||
|
||||
class ContentPillar(BaseModel):
|
||||
title: str
|
||||
description: str
|
||||
relatedUSP: str
|
||||
exampleTopics: list[str]
|
||||
color: str
|
||||
|
||||
|
||||
class ContentTypeRow(BaseModel):
|
||||
format: str
|
||||
channels: list[str]
|
||||
frequency: str
|
||||
purpose: str
|
||||
|
||||
|
||||
class WorkflowStep(BaseModel):
|
||||
step: int
|
||||
name: str
|
||||
description: str
|
||||
owner: str
|
||||
duration: str
|
||||
|
||||
|
||||
class RepurposingOutput(BaseModel):
|
||||
format: str
|
||||
channel: str
|
||||
description: str
|
||||
|
||||
|
||||
class ContentStrategyData(BaseModel):
|
||||
pillars: list[ContentPillar]
|
||||
typeMatrix: list[ContentTypeRow]
|
||||
workflow: list[WorkflowStep]
|
||||
repurposingSource: str
|
||||
repurposingOutputs: list[RepurposingOutput]
|
||||
|
||||
|
||||
# --- Calendar ---
|
||||
|
||||
class CalendarEntry(BaseModel):
|
||||
dayOfWeek: int
|
||||
channel: str
|
||||
channelIcon: str
|
||||
contentType: Literal["video", "blog", "social", "ad"]
|
||||
title: str
|
||||
id: str | None = None
|
||||
description: str | None = None
|
||||
pillar: str | None = None
|
||||
status: Literal["draft", "approved", "published"] | None = None
|
||||
isManualEdit: bool | None = None
|
||||
aiPromptSeed: str | None = None
|
||||
|
||||
|
||||
class CalendarWeek(BaseModel):
|
||||
weekNumber: int
|
||||
label: str
|
||||
entries: list[CalendarEntry]
|
||||
|
||||
|
||||
class ContentCountSummary(BaseModel):
|
||||
type: Literal["video", "blog", "social", "ad"]
|
||||
label: str
|
||||
count: int
|
||||
color: str
|
||||
|
||||
|
||||
class CalendarData(BaseModel):
|
||||
weeks: list[CalendarWeek]
|
||||
monthlySummary: list[ContentCountSummary]
|
||||
|
||||
|
||||
# --- AssetCollection ---
|
||||
|
||||
class AssetCard(BaseModel):
|
||||
id: str
|
||||
source: Literal["homepage", "naver_place", "blog", "social", "youtube"]
|
||||
sourceLabel: str
|
||||
type: Literal["photo", "video", "text"]
|
||||
title: str
|
||||
description: str
|
||||
repurposingSuggestions: list[str]
|
||||
status: Literal["collected", "pending", "needs_creation"]
|
||||
|
||||
|
||||
class YouTubeRepurposeItem(BaseModel):
|
||||
title: str
|
||||
views: int
|
||||
type: Literal["Short", "Long"]
|
||||
repurposeAs: list[str]
|
||||
|
||||
|
||||
class AssetCollectionData(BaseModel):
|
||||
assets: list[AssetCard]
|
||||
youtubeRepurpose: list[YouTubeRepurposeItem]
|
||||
|
||||
|
||||
# --- Repurposing ---
|
||||
|
||||
class RepurposingProposalItem(BaseModel):
|
||||
sourceVideo: YouTubeRepurposeItem
|
||||
outputs: list[RepurposingOutput]
|
||||
estimatedEffort: Literal["low", "medium", "high"]
|
||||
priority: Literal["high", "medium", "low"]
|
||||
|
||||
|
||||
# --- Workflow ---
|
||||
|
||||
class WorkflowVideoDraft(BaseModel):
|
||||
script: str
|
||||
shootingGuide: list[str]
|
||||
duration: str
|
||||
|
||||
|
||||
# class WorkflowImageTextDraft(BaseModel):
|
||||
# type: Literal["cardnews", "blog"]
|
||||
# headline: str
|
||||
# copy: list[str]
|
||||
# layoutHint: str | None = None
|
||||
|
||||
|
||||
# class WorkflowItem(BaseModel):
|
||||
# id: str
|
||||
# title: str
|
||||
# contentType: Literal["video", "image-text"]
|
||||
# channel: str
|
||||
# channelIcon: str
|
||||
# stage: Literal["planning", "ai-draft", "review", "approved", "scheduled"]
|
||||
# userNotes: str | None = None
|
||||
# videoDraft: WorkflowVideoDraft | None = None
|
||||
# imageTextDraft: WorkflowImageTextDraft | None = None
|
||||
# scheduledDate: str | None = None
|
||||
|
||||
|
||||
# class WorkflowData(BaseModel):
|
||||
# items: list[WorkflowItem]
|
||||
|
||||
|
||||
# --- PlanOutput ---
|
||||
|
||||
class PlanOutput(BaseModel):
|
||||
brandGuide: BrandGuide
|
||||
channelStrategies: list[ChannelStrategyCard]
|
||||
contentStrategy: ContentStrategyData
|
||||
calendar: CalendarData
|
||||
assetCollection: AssetCollectionData
|
||||
repurposingProposals: list[RepurposingProposalItem] | None = None
|
||||
#workflow: WorkflowData | None = None
|
||||
@@ -1 +1,55 @@
|
||||
당신은 프리미엄 의료 마케팅 전략 플래너입니다. 아래 병원 정보와 분석 리포트를 바탕으로 실행 가능한 마케팅 플랜을 생성해주세요.
|
||||
결과물은 한국어로 생성하세요.
|
||||
|
||||
⚠️ 중요 지침:
|
||||
- 리포트에 데이터가 없는 채널은 channelStrategies에 포함하지 마세요.
|
||||
- 추측하지 마세요. 데이터에 근거한 내용만 작성하세요.
|
||||
- 선택 필드(repurposingProposals, workflow)는 YouTube 데이터가 있을 때만 생성하세요.
|
||||
|
||||
## 병원 기본 정보
|
||||
- 병원명: {clinic_name}
|
||||
- 영문명: {clinic_name_en}
|
||||
- 주소: {address}
|
||||
- 전화: {phone}
|
||||
- 슬로건: {slogan}
|
||||
- 시술: {services}
|
||||
- 의료진: {doctors}
|
||||
|
||||
## 분석 리포트
|
||||
{report}
|
||||
|
||||
## 섹션별 작성 지침
|
||||
|
||||
### Section 1: brandGuide
|
||||
- colors: 병원 아이덴티티에 맞는 컬러 팔레트 3~5개 (hex + 사용 가이드)
|
||||
- fonts: 제목/본문/캡션용 폰트 시스템 (한글/영문 포함)
|
||||
- logoRules: DO/DON'T 형식의 로고 사용 규칙 4~6개
|
||||
- toneOfVoice: 브랜드 성격 키워드, 커뮤니케이션 스타일, 권장/지양 표현 예시
|
||||
- channelBranding: 리포트에 존재하는 채널별 브랜딩 적용 규칙
|
||||
- brandInconsistencies: 채널 간 브랜딩 불일치 항목 및 개선 권고
|
||||
|
||||
### Section 2: channelStrategies
|
||||
- 리포트에 데이터가 있는 채널만 포함
|
||||
- 각 채널의 우선순위(P0/P1/P2), 목표, 콘텐츠 유형, 게시 빈도, 포맷 가이드라인 작성
|
||||
- customerJourneyStage는 해당 채널의 주요 기여 단계로 설정
|
||||
|
||||
### Section 3: contentStrategy
|
||||
- pillars: 3~5개의 콘텐츠 필러 (병원 USP 기반)
|
||||
- typeMatrix: 포맷 × 채널 매트릭스 (Shorts/Reels/블로그/카드뉴스 등)
|
||||
- workflow: 기획→촬영→편집→업로드의 제작 워크플로우 단계
|
||||
- repurposingSource/repurposingOutputs: YouTube 롱폼 기반 재가공 전략
|
||||
|
||||
### Section 4: calendar
|
||||
- 4주 캘린더로 채널별 게시 슬롯 배분
|
||||
- 각 항목은 요일(0=월~6=일), 채널, 콘텐츠 유형, 제목 포함
|
||||
- monthlySummary에 카테고리(video/blog/social/ad)별 월간 게시 수 집계
|
||||
|
||||
### Section 5: assetCollection
|
||||
- assets: 홈페이지/SNS에서 수집 가능한 에셋 카드 (사진/영상/텍스트)
|
||||
- youtubeRepurpose: 조회수 높은 YouTube 영상 재가공 후보 목록
|
||||
|
||||
### Section 6: repurposingProposals (YouTube 데이터 있을 때만)
|
||||
- YouTube 영상별 재가공 산출물, 예상 난이도, 우선순위 제시
|
||||
|
||||
### Section 7: workflow (선택)
|
||||
- 제작 진행 중인 콘텐츠 카드 초안 (스크립트 또는 카드뉴스 카피 포함)
|
||||
Reference in new issue
Block a user