Implement information extraction solutions 5.2 Extract content from documents
You use the Document Intelligence prebuilt-invoice model (v4.0).
Study guide skill: Extract information by using multimodal pipelines that combine OCR, layout analysis, and field extraction
Question B7-025
You use the Document Intelligence prebuilt-invoice model (v4.0). Finance now also needs ProjectCode and CostCenter from each invoice, starting this week, and there's no labeled training data. What should you do?
Select one answer.
Answer: C
Query field extraction adds fields to a prebuilt or custom model through the request, without extra training, and works best with camel case or Pascal case names. You turn on an add-on by putting its name in the features query string, and query fields are a premium add-on. ocrHighResolution is for small text in large documents such as engineering drawings, not for extra fields.
Deep dive
How it works
Document Intelligence add-on capabilities add extra features to a model's results. They're optional, and some cost extra. To turn one on, you add its name to the features query string, and you can turn on several with a comma-separated list. Add-ons work with every model except the Business card model.
Query fields is the add-on for this scenario. It extends the schema of any prebuilt model, or defines a key name when that name varies. Set features to queryFields and list the field names, comma-separated, in the queryFields property. You don't need to train anything: the fields are added in the query request. The docs say to use query fields when you need to extend a prebuilt or custom model's schema, or extract a few fields along with the layout output.
A few details matter in practice. Multi-word field names work best in camel case or Pascal case, such as ProjectCode and CostCenter. A request can have at most 20 query fields. If the document contains a value for a field, the field and its value are returned. Query fields are a premium add-on and are priced differently from the other add-ons.
The other options, and when you'd use them
- Train a custom neural model on labeled invoices: Custom neural models are deep-learned models that extract labeled fields from structured and semi-structured documents, such as invoices and purchase orders. To build one, you label a dataset and train on it, and you need five examples of the same document type to get started. It's the choice when you have labeled samples and need a model for your own document types. With no labeled data and fields needed this week, it doesn't fit.
- The ocrHighResolution add-on: High resolution extraction is for recognizing small text in large documents, such as engineering drawings, and it improves extraction from A1, A2 and A3 documents. It doesn't add new fields to the schema.
- "Add-ons are on by default": They aren't. You enable each add-on by naming it in the
featuresquery string.
Exam tip
"Add a few fields to a prebuilt model now, with no training data" means features=queryFields plus queryFields=.... "Labeled samples of your own document type" means a custom model.
References
Last reviewed: