07-extraction-01-pipeline-overview
Dec 7, 2025
Pipeline Overview
전체 흐름
1. Input: Raw Email
Gmail API에서 가져온 원본 이메일:
subject: 이메일 제목from: 발신자content: 본문 (HTML → plaintext 변환 완료)groundTruth: 수동 라벨링된 정답 (검증용)
2. Extraction LLM
Model: claude-3-5-haiku-20241022
Input: 이메일 본문
Output:
Prompt: Constitutional AI 6원칙 기반 (02-domain-classification.md 참조)
3. Judge LLM
Purpose: 예측된 subject와 Ground Truth의 의미적 동등성 판단
Model: claude-3-5-haiku-20241022
Input:
Ground Truth subject
Predicted subject
Output:
Details: 03-validation-framework.md 참조
4. Validation Result
최종 검증 결과:
비용 구조
단계 | 모델 | 비용/이메일 |
|---|---|---|
Extraction | Haiku 3.5 | ~$0.0008 |
Embedding | text-embedding-3-small | ~$0.0001 |
Judge | Haiku 3.5 | ~$0.0002 |
Total | - | ~$0.001 |
병목 및 최적화
Extraction: 가장 큰 비용 (~80%)
최적화: 프롬프트 간소화, 출력 토큰 제한
Judge: 필요시에만 호출
최적화: 높은 확신도 케이스는 스킵 가능
Embedding: 참고용이므로 선택적
최적화: Judge만 사용시 제거 가능