Multimodal Generative AI

Multimodal Generative AI

ExampleCo’s newest policy is a scanned PDF. The “text” extractor returns nothing because each page is an image. An employee then asks a question by voice, and the transcription mistakes “not eligible” for “eligible.”

Multimodal systems work with more than one type of information, such as text, images, and audio. The important design question is where meaning can be lost as information moves between those forms.

Understanding vs Generating a Modality

CapabilityInputOutputExample
Image understandingImage and questionText or structured resultRead a scanned policy table
Image generationText and optional imagesImageCreate an illustration
Speech recognitionAudioTranscriptConvert a spoken question to text
Speech generationText or other inputAudioRead an answer aloud
Audio understandingAudio and taskInterpretation or responseIdentify relevant spoken content

A model that accepts images does not necessarily generate them. A speech model is not automatically suitable for a document table. Check actual supported inputs, outputs, limits, and quality.

Two Ways to Read the Scanned Policy

Option A: Extract Text First

Optical character recognition (OCR) converts text visible in an image into machine-readable text.

Scanned page -> OCR and layout extraction -> Text passages
             -> Existing retrieval and answer pipeline

Advantages:

  • Text is searchable and inspectable.
  • The normal RAG pipeline can be reused.
  • Repeated questions need not reprocess the same image.

Risks:

  • 20 may be read as 28.
  • A table header may attach to the wrong row.
  • A footnote or negation may disappear.
  • A diagram may not be represented well in plain text.

Option B: Send the Image to a Capable Model

Authorized page image + question -> Multimodal model -> Candidate answer

This can preserve visual relationships that plain OCR loses, but:

  • The model can still misread a number or table.
  • High-resolution pages can increase processing cost.
  • Searching a large image collection still requires an indexing strategy.
  • Citations need a page, region, or other stable location.

Direct visual input is not a guarantee of superior correctness.

A Hybrid Pipeline

flowchart TD
    D["Approved scanned policy"] --> A["Authorize and validate file"]
    A --> E["Extract text and layout"]
    E --> Q{"Extraction adequate for indexing?"}
    Q -->|"Yes"| I["Index versioned text with page references"]
    Q -->|"No"| V["Visual processing or human review"]
    V --> I
    U["Spoken employee question"] --> T["Transcribe and preserve uncertainty"]
    T --> R["Retrieve permitted current evidence"]
    I --> R
    R --> G["Generate and validate answer"]
    G --> O["Text answer or approved speech output"]

An “adequate extraction” gate needs defined checks: expected page count, nonempty content, table integrity checks where feasible, and review of critical numbers. A generic model confidence score is not enough.

Preserve Structure and Provenance

For a scanned table:

Region | Employment type | Annual days
A      | Full-time       | 20
B      | Full-time       | 30

The useful extracted record is not just A 20 B 30.

Keep:

  • Source document ID and version.
  • Page number and, when available, bounding region.
  • Column headers and row associations.
  • Extraction method/version.
  • Review state or known uncertainty.

When a policy value is high-impact, consider a reviewed structured record instead of repeatedly asking a model to interpret the image.

Audio Adds a Different Error Surface

A spoken question can be affected by accents, background noise, overlapping speakers, and similar-sounding terms.

For example:

Spoken:      "Am I not eligible for carryover?"
Transcribed: "Am I eligible for carryover?"

Retrieval may work perfectly on the wrong question. When a critical ambiguity remains, ask the user to confirm the transcript or relevant detail.

Do not treat a voice recording or speaker resemblance as sufficient application authentication or approval for a consequential action.

A Small Processing Skeleton

PSEUDOCODE
identity = authenticate(request)
file = validate_supported_type_size_and_content(request.file)
require_upload_permission(identity, file.destination)

derived = extract_text_and_layout(file)
if derived.empty or derived.required_structure_invalid:
    mark_processing_needs_review()
    return explicit_processing_status()

store_versioned_derived_content(
    text=derived.text,
    source_locations=derived.locations,
    method_version=derived.method_version,
    permissions=inherited_source_permissions
)

if request.includes_audio_question:
    transcript = transcribe_with_approved_processor(request.audio)
    if critical_meaning_uncertain(transcript):
        return ask_for_transcript_confirmation()

continue_with_authorized_rag()

The uncertainty check is a product rule informed by evaluated signals and user context, not a universal speech-confidence threshold.

Cost and Latency Need Modality-Specific Units

Text token estimates do not transfer blindly to images or audio.

Input/outputPossible usage driver
ImageResolution, number of crops/tiles, provider image accounting
Audio inputDuration, format, transcription or model-specific units
Audio outputGenerated duration or model-specific units
VideoFrame sampling, duration, audio, and temporal processing
Extracted textText tokens plus extraction work

Provider accounting differs. Estimate using the actual processing path and verify with measured usage.

Compare:

  • One-time OCR plus repeated text retrieval.
  • Repeated direct image-model calls.
  • A hybrid that sends only selected pages to visual processing.

