reading-deduction-cert
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese控除証明書 画像読み取り
Deduction Certificate Image Reading
控除証明書(生命保険料控除証明書、地震保険料控除証明書、社会保険料控除証明書等)の画像を読み取り、構造化データとして返すスキル。
A skill that reads images of deduction certificates (life insurance premium deduction certificates, earthquake insurance premium deduction certificates, social insurance premium deduction certificates, etc.) and returns them as structured data.
画像読み取り方法
Image Reading Methods
推奨: デュアル検証(並列2コンテキスト)
Recommended: Dual Verification (Parallel 2 Contexts)
精度を高めるため、同じ画像を2つの独立したコンテキストで並列に読み取り、結果を照合する。
-
2つの独立した読み取りを実行する: サブエージェントが使える環境では、2つのサブエージェントを並列で起動し、それぞれ独立に画像を読み取る。 各サブエージェントには以下の「基本ルール」と「出力フォーマット」をプロンプトとして渡し、画像ファイルパスを指定する。
-
結果照合: 両方の読み取り結果から主要フィールド(金額等)を比較する。
-
一致の場合: そのまま採用。「2つの独立した読み取りで結果が一致しました」と報告する。
-
不一致の場合: ユーザーに元画像パスと両方の結果を提示し、正しい方を選択してもらう:
- 差異のあるフィールドを明示する
- A を採用 / B を採用 / 手動入力 の3択を提示する
To improve accuracy, read the same image in parallel using two independent contexts and collate the results.
-
Execute two independent readings: In environments where sub-agents are available, launch two sub-agents in parallel to read the image independently. Pass the following "Basic Rules" and "Output Format" as prompts to each sub-agent, and specify the image file path.
-
Result collation: Compare key fields (such as amounts) from both reading results.
-
If results match: Adopt the result directly. Report "Results matched in two independent readings."
-
If results do not match: Present the original image path and both results to the user, and ask them to select the correct one:
- Clearly indicate fields with discrepancies
- Provide three options: Adopt A / Adopt B / Manual input
フォールバック(サブエージェント非対応の場合)
Fallback (When Sub-Agents Are Not Supported)
サブエージェントが利用できない環境では、以下の手順で読み取る:
- 画像ファイルを直接 Read ツールで読み取る
- 以下の「基本ルール」と「出力フォーマット」に従ってデータを抽出する
- 抽出結果をユーザーに提示し、必ず目視確認を依頼する
⚠ デュアル検証が利用できないため、必ずユーザーに目視確認を依頼してください。
In environments where sub-agents are unavailable, follow these steps to read the image:
- Read the image file directly using the Read Tool
- Extract data according to the "Basic Rules" and "Output Format" below
- Present the extraction results to the user and must request visual confirmation
⚠ Since dual verification is not available, be sure to request visual confirmation from the user.
基本ルール
Basic Rules
- 画像ファイルは Read ツールで読み取る(Claude Vision が自動的に画像を認識する)
- 金額は必ず int(円単位の整数)で返す。カンマや「円」は除去する
- 日付は YYYY-MM-DD 形式で返す
- 和暦は西暦に変換する(令和7年 → 2025、令和6年 → 2024、平成31年 → 2019)
- 読み取れないフィールドは UNKNOWN(文字列)または 0(金額)とする
- Read image files using the Read Tool (Claude Vision automatically recognizes images)
- Always return amounts as integers (in yen, without commas or the "yen" character)
- Return dates in YYYY-MM-DD format
- Convert Japanese calendar years to Western calendar years (Reiwa 7 → 2025, Reiwa 6 → 2024, Heisei 31 → 2019)
- For unreadable fields, use UNKNOWN (string) or 0 (amount)
対象書類
Target Documents
- 生命保険料控除証明書
- 地震保険料控除証明書
- 社会保険料(国民年金保険料)控除証明書
- 小規模企業共済等掛金払込証明書(iDeCo含む)
- Life insurance premium deduction certificate
- Earthquake insurance premium deduction certificate
- Social insurance premium (national pension insurance premium) deduction certificate
- Small business mutual aid payment certificate (including iDeCo)
出力フォーマット
Output Format
JSON オブジェクトとして返す。金額は必ず int(円単位の整数)とする。
Return as a JSON object. Amounts must be integers (in yen).
生命保険料控除証明書
Life Insurance Premium Deduction Certificate
json
{
"certificate_type": "life_insurance",
"policy_type": "新制度 or 旧制度",
"category": "一般 or 介護医療 or 個人年金",
"company_name": "保険会社名",
"policy_number": "証券番号",
"annual_premium": 120000,
"dividend": 0
}json
{
"certificate_type": "life_insurance",
"policy_type": "new system or old system",
"category": "general or long-term care medical or individual pension",
"company_name": "insurance company name",
"policy_number": "policy number",
"annual_premium": 120000,
"dividend": 0
}地震保険料控除証明書
Earthquake Insurance Premium Deduction Certificate
json
{
"certificate_type": "earthquake_insurance",
"company_name": "保険会社名",
"policy_number": "証券番号",
"annual_premium": 50000,
"is_old_long_term": false
}json
{
"certificate_type": "earthquake_insurance",
"company_name": "insurance company name",
"policy_number": "policy number",
"annual_premium": 50000,
"is_old_long_term": false
}社会保険料控除証明書
Social Insurance Premium Deduction Certificate
json
{
"certificate_type": "social_insurance",
"insurance_type": "national_pension",
"annual_premium": 200000,
"period": "対象期間"
}json
{
"certificate_type": "social_insurance",
"insurance_type": "national_pension",
"annual_premium": 200000,
"period": "target period"
}小規模企業共済等掛金払込証明書
Small Business Mutual Aid Payment Certificate
json
{
"certificate_type": "small_business_mutual_aid",
"sub_type": "ideco or small_business or disability",
"annual_contribution": 276000
}json
{
"certificate_type": "small_business_mutual_aid",
"sub_type": "ideco or small_business or disability",
"annual_contribution": 276000
}抽出のポイント
Extraction Points
- 書類の種別(生命保険料/地震保険料/社会保険料/小規模企業共済等)を最初に判定する
- 生命保険料控除は新旧制度の区別と、3区分(一般/介護医療/個人年金)の分類を確認する
- 地震保険料控除は旧長期損害保険かどうかの区別を確認する
- 金額は「証明額」「申告額」が異なる場合、「申告額」を使用する
- 保険会社名・証券番号は確認用に抽出する
- First determine the document type (life insurance premium/earthquake insurance premium/social insurance premium/small business mutual aid, etc.)
- For life insurance premium deductions, confirm the distinction between new and old systems, and classify into three categories (general/long-term care medical/individual pension)
- For earthquake insurance premium deductions, confirm whether it is old long-term non-life insurance
- If "certified amount" and "declared amount" differ for amounts, use the "declared amount"
- Extract insurance company name and policy number for verification purposes