feat(blog-lab): 평가자 단계 — 6기준 60점 체계 + link_natural 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-07 01:00:21 +09:00
parent 4646b79e6e
commit b82a10e580
3 changed files with 126 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
"""Claude API 기반 블로그 글 품질 리뷰 — 5기준 × 10점, 35/50 통과."""
"""Claude API 기반 블로그 글 품질 리뷰 — 6기준 × 10점, 42/60 통과."""
import json
import logging
@@ -11,7 +11,7 @@ from .db import get_template
logger = logging.getLogger(__name__)
PASS_THRESHOLD = 35 # 50점 만점 중 35점 이상이면 통과
PASS_THRESHOLD = 42 # 60점 만점 중 42점 이상이면 통과 (70%)
_client: Optional[anthropic.Anthropic] = None
@@ -28,7 +28,10 @@ def review_post(title: str, body: str) -> Dict[str, Any]:
Returns:
{
"scores": {"empathy": N, "click_appeal": N, "conversion": N, "seo": N, "format": N},
"scores": {
"empathy": N, "click_appeal": N, "conversion": N,
"seo": N, "format": N, "link_natural": N
},
"total": N,
"pass": bool,
"feedback": str
@@ -69,7 +72,10 @@ def review_post(title: str, body: str) -> Dict[str, Any]:
except (json.JSONDecodeError, KeyError, TypeError) as e:
logger.warning("Quality review JSON parse failed: %s", e)
return {
"scores": {"empathy": 0, "click_appeal": 0, "conversion": 0, "seo": 0, "format": 0},
"scores": {
"empathy": 0, "click_appeal": 0, "conversion": 0,
"seo": 0, "format": 0, "link_natural": 0,
},
"total": 0,
"pass": False,
"feedback": f"리뷰 파싱 실패. 원본 응답:\n{raw[:500]}",