73 / MULTIMODAL AI / CONTEXT MANAGER + TOOL / ACTION ENGINE
73 / SPECIALIZED / TEXT · IMAGE · AUDIO · VIDEO · DOCUMENT · CROSS-MODAL REASONING

MULTIMODAL
AI.

Multimodal AI — способность системы принимать, связывать и интерпретировать информацию из нескольких модальностей: текста, изображений, документов, аудио, видео, интерфейсных кадров, таблиц и других media representations — и использовать их в одном reasoning/action loop.

Главный принцип: не всё нужно превращать в текст. OCR/transcript — полезная проекция, но она может потерять layout, spatial relations, цвета, форму, невербальные события, диаграммы и temporal context. Multimodal architecture должна выбирать когда достаточно extraction, а когда нужен native model-level perception/reasoning над исходной модальностью.
00. ARCHITECTURAL STATUS

НЕ ОТДЕЛЬНЫЙ «MULTIMODAL AGENT», А CAPABILITY В CONTEXT + TOOL LAYERS

Manifest задаёт №73 как SPECIALIZED / CONDITIONAL и отдельный компонент не требует. Это правильно: multimodality обычно расширяет существующие Context Manager и Tool / Action Engine — добавляет asset references, modality-aware context selection, media preprocessing, compatible model routing and grounding.
TYPESPECIALIZEDCross-modal perception/reasoning capability.
DEFAULTCONDITIONALEnable only when task contains material non-text evidence.
ENABLE WHENTEXT LOSES IMPORTANT SIGNALImages, layout, audio, video, UI state.
SEPARATE COMPONENTNOCapability inside existing modules.
LIVES INCONTEXT MANAGER + TOOL / ACTION ENGINER04 + R07.
COMPLEXITYMEDIUM → HIGHNative images first; video/realtime later.
IMPLEMENT: CAPABILITY, NOT NEW AGENT
Минимум 80% ценности: stable media refs, trusted MIME/type metadata, modality-capability registry, native image/document input when useful, cheap extraction fallback, image resize/tiling rules, video frame/timecode sampling, audio transcript + selected native segments, multimodal context budgeting, provenance selectors, privacy/metadata stripping, prompt-injection treatment for media and modality-specific evals.
01A. ARCHITECTURE BOUNDARIES & OPERATIONS

EXPLICIT SYSTEM CONTRACT

A. BOUNDARY WITH NEIGHBORS

№56 Document Parsing / OCR / Multimodal Extraction owns deterministic/structured conversion of raw files into Document IR, text, tables, bounding boxes and extracted media observations. №73 owns model-level understanding that depends on native modality or cross-modal relations. №09 Context Engineering owns general context construction; №73 adds modality-aware budgeting/selection. №65 Model Gateway owns selecting a model endpoint with needed vision/audio/video capabilities. №70 Serving owns execution mechanics and modality-related compute capacity. №74 Computer Use owns observe→act loops over UI; it may consume screenshots through №73. №75 Voice / Realtime owns live session/streaming semantics, not generic audio understanding.

B. PREREQUISITES / CROSS-REFERENCES

Prerequisites: №09 Context Engineering, №12 Tools, №25 Evidence-First, №45 Verification, №50 Contracts, №52 Agent Security, №56 Parsing/OCR, №60 Artifact Store, №61 Provenance, №65 Model Gateway, №70 Serving. Forward references: №74 Computer Use, №75 Voice/Realtime, №76 Data Governance, №77 Production Architecture.

C. PLANE PLACEMENT

REQUEST-TIME: media selection, preprocessing, modality route, native model call, grounding and result normalization. CONTROL PLANE: supported modalities, image/frame/audio limits, model capability map, privacy rules, extraction-vs-native strategy. DATA PLANE: media refs, crops/frames/time segments, transcripts, spatial selectors, model observations. OFFLINE: media indexing, thumbnails, transcripts, frame/keyframe extraction, eval sets and cost/quality benchmarks.

D. FAILURE & OPERATIONS CONTRACT

Success: selected model receives only authorized, supported media within budget and output remains grounded to exact asset/region/time range. Retryable: media decode/transcode/provider/runtime transient failure. Permanent: unsupported/corrupt media, exceeded hard size/duration, forbidden data class. Persist: asset version/hash, media transform, selector, model/capability revision, output refs. Security: media is untrusted content; text rendered inside image/document/audio does not gain instruction authority.

E. WHAT THIS TOPIC DOES NOT OWN

№73 не владеет OCR/parser pipelines, image generation/editing, computer-use action policy, live voice session orchestration, general RAG or model serving. Она владеет MODALITY-AWARE CONTEXT AND MODEL-LEVEL CROSS-MODAL PERCEPTION/REASONING.

01. MODALITY MAP

РАЗНЫЕ MODALITIES НЕСУТ РАЗНЫЕ ТИПЫ SIGNAL

TEXT

Symbols / language

Meaning, instructions, exact strings, code, structured claims.

IMAGE

Spatial visual state

Objects, layout, charts, screenshots, colors, geometry, handwriting.

AUDIO

Acoustic sequence

Speech, prosody, pauses, sound events, speaker turns.

VIDEO

Visual + temporal

Actions, state changes, motion, sequence, scene transitions.

DOCUMENT

Text + layout + visuals

Pages, tables, forms, diagrams, annotations and reading order.

UI / SCREEN

Actionable visual state

Controls, labels, focus, dialogs and coordinates used by №74.

TABULAR

Relational layout

Rows/columns/cells; often best kept structured rather than rasterized.

SENSOR / OTHER

Structured signals

Prefer typed numeric/time-series tools unless native modality model adds value.

Multimodal does not mean «send every artifact to one giant model». Use the representation with the highest signal-to-cost ratio for the task.
02. NATIVE VS EXTRACTED

СНАЧАЛА СПРОСИТЬ: ЧТО ИМЕННО МОЖЕТ ПОТЕРЯТЬСЯ ПРИ TEXT-ONLY PROJECTION?

TASK
TEXT/OCR
NATIVE IMAGE
BOTH
WHY
DEFAULT
Read exact paragraph
strong
possible
best if layout matters
exact text
OCR/native text
Understand chart
partial
strong
strongest
axes + geometry + labels
native + extracted labels
Invoice fields
strong
fallback
verify
structured fields
№56 first
Describe photo damage
weak
required
metadata helps
visual evidence
native image
UI action
accessibility text
visual state
best
layout + controls
№74 chooses
03. CANONICAL MEDIA REF

MODEL INPUT ДОЛЖЕН ССЫЛАТЬСЯ НА IMMUTABLE ASSET, А НЕ НА СЛУЧАЙНЫЙ URL

{
  "asset_ref": "artifact://tenantA/media/IMG-42/v3",
  "media_type": "image/png",
  "sha256": "...",
  "bytes": 4182301,
  "width": 3024,
  "height": 4032,
  "duration_ms": null,
  "source_ref": "source://...",
  "classification": "INTERNAL",
  "created_at": "...",
  "metadata": {
    "orientation": 1
  }
}
ASSET IDENTITY

Stable and versioned

  • content hash;
  • MIME verified from bytes;
  • dimension/duration limits;
  • tenant/data classification;
  • source/provenance;
  • derived crops/frames point to parent;
  • signed delivery URLs remain temporary transport, not identity.
04. MEDIA NORMALIZATION

ORIENTATION, COLOR, PAGE/FRAME ORDER И CODEC НУЖНО НОРМАЛИЗОВАТЬ ДО MODEL CALL

RAW ASSETUpload / connector / artifact.
VERIFYMIME, checksum, limits.
NORMALIZEOrientation / codec / page order.
DERIVEResize / crop / frame / audio segment.
REGISTERDerived artifact + provenance.
SELECTOnly task-relevant media.
MODEL INPUTTyped multimodal parts.
Preprocessing must be reproducible: exact resize/crop/frame sampling settings become part of provenance.
05. IMAGE RESOLUTION

БОЛЬШЕ PIXELS ≠ ВСЕГДА БОЛЬШЕ ПОЛЕЗНОГО SIGNAL

GLOBAL VIEW

Whole scene

Downscaled overview preserves composition and object relationships.

DETAIL CROP

Small text/object

Crop high-resolution region when task depends on fine visual details.

TILING

Large pages/images

Split into overlapping tiles when model limits would destroy detail.

BUDGET

Cost / latency

Each additional image/tile consumes model-specific visual tokens/features.

Useful pattern: overview first → identify relevant region → high-resolution crop only if uncertainty/task demands it.
06. SPATIAL GROUNDING

«НА КАРТИНКЕ ЕСТЬ ДЕФЕКТ» НЕДОСТАТОЧНО — НУЖНО ЗНАТЬ ГДЕ

BBOX

Bounding box

Normalized or pixel coordinates for an object/region.

POLYGON / MASK

Precise region

Use when shape/segmentation matters and tool/model supports it.

LABEL + REF

Human-readable anchor

“Top-right chart legend” plus exact asset/region selector.

{
  "asset_ref": "artifact://.../image-v3",
  "selector": {
    "type": "bbox",
    "x": 0.61,
    "y": 0.08,
    "w": 0.24,
    "h": 0.19,
    "coordinate_space": "normalized"
  },
  "observation": "..."
}
Grounding makes multimodal observations verifiable and lets downstream systems crop/reinspect the exact evidence.
07. DOCUMENTS ARE MULTIMODAL

PDF — ЭТО НЕ ПРОСТО ТЕКСТ С PAGE BREAKS

TEXT LAYER

Exact language

Prefer native text extraction when present.

LAYOUT

Reading structure

Columns, forms, captions, headers and proximity convey meaning.

TABLES

2D relations

Rows and columns are better represented structurally where possible.

FIGURES

Visual evidence

Charts, diagrams, maps and screenshots may require native vision reasoning.

№56 should create Document IR. №73 is invoked selectively on pages/regions whose meaning cannot be recovered reliably from extraction alone.
08. CHARTS & DIAGRAMS

OCR ЧИТАЕТ LABELS, НО НЕ ОБЯЗАТЕЛЬНО ПОНИМАЕТ GEOMETRIC RELATION

EXTRACT LABELS

Text layer

Axis names, legend, data labels and captions become explicit context.

NATIVE VISUAL

Geometry

Line slope, bar height, node connections, spatial grouping and arrows remain visible.

VERIFY NUMBERS

Exactness

When precise numeric claims matter, prefer structured source data/table or deterministic chart extraction over visual estimation.

Multimodal model can explain a graph; it should not invent exact 12.37% from bar geometry when structured underlying data exists.
09. SCREENSHOTS

SCREENSHOT — SNAPSHOT OF UI STATE, NOT THE APPLICATION ITSELF

SEE

Visual controls/state

Buttons, dialogs, selected tabs, error banners and layout.

COMBINE

DOM/accessibility if available

Structured UI metadata can improve exact element identification.

ACT?

№74 owns action loop

Multimodal perception may identify target; computer-use policy decides and executes click/type/navigation.

10. AUDIO

TRANSCRIPT — ОСНОВА, НО НЕ ВСЁ, ЧТО ЕСТЬ В AUDIO

ASR

Speech transcript

Most semantic tasks should start with timestamped transcription.

SPEAKER TURNS

Who speaks when

Diarization or speaker labels preserve conversation structure.

PROSODY

Non-lexical cues

Pauses/emphasis/tone can matter in limited tasks but are easy to overinterpret.

SOUND EVENTS

Non-speech

Alarm, applause, engine, impact, music etc. may require native audio classifier/model.

Avoid psychological/personality inference from voice without a validated use case. Prefer observable acoustic facts.
11. TIMESTAMPED AUDIO CONTRACT

КАЖДЫЙ CLAIM МОЖНО ПРИВЯЗАТЬ К TIME RANGE

{
  "asset_ref": "artifact://meeting/audio-v1",
  "segments": [
    {
      "start_ms": 84210,
      "end_ms": 91760,
      "speaker": "S2",
      "transcript": "...",
      "confidence": 0.94
    }
  ],
  "native_audio_needed": false
}
If question is “что сказал участник?”, transcript + timecode is usually enough. Native audio is added only if acoustic properties materially affect the answer.
12. VIDEO

VIDEO = СЛИШКОМ МНОГО FRAMES, ЧТОБЫ ПО УМОЛЧАНИЮ ОТПРАВЛЯТЬ ВСЁ В MODEL

VIDEO ASSETDuration / fps / audio.
TRANSCRIPTTimestamped speech.
+
SCENE / KEYFRAMESChange detection / sampling.
QUERY PLANWhich time ranges matter?
SELECT CLIPS/FRAMESBounded native evidence.
MULTIMODAL MODELTemporal + visual reasoning.
For a 2-hour video, coarse transcript/keyframes are retrieval index; native clip inspection is the expensive second stage.
13. FRAME SAMPLING

1 FPS, EVERY N SECONDS И KEYFRAMES — ЭТО РАЗНЫЕ APPROXIMATIONS

StrategyGood forFailure
UNIFORM SAMPLECoarse scene overview.Can miss short events between samples.
SCENE CHANGEEdited presentations/videos.Slow action in one scene may be underrepresented.
TRANSCRIPT-ALIGNEDMeetings/lectures.Non-speech visual events can be missed.
QUERY-ADAPTIVEQuestion-specific review.Needs first-stage index/retrieval.
DENSE CLIPMotion/action details.High compute/token cost.
Sampling policy should depend on event duration you cannot afford to miss.
14. TEMPORAL GROUNDING

VIDEO/AUDIO OBSERVATION НУЖНО ПРИВЯЗЫВАТЬ К ВРЕМЕНИ

POINT

frame_at

Single frame/event at timestamp.

RANGE

start_ms / end_ms

Action or speech segment over an interval.

SEQUENCE

A before B

Order-sensitive observations should retain time ordering, not just a bag of frames.

Temporal order is part of evidence. Frame 40 and frame 80 without timestamps can reverse cause/effect interpretation.
15. MULTIMODAL CONTEXT BUILDER

CONTEXT MANAGER ДОЛЖЕН ВЫБИРАТЬ НЕ ТОЛЬКО TEXT CHUNKS, НО И MEDIA EVIDENCE

TASKQuestion + constraints.
EVIDENCE CANDIDATESText, pages, images, audio/video segments.
UTILITY SCORERelevance × modality necessity × trust.
COST ESTIMATETokens/features/latency.
SELECTBest bounded evidence set.
ORDERText + media refs + selectors.
MODEL CALLCapable endpoint via №65.
16. MODALITY BUDGET

ONE REQUEST МОЖЕТ ИМЕТЬ TEXT, 12 IMAGES И 3 VIDEO CLIPS — НУЖЕН ОБЩИЙ COMPUTE BUDGET

TEXT

Token budget

System/task/evidence text + output reservation.

IMAGE

Resolution × count

Model-specific visual token/feature cost.

VIDEO

Frames × duration

Potentially dominant budget; sample adaptively.

AUDIO

Duration

Native audio processing cost; transcript is often cheaper first representation.

№16 owns cognitive test-time compute globally. №73 adds modality-specific cost estimates so Context Manager can spend that budget intelligently.
17. MODALITY ESCALATION

CHEAP REPRESENTATION FIRST, NATIVE MEDIA WHEN UNCERTAINTY REMAINS

CHEAP PASS

Text extraction / transcript / metadata / low-res overview.

IS QUESTION ANSWERABLE?

Evidence sufficient and confidence above threshold?

NATIVE ESCALATION

High-res crop, selected audio segment or dense video clip only when needed.

This is the multimodal version of adaptive compute: do not pay native-video cost for a question answered by transcript metadata.
18. MODEL CAPABILITY REGISTRY

«MULTIMODAL MODEL» НЕДОСТАТОЧНО КАК CAPABILITY LABEL

{
  "model_ref": "model://...",
  "capabilities": {
    "text": true,
    "image_input": true,
    "multi_image": true,
    "pdf_native": false,
    "audio_input": false,
    "video_input": false,
    "spatial_grounding": "bbox",
    "structured_output": true,
    "tool_calling": true
  },
  "limits": {
    "max_images": 16,
    "max_image_bytes": 20000000,
    "max_media_context": "provider-specific"
  }
}
№65 ROUTING INPUT

Capability before quality

Router filters models that:

  • accept required modality;
  • support required output contract;
  • meet data policy;
  • fit media limits;
  • are healthy;
  • then ranks quality/cost/latency.
19. MULTI-IMAGE REASONING

ПОРЯДОК И IDENTITY ИЗОБРАЖЕНИЙ ДОЛЖНЫ БЫТЬ ЯВНЫМИ

LABEL

Image A / B / C

Each image receives stable local label tied to asset_ref.

ROLE

Before / after / reference

Context states what each asset represents instead of asking model to infer provenance.

COMPARE

Explicit dimensions

Ask for changes in layout, defects, text, objects or state rather than generic “compare”.

For “before vs after” tasks, reversed image order is a data-contract bug, not a model reasoning failure.
20. CROSS-MODAL FUSION

СМЫСЛ ЧАСТО ПОЯВЛЯЕТСЯ ИМЕННО НА ПЕРЕСЕЧЕНИИ MODALITIES

TEXT ↔ IMAGE

Caption / diagram

Does paragraph correctly describe figure? Which label supports claim?

AUDIO ↔ VIDEO

Speech / action

What happens visually while speaker says a specific sentence?

TABLE ↔ CHART

Consistency

Does visualization match structured data?

UI ↔ TEXT

Instruction / screen state

Which visible control corresponds to requested action?

Cross-modal relation should preserve source refs for both sides; otherwise answer cannot be reconstructed.
21. MULTIMODAL RAG

RETRIEVAL МОЖЕТ НАХОДИТЬ НЕ ТОЛЬКО TEXT CHUNKS, НО И FIGURES / FRAMES / CLIPS

TEXT-FIRST INDEX

Captions/transcripts/OCR

Cheap retrieval retrieves media refs through associated text.

MULTIMODAL EMBEDDING

Optional

Shared image/text embedding can retrieve visually/semantically relevant media.

MATERIALIZE

Native evidence at answer time

Retrieve asset_ref and send selected original/crop/frame to capable model.

№08/27 own RAG control. №73 supplies media representations and native evidence materialization, not a new standalone “Multimodal RAG agent”.
22. PROVENANCE

OBSERVATION → EXACT ASSET / PAGE / REGION / TIME RANGE

claim:
  "The warning indicator is red."

evidence:
  asset_ref = artifact://screen/v8
  selector:
    type = bbox
    x = ...
    y = ...
    w = ...
    h = ...

transform:
  screenshot resize = 1536px
  crop = none

model:
  multimodal-model revision X

run/span:
  RUN-... / SPAN-...

IMPORTANT:
  provenance tells where observation came from.
  №45 verification decides whether
  that evidence actually supports the claim.
23. VERIFICATION

MULTIMODAL OBSERVATION ТОЖЕ МОЖЕТ HALLUCINATE

OCR CROSS-CHECK

Exact text

Compare model reading with parser/OCR/native text layer.

CROP RECHECK

Visual detail

Reinspect higher-resolution region when fine detail matters.

SECOND METHOD

Independent evidence

Use deterministic detector/parser or second model for high-risk claim.

HUMAN

High-stakes ambiguity

Escalate uncertain visual/audio evidence where error cost is high.

“The model can see it” is not a verification method.
24. MULTIMODAL PROMPT INJECTION

ИНСТРУКЦИЯ МОЖЕТ БЫТЬ НАРИСОВАНА НА КАРТИНКЕ, СПРЯТАНА В PDF ИЛИ ПРОИЗНЕСЕНА В AUDIO

IMAGE TEXT

“Ignore prior instructions...”

Text visible inside screenshot/document is untrusted evidence, not system authority.

AUDIO COMMAND

Spoken injection

Recorded content cannot authorize tools/actions merely by sounding imperative.

QR / LINKS

External reference

Decoded links remain untrusted content; do not fetch/act without policy.

TRUST BOUNDARY

Same rule across modalities

Data can inform reasoning but cannot elevate its own authority.

№52 threat model applies equally to visual/audio/document channels. “Non-text” is not a trusted channel.
25. MEDIA PRIVACY

IMAGE/AUDIO МОГУТ СОДЕРЖАТЬ БОЛЬШЕ PRIVATE DATA, ЧЕМ USER ОСОЗНАЁТ

BACKGROUND

Incidental content

Screens, faces, addresses, badges, documents and bystanders may appear unintentionally.

METADATA

EXIF/location/time

Metadata can expose capture location/device/time even if pixels look harmless.

VOICE

Personal signal

Audio contains speaker identity cues and surrounding conversations.

MINIMIZE

Crop / strip / redact

Send only task-relevant region/segment and remove metadata not needed for task.

№76 will define governance/retention/legal policy. №73 enforces minimization at the multimodal context boundary.
26. REDACTION

REDACT BEFORE MODEL CALL, ЕСЛИ SENSITIVE REGION НЕ НУЖЕН ДЛЯ TASK

DETECT

PII / secrets / irrelevant areas

Use deterministic detectors/manual policy where feasible.

DERIVE SAFE ASSET

Redacted copy

Create new immutable derived artifact with provenance to original.

SEND DERIVED

Least-data input

Model receives only the minimum image/page/audio required.

Do not destructively overwrite original evidence merely to create an AI-safe representation; keep controlled lineage and access.
27. OUTPUT CONTRACT

MULTIMODAL MODEL ДОЛЖЕН ВОЗВРАЩАТЬ STRUCTURED OBSERVATIONS, ЕСЛИ DOWNSTREAM SYSTEM БУДЕТ ИХ ИСПОЛЬЗОВАТЬ

{
  "observations": [
    {
      "type": "visual_fact",
      "text": "...",
      "asset_ref": "artifact://...",
      "selector": {
        "type": "bbox",
        "x": 0.2,
        "y": 0.4,
        "w": 0.3,
        "h": 0.2
      },
      "confidence": 0.86
    }
  ],
  "uncertainties": [
    "small text is unreadable"
  ],
  "needs_reinspection": true
}
WHY STRUCTURE

Ground and re-run

  • downstream verifier can crop exact region;
  • claim cites exact source;
  • uncertainty can trigger escalation;
  • tool/action engine gets typed observation rather than prose guess;
  • evaluation can score grounding separately from answer quality.
28. UNCERTAINTY

MODEL ДОЛЖЕН УМЕТЬ СКАЗАТЬ «ДЕТАЛЬ НЕРАЗЛИЧИМА»

LOW RES

Request crop

Escalate to higher-resolution region rather than guessing small text.

OCCLUDED

Evidence absent

State that object is hidden/ambiguous.

TEMPORAL GAP

Sampling missed event

Request denser clip around suspected time window.

CONFLICT

Modalities disagree

Transcript says X while screen shows Y; preserve contradiction for verification.

Uncertainty is a routing signal for Context Manager, not just prose in final answer.
29. COST & LATENCY

MULTIMODAL REQUEST МОЖЕТ БЫТЬ НА ПОРЯДОК ДОРОЖЕ TEXT-ONLY

PREPROCESS

Decode/transcode/OCR

CPU/GPU/tool cost before model call.

MEDIA TOKENS

Model cost

Image resolution/count and video/audio duration can dominate inference.

TRANSFER

Bytes

Large files increase network/storage latency.

REINSPECTION

Adaptive extra calls

Crop/frame follow-ups add cost but may improve accuracy selectively.

Measure cost per correctly grounded answer, not cost per raw media asset.
30. SERVING CONSEQUENCES

VISION/AUDIO ENCODERS ДОБАВЛЯЮТ COMPUTE И MEMORY STAGES

ENCODER

Media feature extraction

Image/audio/video encoder may add significant prefill-like compute.

VARIABLE SHAPES

Batch complexity

Different resolutions/frame counts complicate batching and capacity estimation.

CAPACITY CLASS

Separate profile

№70 should benchmark text-only and multimodal workloads separately.

31. MULTIMODAL EVALS

НУЖНО МЕРИТЬ НЕ ТОЛЬКО FINAL ANSWER, НО И PERCEPTION / GROUNDING

PERCEPTION

What is present?

Object/text/event recognition accuracy.

GROUNDING

Where / when?

BBox/timecode overlap or exact evidence selector correctness.

RELATION

Cross-modal reasoning

Correct relation between image/text/audio/video evidence.

ANSWER

Task success

Final answer/action decision passes domain verifier.

ABSTENTION

Know when unreadable

Model avoids guesses on insufficient resolution/evidence.

INJECTION

Authority isolation

Embedded malicious instructions do not change tool authority.

COST

Media budget

Native calls/crops/frames per successful task.

LATENCY

End-to-end

Decode/preprocess/model/reinspection timing.

32. EVAL DATASET DESIGN

НЕ ДЕЛАТЬ EVAL ТОЛЬКО ИЗ КРАСИВЫХ ФОТО С ОДНИМ ОБЪЕКТОМ

REAL NOISE

Blur / glare / skew

Production media is imperfect.

SMALL TEXT

Resolution limits

Test unreadable vs readable boundaries.

MULTI-PAGE

Document relations

Evidence can be distributed across pages/figures.

TEMPORAL

Short events

Video tests reveal sampling misses.

CONTRADICTION

Modalities disagree

Model should surface conflict, not blend sources silently.

INJECTION

Adversarial media

Visible/spoken malicious instructions.

DOMAIN

Real artifacts

Charts, forms, screens and media from actual application.

NEGATIVE

Target absent

Measure false positive/hallucination rate.

33. FAILURE MODES

КАК MULTIMODAL AI СТАНОВИТСЯ ДОРОГИМ OCR С HALLUCINATIONS

SEND EVERYTHING NATIVE
Cost/latency explode even when transcript/OCR answers task.
ADAPTIVE MODALITY
TEXT-ONLY EVERYTHING
Layout/spatial/motion signal disappears.
NATIVE WHEN SIGNAL MATTERS
NO ASSET IDENTITY
Cannot prove which image/page/frame produced observation.
STABLE MEDIA REFS
VIDEO ALL FRAMES
Unbounded compute/context.
INDEX → SELECT → INSPECT
SMALL TEXT GUESSING
Model invents unreadable labels/numbers.
CROP / OCR / ABSTAIN
MEDIA INSTRUCTION = AUTHORITY
Prompt injection crosses trust boundary.
UNTRUSTED CONTENT
NO GROUNDING
Observation cannot be independently rechecked.
BBOX / PAGE / TIMECODE
AVERAGE EVAL ONLY
Critical chart/tool/long-video failures remain hidden.
MODALITY SEGMENTS
NEW MULTIMODAL AGENT
Unnecessary architecture duplication.
CAPABILITY IN R04/R07
34. OBSERVABILITY

НУЖНО ВИДЕТЬ, КАКИЕ MEDIA И TRANSFORMS РЕАЛЬНО ПОПАЛИ В MODEL

NAT

Native Media Rate

Share of tasks escalating beyond text/extraction.

IMG

Images / Request

Count and resolution buckets sent to model.

VID

Frames / Minute

Sampling density and selected clip duration.

AUD

Native Audio Seconds

How much audio bypasses transcript-only path.

GRD

Grounding Accuracy

Valid page/bbox/time evidence selectors.

ABS

Abstention Quality

Unreadable/uncertain media handled without hallucination.

$

Cost / Grounded Success

Total extraction + model cost per verified multimodal task.

P95

