从账单中提取实体

从账单文档中提取实体并以 JSON 格式返回这些实体。

在对 Cloud 控制台使用不同参数值时,或通过直接调用 Vertex AI API,您可以直接查询模型,并测试返回的结果。

提示自由格式

invoice.pdf

您是文档实体提取专家。对于给定的文档,您的任务是提取以下实体的文本值:

{
    "amount_paid_since_last_invoice": "",
    "carrier": "",
    "currency": "",
    "currency_exchange_rate": "",
    "delivery_date": "",
    "due_date": "",
    "freight_amount": "",
    "invoice_date": "",
    "invoice_id": "",
    "line_items": [
        {
            "amount": "",
            "description": "",
            "product_code": "",
            "purchase_order": "",
            "quantity": "",
            "unit": "",
            "unit_price": ""
        }
    ],
    "net_amount": "",
    "payment_terms": "",
    "purchase_order": "",
    "receiver_address": "",
    "receiver_email": "",
    "receiver_name": "",
    "receiver_phone": "",
    "receiver_tax_id": "",
    "receiver_website": "",
    "remit_to_address": "",
    "remit_to_name": "",
    "ship_from_address": "",
    "ship_from_name": "",
    "ship_to_address": "",
    "ship_to_name": "",
    "supplier_address": "",
    "supplier_email": "",
    "supplier_iban": "",
    "supplier_name": "",
    "supplier_payment_ref": "",
    "supplier_phone": "",
    "supplier_registration": "",
    "supplier_tax_id": "",
    "supplier_website": "",
    "total_amount": "",
    "total_tax_amount": "",
    "vat": [
        {
            "amount": "",
            "category_code": "",
            "tax_amount": "",
            "tax_rate": "",
            "total_amount": ""
        }
    ]
}

  • 提取过程中必须遵循 JSON 架构。
  • 值必须仅包含文档中找到的文本
  • 请勿对任何实体值进行标准化。
  • 如果在文档中未找到实体,请将实体值设置为 null。

响应


{
    "amount_paid_since_last_invoice": "-$0.00",
    "carrier": null,
    "currency": "$",
    "currency_exchange_rate": null,
    "delivery_date": null,
    "due_date": null,
    "freight_amount": null,
    "invoice_date": "02/23/2021",
    "invoice_id": "3222",
    "line_items": [
        {
            "amount": "490.12",
            "description": "Drag Series Transmission Build - A WD DSM",
            "product_code": null,
            "purchase_order": null,
            "quantity": "1",
            "unit": null,
            "unit_price": "490.12"
        },
        {
            "amount": "220.15",
            "description": "Drive Shaft Automatic Right",
            "product_code": null,
            "purchase_order": null,
            "quantity": "7",
            "unit": null,
            "unit_price": "31.45"
        },
        {
            "amount": "549.10",
            "description": "Multigrade Synthetic Technology Bench",
            "product_code": null,
            "purchase_order": null,
            "quantity": "1",
            "unit": null,
            "unit_price": "549.10"
        },
        {
            "amount": "1,187.79",
            "description": "6689 Transit Stan",
            "product_code": null,
            "purchase_order": null,
            "quantity": "1",
            "unit": null,
            "unit_price": "1,187.79"
        },
        {
            "amount": "883.12",
            "description": "HMT Vertical Milling Machine",
            "product_code": null,
            "purchase_order": null,
            "quantity": "1",
            "unit": null,
            "unit_price": "883.12"
        },
        {
            "amount": "87.54",
            "description": "Optional:\nHMT Machine",
            "product_code": null,
            "purchase_order": null,
            "quantity": "1",
            "unit": null,
            "unit_price": "87.54"
        }
    ],
    "net_amount": "3,417.82",
    "payment_terms": null,
    "purchase_order": null,
    "receiver_address": "45 Lightning Road,Arizona, AZ 88776",
    "receiver_email": "proprietor@abcxyz.com",
    "receiver_name": "Martin Colby",
    "receiver_phone": "321-321-1234",
    "receiver_tax_id": null,
    "receiver_website": null,
    "remit_to_address": null,
    "remit_to_name": null,
    "ship_from_address": null,
    "ship_from_name": null,
    "ship_to_address": "45 Lightning Road,Arizona, AZ 88776",
    "ship_to_name": "Johnny Patel",
    "supplier_address": "9291 Proin Road\nLake Charles, ME-11292",
    "supplier_email": "sales@amnoshsuppliers.com",
    "supplier_iban": null,
    "supplier_name": "AMNOSH\nSUPPLIERS",
    "supplier_payment_ref": null,
    "supplier_phone": "123-456-7890",
    "supplier_registration": null,
    "supplier_tax_id": null,
    "supplier_website": "www.amnoshsuppliers.com",
    "total_amount": "3,759.60",
    "total_tax_amount": "341.78",
    "vat": [
        {
            "amount": "3,417.82",
            "category_code": null,
            "tax_amount": "341.78",
            "tax_rate": "10.0%",
            "total_amount": null
        }
    ]
}
型号: gemini-1.5-pro-preview-0409
温度: 1
输出令牌数量上限: 8192
TopK: 40
TopP: 0.95