Configures the full prompt for all Sensible Instruct methods in a config. For information about configuring the full prompt, see Advanced prompt configuration.

Parameters
Examples
Notes

Parameters

The following parameters are available both on the config level, through this preprocessor or through the Sensible Instruct editor, and for each individual field through the method's parameters. Setting a parameter at the method level overrides it at the config level.

keyvaluedescription
type (required)nlp
nlpTableobjectParameters:
- rewriteTable
- pageSpanThreshold
- detectTableStructureOnly
-annotateSuperscriptAndSubscript
- (Deprecated) promptIntroduction
For information about these parameters, see NLP Table.
listobjectParameters:
- llmEngine
- (Deprecated) promptIntroduction
For information about these parameters, see List.
(Deprecated) queryobjectFor information about this deprecated parameter see Query.
contextDescriptionFor information about this parameter, see Advanced prompt configuration.
pageHintingFor information about this parameter, see Advanced prompt configuration.
chunkCountFor information about this parameter, see Advanced prompt configuration.
chunkSizeFor information about this parameter, see Advanced prompt configuration.
chunkOverlapPercentageFor information about this parameter, see Advanced prompt configuration.
pageRangeFor information about this parameter, see Advanced prompt configuration.

Examples

Example 1

The following example shows using the NLP preprocessor to describe the context for each field in the config.

Config

{
  "preprocessors": [
    {
      "type": "nlp",
      "contextDescription": "The following context is an excerpt from an ID card for a presidential pet.",
      /* since the ID cards are always a single page, you can omit page information
         for more information, see the Advanced prompt configuration topic */
      "pageHinting": false,
    }
  ],
  "fields": [
    {
      "method": {
        "id": "queryGroup",
        "queries": [
          {
            "id": "pet_name",
            "description": "pet's name",
          },
          {
            "id": "pet_owner",
            "description": "full name of the usa president who owned this pet",
          }
        ]
      }
    },
  ]
}

Example document
The following image shows the example document used with this example config:

Click to enlarge

Example documentDownload link

Output

{
  "pet_name": {
    "value": "Fala",
    "type": "string"
  },
  "pet_owner": {
    "value": "Franklin D Roosevelt",
    "type": "string"
  }
}