Examples
Notes
Parameters
Note: For the full list of parameters available for this method, see Global parameters for methods. The following table only shows parameters most relevant to or specific to this method. Note You can configure some of the following parameters in both the NLP preprocessor and in a field’s method. If you configure both, the field’s parameter overrides the NLP preprocessor’s parameter. For more information, see Advanced prompt configuration.Parameters
Query group parameters
Examples
Example: Extract from images
Config The following example shows extracting structured data from real estate photographs embedded in an offering memorandum document using the Multimodal Engine parameter. It also shows extracting data from text.JSON
The following image shows the example document used with this example config:
Output
JSON
Example: Extract handwriting
The following example shows using a multimodal LLM to extract from a scanned document containing handwriting. For an alternate approach to extracting from this document, see also the Sort Lines example. ConfigJSON
The following image shows the example document used with this example config:
Output
JSON
Example: Extract from lease
The following example shows using the Query Group method to extract information from a lease. ConfigJSON
The following image shows the example document used with this example config:
Output
JSON
Notes
For an overview of how this method works, see the following steps:- To meet the LLM’s token limit for input, Sensible splits the document into equal-sized, overlapping chunks.
- Sensible scores each chunk by its similarity to either the concatenated Description parameters for the queries in the group, or by the
chunkScoringTextparameter. Sensible scores each chunk using the OpenAPI Embeddings API. - Sensible selects a number of the top-scoring chunks and combines them into “context”. The chunks can be non-consecutive in the document. Sensible deduplicates overlapping text in consecutive chunks. If you set chunk-related parameters that cause the context to exceed the LLM’s token limit, Sensible automatically reduces the chunk count until the context meets the token limit.
- Sensible creates a full prompt for the LLM (GPT-3.5 Turbo) that includes the chunks, page hinting data, and your Description parameters. For more information about the full prompt, see Advanced prompt configuration.
How location highlighting works
In the Sensible Instruct editor, you can click the search icon to the right of the output of a query field to view its source text in the document.
For an overview of how Sensible finds the source text in the document for the LLM’s response, see the following steps:
- The LLM returns a response to your prompt.
- Sensible searches in the source document for a line that’s a fuzzy match to the response. For example, if the LLM returns
4387-09-22-33, Sensible matches the linePolicy Number: 4387-09-22-33in the document. Sensible implements fuzzy matching using Levenshtien distance. - Sensible selects the three lines in the document that contain the best fuzzy matches. For each line, Sensible concatenates the preceding and succeeding lines, in case the match spans multiple lines.
- Sensible searches for a fuzzy match in the concatenated lines for the text that the LLM returned. Sensible returns the best match.
- Sensible highlights the best match in the document in the Sensible Instruct editor or in the SenseML editor.
- If you prompt the LLM to reformat the source text in the document or reformat the text using a type , then Sensible can fail to find a match or can find an inaccurate match.
- If there are multiple candidates fuzzy matches in the document (for example, two instances of
April 7), Sensible chooses the top-scoring match. If candidates have similar scores, Sensible uses page location as a tie breaker and chooses the earliest match in the document. - If the LLM returns text that’s not in the document, then location highlighting is inapplicable.

