Skip to lesson

AWSAWS Certified Generative AI Developer - Professional2026-101.3 Implement data validation and processing pipelines for FM consumption

Choose extraction by the required evidence

Completed by the knowledge check

Learning objective

Choose Amazon Textract for document extraction, Amazon Transcribe for speech, Amazon Comprehend for text entities, or Bedrock multimodal models for image and document understanding.

Core idea

Choose the service from the output contract, not just the file extension. A PDF might require exact form fields, a natural-language explanation of a chart, or named entities from its extracted text. Those are different operations with different evidence requirements.

Amazon Textract extracts document text and structure. Amazon Transcribe converts speech into text. Amazon Comprehend detects entities in text. A compatible Amazon Bedrock multimodal model interprets supported image or document inputs in response to a prompt. A pipeline can combine these services when its result needs both extraction and interpretation.

The decisive question is what the next stage must receive: structured source observations, time-aligned words, typed text spans, or a generated interpretation. Validate that output before letting it influence an answer or downstream action.

How it works

Preserve document structure with Textract

Textract document analysis returns text, forms, tables, query responses, and signature information. Forms expose key-value relationships; tables expose cells and their relationships. Analyzing a document is therefore different from flattening all visible characters into one string.

Textract returns Block objects with detected content, relationships, page information, and location. Preserve these when an answer must trace a value back to its source. For example, a number in a table gains meaning from its row, column, and heading. Removing those relationships can turn accurate character extraction into an incorrect financial statement.

Queries let you ask for specific information in a document and receive a separate response structure. They are a document extraction feature, not a substitute for an unrestricted assistant reasoning across arbitrary evidence. Signature detection identifies a signature’s location and confidence; it does not establish the signer’s identity or the legal validity of the agreement.

Use synchronous AnalyzeDocument to receive analysis results directly, or asynchronous StartDocumentAnalysis followed by GetDocumentAnalysis to retrieve results. The FeatureTypes list selects analyses: TABLES for tables, FORMS for key-value relationships, QUERIES for query responses, and SIGNATURES for signature locations. Match the invocation pattern to the document workload. Treat extraction completion and acceptance of the extracted values as separate decisions: a completed operation can still produce material that needs review.

Preserve speech evidence with Transcribe

Transcribe distinguishes batch transcription of media in Amazon S3 from streaming transcription of media streams. Their supported input formats differ. AWS recommends lossless formats for best results and documents the accepted formats for each path. Validate the actual media representation rather than assuming that a familiar filename means the bytes satisfy the selected interface.

A sample rate supplied in a batch request must match the actual audio; a mismatch can cause failure. Streaming requests require a sample rate. These are input contract checks, not model-quality tuning. Changing a parameter without changing the underlying signal does not improve a poor recording.

Transcription output is JSON containing the transcript and additional item-level data. Words include start time, end time, and confidence. Keep those observations when a reviewer needs to locate an uncertain statement in the recording. Flattened transcript text is useful for later text processing, but it should remain linked to the time-aligned source representation.

Speech recognition confidence concerns the recognized words. It does not establish that the speaker’s claim is correct. A clearly recognized statement can still be false, out of date, or irrelevant to the request. Apply the input suitability policy from 1.3.1 after transcription.

Extract text entities with Comprehend

Comprehend predefined entity detection identifies types such as PERSON, ORGANIZATION, LOCATION, DATE, and QUANTITY. Its output includes the entity text, type, confidence score, and offsets in the input text. These typed spans support indexing, tagging, and further validation.

AWS documents DetectEntities, BatchDetectEntities, and asynchronous StartEntitiesDetectionJob as entity-detection operations. Choose the processing form that fits the workload. The documented predefined-entity operations use supported languages, and all documents must be in the same language. Verify language eligibility before sending a mixed-language collection through a single assumed contract.

Use confidence to identify results needing review, with boundaries calibrated for the task. Detection is not entity resolution: recognizing an organization name does not determine which customer record it denotes. Preserve the detected text and offsets, then apply your identity-matching contract separately.

Interpret supported inputs with Bedrock

The Bedrock Converse API provides a consistent message interface for models that support messages. Its content blocks support different input types, but the supported blocks depend on the selected model. A common API does not make every model multimodal. Model eligibility belongs to 1.2.1; check it before choosing a direct image or document path.

A compatible model can interpret an image or document according to your prompt. This fits tasks such as explaining the relationship between a chart and nearby narrative, or summarizing a document’s argument. Treat the generated explanation as an interpretation requiring evaluation, rather than as an exact extraction record.

Converse document inputs require an accompanying text content block. The document name field is vulnerable to prompt injection, so AWS recommends a neutral name. Use the text block to express the task and keep the name as metadata. A filename supplied by an external party should not become an instruction channel.

Preserve the source and the model request configuration when interpretation becomes a pipeline artifact. A later reviewer needs to distinguish what the document contains from what the model inferred. Schema checks can validate the shape of a generated result, but they cannot establish that its claims match the source.

Key distinctions and trade-offs

The output requirement determines the initial choice:

Required resultInitial service choiceEvidence to retain
Form fields, table structure, and document locationsTextractBlocks, relationships, pages, and locations
Words from recorded or streamed speechTranscribeTranscript items, time intervals, and confidence
Typed entities in textComprehendEntity text, type, offsets, and score
Prompt-directed interpretation of supported images or documentsBedrock multimodal modelSource identity, request configuration, and reviewed output

Extraction versus interpretation: Extraction aims to preserve observations from the source. Interpretation creates an explanation or synthesis. A generated summary can be useful without satisfying an exact-field extraction contract.

Single service versus composition: Direct multimodal understanding reduces intermediate stages when the task needs interpretation. A composed path offers explicit structured evidence when fields, spans, or timestamps matter. More stages require more validation and preservation of mappings between representations.

Architecture / decision scenario

An insurance team processes a claim form, a recorded claimant interview, and photographs. It needs form values that an operator can inspect, a time-linked interview transcript, and a draft explanation of visible damage.

Textract preserves the form’s fields and locations. Transcribe produces the transcript with word timing. Comprehend detects predefined entities in the extracted text where typed spans are useful. A compatible Bedrock model receives the photographs and the task prompt to draft an interpretation.

The application checks required fields and cross-source consistency before presenting the draft. It does not treat a confidently recognized name as resolved identity or a generated damage explanation as a validated claim decision. Each output remains attached to its own source evidence.

Common exam traps

  • Choosing a service solely because the input is a PDF.
  • Treating all Converse-compatible models as image- or document-capable.
  • Equating entity recognition with identity resolution.
  • Treating transcription confidence as confidence in the speaker’s truthfulness.
  • Flattening tables while expecting row and column meaning to survive.
  • Using an untrusted document name as an instruction-bearing prompt.

What to remember

  • Match the required output and evidence to the service.
  • Preserve Textract structure, Transcribe timing, and Comprehend offsets.
  • Use compatible Bedrock models for evaluated interpretation.
  • Validate both the input interface and the resulting artifact.
  • Compose services when the task needs multiple evidence types.

Knowledge check

References