Azure Document Intelligence 전용 모델 전체 정리 — 영수증부터 계약서까지 15개 모델
prebuilt-read, prebuilt-receipt, prebuilt-contract, prebuilt-invoice — 모델명만 바꾸면 구조화된 데이터가 나온다
prebuilt-read (단순 OCR) vs 전용 모델의 차이
Azure Document Intelligence 안에도 모델이 여러 개다. 같은 서비스인데 모델명에 따라 출력이 완전히 다르다.
prebuilt-read (단순 OCR):
영수증 이미지 → prebuilt-read → "スターバックス 渋谷店 2026/04/05 カフェラテ ¥550 合計 ¥550"
→ 전부 하나의 텍스트 덩어리. 가게명이 뭔지, 금액이 뭔지 직접 파싱해야 함
prebuilt-receipt (영수증 전용):
영수증 이미지 → prebuilt-receipt →
{
"MerchantName": "スターバックス 渋谷店",
"TransactionDate": "2026-04-05",
"Items": [{"Description": "カフェラテ", "TotalPrice": 550}],
"Total": 550
}
→ 구조화된 JSON. 파싱 필요 없음
같은 이미지인데 모델명만 바꾸면 출력 형태가 완전히 다르다.
전용 모델 전체 목록
범용 (문서 타입 무관):
| 모델 ID | 용도 | 출력 |
|---|---|---|
| prebuilt-read | 범용 OCR (텍스트 추출) | 텍스트 + 위치 좌표 |
| prebuilt-layout | 문서 레이아웃 분석 | 텍스트 + 표 + 그림 위치 + 문단 구조 |
비즈니스 문서:
| 모델 ID | 용도 | 추출 필드 |
|---|---|---|
| prebuilt-invoice | 청구서/인보이스 | 공급자명, 청구일, 금액, 세금, 품목 리스트 |
| prebuilt-receipt | 영수증 | 가게명, 날짜, 품목, 금액, 합계, 팁 |
| prebuilt-contract | 계약서 | 당사자, 관할권, 계약 ID, 제목, 품목 |
| prebuilt-creditCard | 신용카드 | 카드번호, 만료일, 발급사, 카드소유자 |
| prebuilt-bankStatement | 은행 명세서 | 계좌번호, 거래 내역, 잔액 |
| prebuilt-check | 수표 | 수취인, 금액, 날짜, 은행 라우팅 번호 |
| prebuilt-payStub | 급여 명세서 | 이름, 급여, 세금, 공제 항목 |
| prebuilt-marriageCertificate | 혼인 증명서 | 배우자 이름, 날짜, 장소 |
| prebuilt-mortgageClosingDisclosure | 모기지 마감 공시 | 대출 금액, 이율, 월 납부액 |
신분증:
| 모델 ID | 용도 | 추출 필드 |
|---|---|---|
| prebuilt-idDocument | 여권/운전면허/ID카드 | 이름, 생년월일, 문서번호, 만료일, 국적 |
| prebuilt-healthInsuranceCard.us | 미국 건강보험카드 | 보험사, 회원 ID, 그룹번호 |
기타:
| 모델 ID | 용도 | 추출 필드 |
|---|---|---|
| prebuilt-tax.us.w2 | 미국 W-2 세금 양식 | 고용주, 급여, 세금 |
| prebuilt-tax.us.1098 | 미국 1098 양식 | 이자 지급액 |
| prebuilt-tax.us.1099 | 미국 1099 양식 | 비고용 소득 |
코드 — 모델명만 바꾸면 된다
from azure.ai.documentintelligence import DocumentIntelligenceClient
from azure.core.credentials import AzureKeyCredential
client = DocumentIntelligenceClient(
endpoint="https://your-resource.cognitiveservices.azure.com/",
credential=AzureKeyCredential("your-key")
)
# ★ 모델명만 바꾸면 추출 결과가 달라진다 ★
# 범용 텍스트 추출
with open("doc.pdf", "rb") as f:
result = client.begin_analyze_document("prebuilt-read", body=f).result()
for page in result.pages:
for line in page.lines:
print(line.content)
# 영수증 → 가게명, 날짜, 금액이 구조화되어 나옴
with open("receipt.jpg", "rb") as f:
result = client.begin_analyze_document("prebuilt-receipt", body=f).result()
for doc in result.documents:
print(f"가게: {doc.fields.get('MerchantName', {}).get('content')}")
print(f"날짜: {doc.fields.get('TransactionDate', {}).get('content')}")
print(f"합계: {doc.fields.get('Total', {}).get('content')}")
# 계약서 → 당사자, 관할권이 구조화되어 나옴
with open("contract.pdf", "rb") as f:
result = client.begin_analyze_document("prebuilt-contract", body=f).result()
for doc in result.documents:
parties = doc.fields.get('Parties', {})
print(f"당사자: {parties}")
# 여권/운전면허 → 이름, 생년월일이 구조화되어 나옴
with open("passport.jpg", "rb") as f:
result = client.begin_analyze_document("prebuilt-idDocument", body=f).result()
for doc in result.documents:
print(f"이름: {doc.fields.get('FirstName', {}).get('content')}")
print(f"생년월일: {doc.fields.get('DateOfBirth', {}).get('content')}")
# 인보이스 → 공급자, 금액, 품목이 구조화되어 나옴
with open("invoice.pdf", "rb") as f:
result = client.begin_analyze_document("prebuilt-invoice", body=f).result()
for doc in result.documents:
print(f"공급자: {doc.fields.get('VendorName', {}).get('content')}")
print(f"합계: {doc.fields.get('InvoiceTotal', {}).get('content')}")
for item in doc.fields.get('Items', {}).get('value', []):
print(f" 품목: {item.get('content')}")
코드가 전부 같은 구조다. begin_analyze_document("모델명", body=파일)만 다르다.
가격 (모델별로 다르다!)
| 모델 | 1,000페이지 가격 | 비고 |
|---|---|---|
| prebuilt-read | ~$1.50 | 가장 저렴 (단순 OCR) |
| prebuilt-layout | ~$10 | 표·구조 분석 포함 |
| prebuilt-receipt | ~$10 | 필드 구조화 비용 |
| prebuilt-invoice | ~$10 | 필드 구조화 비용 |
| prebuilt-contract | ~$10 | 필드 구조화 비용 |
| prebuilt-idDocument | ~$10 | 필드 구조화 비용 |
| 커스텀 모델 | ~$10+ | 직접 훈련한 모델 |
핵심: prebuilt-read(단순 OCR)는 $1.50인데, 전용 모델(receipt, contract 등)은 $10. 구조화 추출에 비용이 붙는다.
커스텀 모델 — 내 양식도 만들 수 있다
전용 모델 목록에 내가 원하는 양식이 없으면? Azure에서 직접 훈련할 수 있다.
- Azure Portal에서 프로젝트 생성
- 내 양식 이미지 + 라벨링 ("이 영역은 이름", "이 영역은 금액")
- 학습 버튼 클릭
custom-model-id로 호출
result = client.begin_analyze_document("my-custom-model-id", body=f).result()
최소 5장의 샘플이면 훈련 가능. Azure Portal의 GUI에서 라벨링하니까 코드 작성이 필요 없다.
단순 OCR vs 전용 모델 — 핵심 차이
단순 OCR (prebuilt-read, Google Vision, EasyOCR 등):
이미지 → "텍스트 전체를 하나의 문자열로"
→ 사용자가 직접 파싱해야 함 (정규식, NLP, LLM 등)
Azure 전용 모델 (prebuilt-receipt, prebuilt-contract 등):
이미지 → 문서 타입에 맞는 JSON 구조로
→ 파싱 불필요. 필드명으로 바로 접근
prebuilt-read가 "텍스트를 읽는 것"이라면, prebuilt-receipt/contract는 "문서를 이해하는 것"이다. 같은 Azure 서비스 안에서 모델명만 다르다.
실전 사례: 일본어 계약서 처리 시스템
실제 프로덕션에서 일본어 계약서를 처리하는 시스템을 분석해봤다.
현재 아키텍처:
계약서 PDF → prebuilt-layout ($1.50/1K) → Markdown 텍스트
→ LLM (Azure OpenAI) → 당사자·기간·금액 추출
prebuilt-layout으로 텍스트만 뽑고, 구조화는 LLM이 담당한다.
prebuilt-contract로 바꾸면?
계약서 PDF → prebuilt-contract ($10/1K) → 당사자·관할권·계약ID (JSON)
→ LLM 호출 불필요 (또는 대폭 감소)
prebuilt-contract는 당사자·관할권·계약ID를 OCR 단계에서 바로 추출한다. LLM 호출을 줄이거나 없앨 수 있다.
근데 바꾸지 않은 이유:
prebuilt-contract는 현재 영어만 지원한다. 일본어 계약서에는 쓸 수 없다. 그래서 prebuilt-layout + LLM 조합이 현실적인 선택이다.
비용 비교 (월 10,000페이지):
| 방식 | OCR 비용 | LLM 비용 | 합계 |
|---|---|---|---|
| prebuilt-layout + LLM | $15 | ~$50~200 | ~$65~215 |
| prebuilt-contract (영어만) | $100 | $0~50 | ~$100~150 |
| prebuilt-layout만 (구조화 안 함) | $15 | $0 | $15 |
prebuilt-contract가 LLM 비용을 줄이지만, OCR 비용 자체가 6배. 총 비용은 비슷하거나 오히려 비쌀 수 있다. 일본어를 지원하면 그때 전환을 검토할 만하다.
핵심 개념
prebuilt-read — 범용 OCR ($1.50/1K). 텍스트 + 위치 좌표
prebuilt-receipt — 영수증 전용 ($10/1K). 가게명·날짜·금액 자동 추출
prebuilt-contract — 계약서 전용 ($10/1K). 당사자·관할권·조항 추출
prebuilt-idDocument — 여권/운전면허 ($10/1K). 이름·생년월일·문서번호
커스텀 모델 — 내 양식을 Azure Portal에서 5장만 라벨링하면 훈련 가능