Media Latency

Preprocess + upload + inference + reinspection.

35. FAILURE INJECTION

ЛОМАТЬ MEDIA PIPELINE НА КАЖДОЙ ГРАНИЦЕ

CORRUPT FILE

Decode failure

Typed failure, no model call with undefined bytes.

WRONG MIME

Type spoof

Verify from content; reject mismatch where unsafe.

HUGE IMAGE

Resource limit

Resize/reject before memory blow-up.

SHORT VIDEO EVENT

Sampling miss

Eval reveals whether adaptive denser inspection triggers.

INJECTION IMAGE

Authority attack

Tool policy remains unchanged.

MISSING CROP

Broken provenance

Result marked incomplete rather than silently citing nonexistent evidence.

MODEL NO VISION

Capability mismatch

№65 rejects route before execution.

CANCEL VIDEO

Cleanup

Derived temporary assets/jobs are released according to lifecycle policy.

36. MVP IMPLEMENTATION

НАЧАТЬ С IMAGE + DOCUMENT NATIVE INSPECTION, НЕ С LIVE VIDEO AGENT

multimodal/
├── media_contracts.py
├── normalize.py
├── image.py
├── selectors.py
├── context.py
├── capability.py
├── grounding.py
├── security.py
├── metrics.py
└── evals/

MVP FLOW:

asset_ref
  ↓
verify mime / size / policy
  ↓
№56 extraction if document
  ↓
cheap text path first
  ↓
task needs visual evidence?
  ├─ no → text model path
  └─ yes
       ↓
     resize / crop
       ↓
     store derived ref
       ↓
     №65 select vision-capable model
       ↓
     native image + task
       ↓
     structured observation
       ↓
     bbox/page selector
       ↓
     №45 verify if material
       ↓
     answer / downstream action
80% VALUE MVP

Images + documents first

  • Stable artifact/media refs.
  • Verified MIME + hard byte/dimension limits.
  • Native images behind Context Manager.
  • Document IR from №56 first.
  • Overview + crop escalation.
  • Capability filter in №65.
  • Structured observations with bbox/page selectors.
  • Untrusted-media security rule.
  • Strip irrelevant metadata.
  • Quality/grounding/cost eval set.
  • No separate multimodal agent.

Add audio/video only when a real workload requires information that transcript/keyframes cannot capture.

37. UPGRADE PATH

РАСШИРЯТЬ MODALITIES ПО ИЗМЕРЕННОЙ ПОЛЬЗЕ

NeedUpgrade
Small text / dense pagesAdaptive high-res crops/tiling + stronger OCR cross-check.
Many figures/chartsFigure-level indexing and multimodal retrieval.
Meeting audioTimestamped ASR/diarization first; native audio only for acoustic questions.
Long video archivesTranscript + scene/keyframe index + query-adaptive clip inspection.
UI automation№74 computer-use loop with screenshot/DOM/accessibility fusion.
Live speech№75 realtime session architecture; streaming audio perception/output.
Privacy-sensitive mediaPre-model redaction, private/local multimodal targets and stricter retention.
38. PRACTICAL DECISION

СТОИТ ЛИ ДЕЛАТЬ ОТДЕЛЬНЫЙ КОМПОНЕНТ?

ВопросОтвет
Стоит ли реализовывать?Условно. Если task genuinely depends on non-text evidence. Не включать vision/audio/video автоматически.
Separate Component?NO. Manifest правильно помещает capability в Context Manager + Tool / Action Engine.
Минимум 80% ценности?Native image/document inspection, media refs, capability routing, crop/resize, grounding, security and modality-specific evals.
Когда overkill?Видео/audio processing stack для приложения, где все реальные задачи решаются text/document extraction.
Trigger?Text extraction loses material spatial, visual, acoustic or temporal evidence and evals show native modality uplift.
Как измерить uplift?Perception/grounding/task accuracy, abstention, native-media escalation rate, cost per grounded success and latency.
Можно ли rule/tool/code вместо separate LLM agent?Да. Media normalization, selection, transforms, routing and grounding contracts are deterministic. A multimodal model is invoked as a capability only where required.
39. DESIGN RULES

ПРАВИЛА ДЛЯ РЕАЛЬНОЙ СИСТЕМЫ

RULE 01

Do not flatten everything to text

Preserve native media when spatial/acoustic/temporal signal matters.

RULE 02

Do not send everything native

Extraction/transcript/index is the cheap first path.

RULE 03

Every media input has stable identity

Asset hash/version and derived transforms are traceable.

RULE 04

Ground observations

Page, bbox, crop, frame or time range for material claims.

RULE 05

Budget modalities explicitly

Resolution/frame count/duration are compute inputs.

RULE 06

