sensible_instruct_basics
document type.id
as the key in the key/value JSON output. For more information, see Field.Type of method | explanation | description |
---|---|---|
layout | How it works: label method | Grab info immediately proximate to labeling text. |
layout | How it works: row method | Grab info from a cell in a row. |
layout | How it works: box method | Grab info from a box. |
Type of method | explanation | description |
---|---|---|
Natural-language | How it works: query method | Ask a free-text question about simple information in the document |
bodily injury premium
. You can group together other queries if the answers are located within a page or two of each other in the document. For example, in the group, the config also queries for the insurer's customer service phone number
.
"street address for the Anyco insurance company"
and see what you get. For easy authoring, try out this method in Sensible’s visual authoring tool.
LLM-based methods such as the Query Group method can run up against limitations with complex document formatting. In such cases, combine LLM-based methods with layout-based methods in the same document extraction configuration.
Let’s look next at several simple layout-based methods.
"policy period"
) is text that’s pretty close to the text to extract, so it can serve as a “label” for that text ("id": "label"
)."position": "right"
)."comprehensive"
) is part of a row of lines ("id": "row"
)."type": "currency"
). For other data types you can define, see Field query object."tiebreaker": "second"
). Use tiebreakers to select lines in rows, for example maximum and minimum values (<
and >
)."position":"left"
)."tiebreaker": "second"
select 150, since $250 is the second line after the anchor (the first line is ............
)?
The reason is that "tiebreaker": "second"
evaluates after the data type specified in the field, "type": "currency"
. Instead of looking for the second line after the anchor in general, Sensible looks for the second line that contains a currency. Convenient, right?
"tiebreaker": "second"
.
"id": "box"
).policy number
."type": "startsWith"
). You can write a simpler string anchor as "anchor":"policy number"
, or you can expand to complex anchors. For more information, see Anchor object.xRangeFilter
parameter in the Document Range method to capture the limits."match":"all"
anchor coupled with a Passthrough method, or the Regex method."policy period"
), you need to specify to:
policy_period
field with this example:
policy_period
field with the following field in the Sensible app:
env=development
to test the integration before you go to production:{"<":[{"var":"property_liability_premium.value"},{"var":"comprehensive_premium.value"}]}
{"match":[{"var":"policy_number.value"},"\\d{9}"]}
To add these tests:auto_insurance_anyco_3 | Download link |
---|