Prompt Engineering and Schema Design

Trillo DocAI provides the flexibility of designing prompts based on specific use cases. These prompts can be further improved to achieve better responses. These prompts are designed as part of schema files , which are then processed by the DocAI .

Here is a sample schema file to extract Patient/Doctor information, ICD and CPT Codes from a sample medical transcription:

{{
  "name" : "invoices",
  "displayName" : "invoices",
  "identityAttributes" : null,
  "fields" : [
    {
      "displayname" : "address",
      "name" : "address",
      "type" : "string"
    },
    {
      "displayname" : "apple",
      "name" : "apple",
      "type" : "string"
    },
    {
      "displayname" : "denny gunawan",
      "name" : "denny_gunawan",
      "type" : "string"
    },
    {
      "displayname" : "gst (10%)",
      "name" : "gst__10",
      "type" : "string"
    },
    {
      "displayname" : "invoice number",
      "name" : "invoice_number",
      "type" : "string"
    },
    {
      "displayname" : "quantity(kg)",
      "name" : "quantity_kg",
      "type" : "string"
    },
    {
      "displayname" : "subtotal",
      "name" : "subtotal",
      "type" : "string"
    },
    {
      "displayname" : "total",
      "name" : "total",
      "type" : "string"
    },
    {
      "displayname" : "watermelon",
      "name" : "watermelon",
      "type" : "string"
    }
  ]
}

Last updated