> ## Documentation Index
> Fetch the complete documentation index at: https://sensible.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# NLP

Configures the full prompt for all [Sensible Instruct](/llm-based-extractions/prompt-tips/index-prompt-tips) methods in a config. For information about configuring the full prompt, see [Advanced prompt configuration](/llm-based-extractions/prompt).

[**Parameters**](/senseml-reference/preprocessors/nlp#parameters)\
[**Examples**](/senseml-reference/preprocessors/nlp#examples)\
[**Notes**](/senseml-reference/preprocessors/nlp#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.

| key                    | value                                                                                                                | description                                                                                                                                                                                                                                                                                  |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type (**required**)    | nlp                                                                                                                  |                                                                                                                                                                                                                                                                                              |
| nlpTable               | object                                                                                                               | Parameters:<br />- rewriteTable<br />- pageSpanThreshold<br />- detectTableStructureOnly<br />-annotateSuperscriptAndSubscript<br />- (**Deprecated**) promptIntroductionFor information about these parameters, see [NLP Table](/senseml-reference/llm-based-methods/nlp-table#parameters). |
| list                   | object                                                                                                               | Parameters:<br />- llmEngine<br />- (**Deprecated**) promptIntroductionFor information about these parameters, see [List](/senseml-reference/llm-based-methods/list#parameters).                                                                                                             |
| (**Deprecated**) query | object                                                                                                               | For information about this deprecated parameter see [Query](/senseml-reference/field-query-object/index-field-query-object).                                                                                                                                                                 |
| contextDescription     | For information about this parameter, see [Advanced prompt configuration](/llm-based-extractions/prompt#parameters). |                                                                                                                                                                                                                                                                                              |
| pageHinting            | For information about this parameter, see [Advanced prompt configuration](/llm-based-extractions/prompt#parameters). |                                                                                                                                                                                                                                                                                              |
| chunkCount             | For information about this parameter, see [Advanced prompt configuration](/llm-based-extractions/prompt#parameters). |                                                                                                                                                                                                                                                                                              |
| chunkSize              | For information about this parameter, see [Advanced prompt configuration](/llm-based-extractions/prompt#parameters). |                                                                                                                                                                                                                                                                                              |
| chunkOverlapPercentage | For information about this parameter, see [Advanced prompt configuration](/llm-based-extractions/prompt#parameters). |                                                                                                                                                                                                                                                                                              |
| pageRange              | For information about this parameter, see [Advanced prompt configuration](/llm-based-extractions/prompt#parameters). |                                                                                                                                                                                                                                                                                              |

## Examples

### Example 1

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

**Config**

```JSON JSON 
{
  "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](https://mintlify.s3-us-west-1.amazonaws.com/sensible/assets/v0/images/screenshots/nlp.png)

| Example document | [Download link](https://raw.githubusercontent.com/sensible-hq/sensible-docs/main/readme-sync/assets/v0/pdfs/nlp.pdf) |
| ---------------- | -------------------------------------------------------------------------------------------------------------------- |

**Output**

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