Phase X-B 진행중: 유형 B 조립 + 텍스트 보존 강화 + 원본 MDX 복구
X-B-3~5 완료: - space_allocator: build_containers_type_b() 추가 - assemble_stage2: _assemble_type_b() 추가 (소제목 카드형) - pipeline.py: layout_template 분기 (A/B) - pipeline_context: Analysis.layout_template 필드 - validators: 유형 B 검증 완화 텍스트 보존 강화: - KEI_PROMPT: 제목 원본 그대로, 텍스트 재작성 금지 - KEI_STRUCTURED_TEXT_PROMPT: 소제목 유지, 원본 문장 그대로 원본 MDX 복구: - samples/mdx_batch/02.mdx: 표 데이터 누락 수정 (원본에서 재복사) 미해결 (다음 세션): - 들여쓰기: 대제목→중제목→소제목→본문 계층 구조 - 이미지 캡션: [그림 제목] 형식 (대괄호 포함) - 상단 컨테이너: 빈칸 위로 붙이기 - 카드 디자인: 안전과품질/생산성향상/소통과신뢰 디자인 개선 - 제목: Kei가 원본 제목 바꾸는 문제 잔존 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -291,6 +291,7 @@ def validate_stage_1b(
|
||||
topics: list[dict[str, Any]],
|
||||
clean_text: str,
|
||||
raw_content: str = "",
|
||||
layout_template: str = "A",
|
||||
) -> list[dict]:
|
||||
"""Stage 1B(컨셉 구체화) 결과 검증.
|
||||
|
||||
@@ -384,15 +385,18 @@ def validate_stage_1b(
|
||||
claimed_count = evidence.get(relation_type, 0)
|
||||
|
||||
if claimed_count == 0:
|
||||
# 주장한 관계의 증거가 0개
|
||||
alternatives = [(k, v) for k, v in evidence.items() if v >= 2]
|
||||
alt_str = ", ".join(f"{k}({v}개)" for k, v in alternatives[:3])
|
||||
errors.append({
|
||||
"severity": "RETRYABLE",
|
||||
"field": f"topics[{tid}].relation_type",
|
||||
"localization": f"topic {tid}: '{relation_type}' 증거 0개",
|
||||
"evidence": f"원본에서 '{relation_type}' 패턴 없음. 대안: {alt_str}" if alt_str else f"원본에서 '{relation_type}' 패턴 없음",
|
||||
"instruction": f"원본 텍스트에 '{relation_type}' 관계를 나타내는 표현이 없음. 재판단하라.",
|
||||
})
|
||||
if layout_template == "B":
|
||||
# 유형 B: relation_type 증거 부족은 warning만 (역할 구조가 자유)
|
||||
logger.warning(f"[Stage 1B] topic {tid}: '{relation_type}' 증거 0개 — 유형 B warning")
|
||||
else:
|
||||
alternatives = [(k, v) for k, v in evidence.items() if v >= 2]
|
||||
alt_str = ", ".join(f"{k}({v}개)" for k, v in alternatives[:3])
|
||||
errors.append({
|
||||
"severity": "RETRYABLE",
|
||||
"field": f"topics[{tid}].relation_type",
|
||||
"localization": f"topic {tid}: '{relation_type}' 증거 0개",
|
||||
"evidence": f"원본에서 '{relation_type}' 패턴 없음. 대안: {alt_str}" if alt_str else f"원본에서 '{relation_type}' 패턴 없음",
|
||||
"instruction": f"원본 텍스트에 '{relation_type}' 관계를 나타내는 표현이 없음. 재판단하라.",
|
||||
})
|
||||
|
||||
return errors
|
||||
|
||||
Reference in New Issue
Block a user