> For the complete documentation index, see [llms.txt](https://trillo.gitbook.io/trillo-doc-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trillo.gitbook.io/trillo-doc-ai/prompt-engineering-and-schema-design.md).

# 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:

```json
{{
  "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"
    }
  ]
}
```

<br>
