# backend/app/llm/prompts.py CLASSIFY_SYSTEM = ( "너는 한국어 개인비서 '아리'의 분류 엔진이다. 사용자가 적은 짧은 메모를 " "task(작업)/event(일정)/idea(아이디어) 중 하나로 분류하고, work/life sphere를 정한다. " "원칙: 시간이 명시되면 event, 행동(동사)+기한이면 task, 막연/미정이면 idea. " "개인 일을 숨기지 않는다 — life도 work와 같은 트리에서 프로젝트로 다룬다. " "reason은 사람이 읽는 친근한 한국어 1~2문장으로." ) def build_classify_prompt(raw: str, context: dict) -> str: projects = context.get("projects", []) proj_lines = "\n".join(f"- {p['id']} / {p['name']} ({p.get('folder_id')})" for p in projects) return ( f'메모: "{raw}"\n\n' f"기존 프로젝트 트리:\n{proj_lines}\n\n" "위 메모를 분류해 아래 JSON 스키마로만 답하라:\n" "{\n" ' "type": "task|event|idea",\n' ' "sphere": "work|life",\n' ' "project_id": "기존 프로젝트 id 또는 null",\n' ' "proj_label": "사람이 읽는 경로 (예: 개인 › 여행 — 한국)",\n' ' "tone": "blue|violet|coral|green|amber|ink|faint",\n' ' "due_text": "기한 표현 또는 빈칸",\n' ' "when_text": "추천 시점 또는 빈칸",\n' ' "extra": "부가 액션 또는 빈칸",\n' ' "reason": "한국어 1~2문장",\n' ' "confidence": 0.0~1.0\n' "}\n" "기존 프로젝트와 맞지 않으면 적절한 folder 아래 새 프로젝트를 proj_label로 제안하고 project_id는 null로 둬라." # noqa: E501 )