Implement information extraction solutions 5.2 Extract content from documents

Each uploaded PDF is a loan package that contains a loan application form, several pay…

Study guide skill: Extract information by using multimodal pipelines that combine OCR, layout analysis, and field extraction

Question B2-028

Each uploaded PDF is a loan package that contains a loan application form, several pay slips, and bank statements, sometimes with unrelated pages. With Content Understanding you must split each file by document type, extract fields from each part with the right analyzer, and avoid forcing unrelated pages into a category. How should you configure the analyzer?

Select one answer.

  • A Define contentCategories with an analyzerId for each document type and set enableSegment to false
  • B Define contentCategories with descriptions and an analyzerId for each document type, include an other category, and set enableSegment to true ✓ Correct answer
  • C Use a video analyzer with segmentation, because only video supports splitting
  • D Train a custom classification model on a labeled dataset before defining any categories

Answer: B

Content Understanding classification splits a file into segments when enableSegment is true, classifies each segment by the category descriptions, and routes it to the analyzer set in that category's analyzerId. Without an other category, all content is forced into one of the listed categories. With enableSegment false, the whole file gets a single category, and classification needs no training dataset.

Deep dive

How it works

A loan package is several documents in one PDF, which is exactly what Content Understanding classification with segmentation handles. Three settings on the analyzer do the work:

  1. contentCategories: one entry per document type (loan application, pay slip, bank statement), each with a description that tells the classifier what that type looks like, and an analyzerId that routes matching segments to a prebuilt or custom extraction analyzer.
  2. An "other" category: without it, all content is classified into one of your defined categories. Including other lets unrelated pages stay unmatched instead of being forced into "pay slip".
  3. enableSegment set to true: the file is treated as multiple documents combined together, and the service returns categories for the segments within it. The response includes page ranges for each identified document.

No training is involved. Classification doesn't require a training dataset, and you can define up to 200 category names and descriptions in the analyze operation. Note that the minimum classification unit for documents is a single page by default.

The other options, and when you'd use them

  • Categories with analyzerId but enableSegment false: With enableSegment false, the entire input file is treated as a single document, so the whole package gets one category. That's for single-document files.
  • A video analyzer with segmentation: Segmentation isn't video-only. Content Understanding classification lets you process complex documents and videos, and document classification and video segmentation share one design.
  • Train a custom classification model first: Content Understanding classification doesn't require a training dataset. Category names and descriptions are the configuration.

Exam tip

Mixed documents in one file = contentCategories (description + analyzerId) + an "other" category + enableSegment true.

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Information extraction questions · AI-103 study guide

Thanks for your feedback!