文档实体提取

从文档中提取一组实体,并以 JSON 格式返回这些实体。

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

提示自由格式

earnings_statement.pdf

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

{
 "earning_item": [
  {
   "earning_rate": "",
   "earning_hours": "",
   "earning_type": "",
   "earning_this_period": ""
  }
 ],
 "direct_deposit_item": [
  {
   "direct_deposit": "",
   "employee_account_number": ""
  }
 ],
 "current_deduction": "",
 "ytd_deduction": "",
 "employee_id": "",
 "employee_name": "",
 "employer_name": "",
 "employer_address": "",
 "federal_additional_tax": "",
 "federal_allowance": "",
 "federal_marital_status": "",
 "gross_earnings": "",
 "gross_earnings_ytd": "",
 "net_pay": "",
 "net_pay_ytd": "",
 "ssn": "",
 "pay_date": "",
 "pay_period_end": "",
 "pay_period_start": "",
 "state_additional_tax": "",
 "state_allowance": "",
 "state_marital_status": "",
 "tax_item": [
  {
   "tax_this_period": "",
   "tax_type": "",
   "tax_ytd": ""
  }
 ]
}

  • 提取过程中必须遵循 JSON 架构。
  • 值必须仅包含文档中找到的文本字符串。
  • 为缺失的实体生成 null。

响应


{
"earning_item": [
{
  "earning_rate": "20",
  "earning_hours": "80",
  "earning_type": "regular pay",
  "earning_this_period": "1,600.00"
}
],
"direct_deposit_item": [],
"current_deduction": "160.00",
"ytd_deduction": "1,920.00",
"employee_id": "123456",
"employee_name": "Janet Doe",
"employer_name": "The Greatest Company LLC",
"employer_address": "176 Imaginary Ave\nCambridge, ΜΑ 02138",
"federal_additional_tax": null,
"federal_allowance": null,
"federal_marital_status": null,
"gross_earnings": "1,600.00",
"gross_earnings_ytd": "19,200.00",
"net_pay": "1,060.80",
"net_pay_ytd": "12,729.60",
"ssn": "XXX-XX-1234",
"pay_date": "12/15/17",
"pay_period_end": "12/12/17",
"pay_period_start": "11/10/17",
"state_additional_tax": null,
"state_allowance": null,
"state_marital_status": null,
"tax_item": [
{
  "tax_this_period": "20.80",
  "tax_type": "FICA MED TAX",
  "tax_ytd": "249.60"
},
{
  "tax_this_period": "99.20",
  "tax_type": "FICA SS TAX",
  "tax_ytd": "1190.40"
},
{
  "tax_this_period": "179.20",
  "tax_type": "FED TAX",
  "tax_ytd": "2150.40"
},
{
  "tax_this_period": "80.00",
  "tax_type": "MA ST TAX",
  "tax_ytd": "960.00"
}
]
}
型号: gemini-1.5-pro-preview-0409
温度: 1
输出令牌数量上限: 8192
TopK: 40
TopP: 0.95