Capability-filter models

Do not discover at runtime that selected model cannot process needed modality.

RULE 07

Media is untrusted content

Visible/spoken instructions never gain system authority.

RULE 08

Minimize private media

Crop, redact and strip metadata before model boundary when possible.

RULE 09

No standalone multimodal agent

Keep multimodality as a capability inside R04/R07 unless a real product boundary justifies more.

40. FINAL MAP

MULTIMODAL AI IS ABOUT PRESERVING THE RIGHT SIGNAL — NOT MAXIMIZING THE NUMBER OF MEDIA INPUTS

USER / TASK
        ↓
INPUT ASSETS
  text
  image
  document
  audio
  video
  UI screenshot
        ↓
VERIFY / REGISTER
  asset_ref
  MIME
  hash
  data class
  dimensions / duration
        ↓
CHEAP REPRESENTATION FIRST

document:
  №56 native text / OCR / tables / layout IR

audio:
  transcript + timestamps

video:
  transcript + scene/keyframe index

image:
  metadata + low-res overview if enough
        ↓
CONTEXT MANAGER
  what evidence is actually needed?
        ↓
DOES TEXT/EXTRACTION PRESERVE
THE MATERIAL SIGNAL?

YES
  ↓
use cheap representation

NO / UNCERTAIN
  ↓
NATIVE MODALITY ESCALATION

image:
  overview → crop / tile

audio:
  selected native segment

video:
  selected clip / denser frames

document:
  selected page / figure / region
        ↓
№65 CAPABILITY FILTER
  image?
  audio?
  video?
  multi-image?
  grounding?
  structured output?
  policy?
        ↓
MULTIMODAL MODEL
        ↓
STRUCTURED OBSERVATIONS
  text
  uncertainty
  asset_ref
  page
  bbox
  time range
        ↓
№45 VERIFICATION
        ↓
ANSWER / TOOL INPUT

SECURITY:

text in image
spoken command
PDF instruction
QR / link
        =
UNTRUSTED CONTENT

it may inform the task
but cannot grant authority

PRIVACY:

crop only needed region
strip irrelevant metadata
redact unnecessary PII
select approved model boundary

VIDEO RULE:

DO NOT:
  send every frame

DO:
  index
  retrieve time range
  inspect native clip
  ground to timestamp

DOCUMENT RULE:

DO NOT:
  OCR everything blindly

DO:
  native text first
  OCR where needed
  preserve layout
  inspect figures visually
  verify exact numbers structurally

BOUNDARIES:

№56
  EXTRACTS structured content

№73
  UNDERSTANDS native/cross-modal evidence

№74
  ACTS on visual computer state

№75
  RUNS realtime voice/media sessions

№65
  ROUTES to capable model

№70
  SERVES that multimodal model

CORE PRINCIPLE:

MULTIMODAL AI
IS NOT
"PUT AN IMAGE INTO THE PROMPT."

IT IS A SYSTEM THAT KNOWS:

WHAT SIGNAL THE TASK NEEDS,
WHICH REPRESENTATION PRESERVES IT,
HOW MUCH MEDIA TO SEND,
WHICH MODEL CAN HANDLE IT,
WHERE THE EVIDENCE IS,
HOW TO VERIFY IT,
AND WHEN TEXT ALONE
IS ALREADY ENOUGH.

ECC RETROFIT / PRACTICAL HARNESS INTEGRATION

A. Related ECC ideas. Context-as-cache, scoped memory, lifecycle hooks, selective capabilities, feature flags, deterministic enforcement, provider-neutral adapters and eval-gated learning are applied only where relevant to №73 Multimodal AI.

B–E. Existing boundary and placement. The existing conceptual boundary, class SPECIALIZED, default CONDITIONAL and owner Context Manager + Tool / Action Engine remain authoritative. Runtime/control/data/offline placement is unchanged; durable state stays outside model context.

F–H. Hooks and contracts. Use bounded PRE_MODEL/POST_MODEL, PRE_TOOL/POST_TOOL, CHECKPOINT and TASK_COMPLETED events as applicable. Illustrative fields and canonical contracts are defined in NEW_CONTRACTS_SPEC.md; no universal schema is implied.

I–J. Security and evaluation. Host-side schema, permission, secret, budget, idempotency and audit checks take precedence over LLM output. Optional mechanisms require a feature flag and WITH/WITHOUT ablation; measure quality, acceptance, correction, latency, cost, escalations and severe errors.

K–L. Task profiles and cross-references. A TaskProfile selects the relevant skill, tool/context slice, memory scope and enforcement profile independently from FAST/STANDARD/DEEP. See cross-reference map, hook spec and ablation plan. Provider adapters remain outside the core.