For frequently queried static policies, preprocessing can amortize cost. For a one-off chart question, direct image input may be simpler.

Privacy and Injection Follow the Content

  • A scanned page can contain personal data.
  • An audio recording can contain unrelated speakers.
  • A transcript or image caption is another derived copy.
  • Instructions inside media remain untrusted content.
  • A hosted OCR or speech service is a data processor too.

Apply source permissions, provider review, encryption, retention, deletion, and safe logging across originals and derivatives. See GenAI safety.

Evaluate by Modality and Failure Type

SliceWhat to test
ScansLow contrast, rotation, small type
TablesHeaders, row alignment, merged cells
NumbersSimilar characters and decimal separators
AudioNoise, accents, negation, unusual policy names
Mixed inputWhether the model attributes each claim to the right source
Generated speechWhether spoken values match the validated text

Do not let good clean-image performance hide poor scanned-table performance. Separate extraction/transcription errors from retrieval and generation errors.

Related Concepts

Trade-offs

ApproachBenefitLimitation
OCR then text RAGInspectable, reusable indexLoses some visual meaning
Direct image inputPreserves visual relationshipsCost and model interpretation errors
Speech-to-text firstReuses text workflowTranscription can change intent
Direct audio modelIntegrated interactionHarder stage isolation and provider-specific behavior
Human-reviewed extractionStronger critical-data confidenceReview effort and delay

Test Your Understanding

Try answering before expanding. Explain the missing assumption, not just the vocabulary.

  1. The PDF has no selectable text. Does that mean it contains no policy content?
No. It may consist of scanned images. Use an appropriate extraction or visual-processing path and expose processing failures rather than indexing empty text.
  1. Does a model that understands images necessarily generate images?
No. Input understanding and output generation are separate capabilities. Check the actual model interface.
  1. Why can a correct number be useless without a table header?
The header establishes what the number applies to. Losing row or column associations can assign Region B’s entitlement to Region A.
  1. Is direct visual input always more accurate than OCR?
No. Both can misread content. Compare them on the actual documents, especially numbers, tables, footnotes, and low-quality scans.
  1. A transcript drops the word not. Which stage failed?
Speech recognition changed the question’s meaning. Retrieval and generation can behave correctly relative to the wrong transcript, so evaluate stages separately.
  1. Can audio duration be estimated using a text words-to-token ratio?
Not reliably. Audio processing has modality-specific units and limits. Use the actual provider’s accounting and measured duration or usage.
  1. Why preserve page and bounding-region references?
They support precise citations, human verification, and extraction debugging. A plain text snippet alone can lose its visual source context.
  1. Is a spoken yes sufficient approval for a leave submission?
Not by itself. The application must authenticate the caller and bind approval to the exact action through its trusted confirmation process.
  1. Does a trusted OCR service remove the need for document authorization?
No. The service is another processor receiving source content. Only authorized, appropriate material should be sent under approved data-handling settings.
  1. Why can one-time OCR be cheaper for a frequently queried handbook?
The extraction cost is amortized across many text-based queries. Reprocessing the same images for every question may be unnecessary.
  1. An image contains instructions unrelated to the user’s question. Are they harmless because they are pixels?
No. A model or OCR system can turn them into model-visible content. Treat them as untrusted reference data and retain external enforcement.
  1. The extracted text looks fluent. Does that prove every policy value is correct?
No. A single misread digit or missing negation can remain fluent. Validate critical values and source structure explicitly.
  1. Why might a reviewed structured policy record beat repeated image interpretation?
It makes critical values explicit, versioned, and testable. Generation can then explain verified fields rather than repeatedly reconstructing them from a difficult scan.
  1. Is a transcript less sensitive than its audio automatically?
No. It can contain the same personal or confidential content and may be easier to search and copy. Apply appropriate access and retention controls.
  1. How can generated speech introduce a new error after text validation?
Pronunciation or synthesis can alter how a number, acronym, or date is understood. Test that spoken output preserves the validated answer’s meaning.
  1. Can clean screenshot accuracy represent all scanned-policy quality?
No. Evaluate low contrast, rotation, small fonts, tables, and real document layouts separately. Average scores can hide poor slices.
  1. What should happen when extraction is empty or structurally invalid?
Mark the version failed or needing review and show an explicit status. Do not activate it as a complete searchable document.
  1. Does deleting the uploaded recording delete its transcript and summaries?
Not automatically. Track derivatives and apply the deletion/retention policy to them, including caches and approved logs.
  1. Why can sending only selected pages be a useful hybrid?
It preserves visual processing where needed while reducing repeated image work, cost, and unnecessary data exposure. Selection still needs evaluation and authorization.
  1. What is the core multimodal lesson for the policy assistant?
Every conversion can change meaning. Preserve provenance, evaluate the conversion stage, and avoid treating the final fluent answer as proof that the original image or audio was understood correctly.