<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Document Extraction on RockB</title><link>https://baeseokjae.github.io/tags/document-extraction/</link><description>Recent content in Document Extraction on RockB</description><image><title>RockB</title><url>https://baeseokjae.github.io/images/og-default.png</url><link>https://baeseokjae.github.io/images/og-default.png</link></image><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 21 Oct 2026 00:18:32 +0000</lastBuildDate><atom:link href="https://baeseokjae.github.io/tags/document-extraction/index.xml" rel="self" type="application/rss+xml"/><item><title>Multimodal AI: Image, Audio and Video Evaluation for Real Applications</title><link>https://baeseokjae.github.io/posts/multimodal-ai-2026/</link><pubDate>Thu, 09 Apr 2026 15:23:00 +0000</pubDate><guid>https://baeseokjae.github.io/posts/multimodal-ai-2026/</guid><description>Compare multimodal systems by task, API input preprocessing and failure behavior, with documented input limits and a concrete invoice-extraction validation example.</description><content:encoded><![CDATA[<p>A model that accepts images is not automatically the best document reader, and a model that accepts video does not necessarily inspect every frame at full resolution. Multimodal evaluation should begin with the application&rsquo;s evidence and error tolerance.</p>
<p>This guide replaces a broad model ranking with a concrete extraction workflow. It does not report independent accuracy scores or a universal hallucination rate. The API details below are quoted from vendor documentation checked on the date shown; none of them was measured here.</p>
<h2 id="separate-input-capability-from-task-performance">Separate input capability from task performance</h2>
<p>Google&rsquo;s <a href="https://ai.google.dev/gemini-api/docs/image-understanding">image-understanding documentation</a> separates three documented ways to get an image into a request: a public URL, inline base64 data, or a Files API upload. The inline path caps total request size — text prompts, system instructions and inline bytes together — at 20 MB, and the page recommends the Files API for larger or reused files. So &ldquo;the model accepts images&rdquo; is rarely the binding constraint; the upload path you choose is part of the experiment.</p>
<p>The same documentation records that Gemini 3 introduced <code>media_resolution</code>, which sets the maximum number of tokens allocated per input image or video frame. Higher settings improve the model&rsquo;s ability to read fine text or identify small details, and increase token usage and latency. That trade-off is a parameter you set, not a property of the model name.</p>
<p>The <a href="https://ai.google.dev/gemini-api/docs/video-understanding">video-understanding documentation</a> covers processing modes, temporal sampling and token accounting; those are the numbers that decide whether a video task is feasible at all.</p>
<p>Those details matter because resized images, sampled frames and audio representations can lose information needed by a task. A capability label such as &ldquo;video input&rdquo; does not establish frame-perfect event detection. Check the exact model and request settings.</p>
<p>Scope note: these statements describe the Gemini API request path. Consumer product surfaces apply their own upload and preprocessing behaviour, so a result you see in a chat app is not evidence about what the API does by default. Evaluate the endpoint you intend to use, not an entire provider brand.</p>
<p>Also separate understanding from generation. Reading text in a photograph and generating a new image are different operations.</p>
<h2 id="video-the-documented-default-is-one-frame-per-second">Video: the documented default is one frame per second</h2>
<p>The video page states that video inputs use static processing by default — frames extracted at 1 FPS — across all models, including Gemini 4. An opt-in <strong>agentic</strong> mode is documented for Gemini 4 Argon, 3.8 Flash, 3.6 Flash and 3.5 Flash Lite, and later models, where the model explores the timeline, inspects transcripts first and adapts frame rates and resolution to the prompt.</p>
<table>
	<thead>
			<tr>
					<th>Mode</th>
					<th>What it does</th>
					<th>Availability</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Static (default)</td>
					<td>Frames at a fixed 1 FPS, placed in context in a single pass</td>
					<td>All Gemini models, including Gemini 4</td>
			</tr>
			<tr>
					<td>Agentic (opt-in)</td>
					<td>Model navigates the timeline and loads only what the prompt needs</td>
					<td>Gemini 4 Argon, 3.8 Flash, 3.6 Flash, 3.5 Flash Lite and later</td>
			</tr>
	</tbody>
</table>
<p>Customisation is mode-specific: clipping intervals (<code>start_offset</code>, <code>end_offset</code>) and custom frame-rate sampling are documented as supported only in static mode.</p>
<p>The page also publishes static-mode token arithmetic that is worth copying into your own plan rather than guessing: a sampled frame costs 66 tokens when <code>media_resolution</code> is low and 258 tokens otherwise, audio adds 32 tokens per second, and metadata is added on top. Models with a 1M-token context window can process up to 3 hours of video at low media resolution, or up to 1 hour at high. For an agentic run, budget for navigation reasoning under <code>total_thought_tokens</code> as well as on-demand media retrieval under <code>total_tool_use_tokens</code>. The static per-frame calculation is not an agentic usage estimate.</p>
<p>The vendor states that agentic processing is up to 88% more token-efficient and roughly 7% higher quality on long-form content. Treat both numbers as vendor claims: the page does not publish the dataset, prompt set or scoring rubric behind them, and they should not be repeated as independent measurements or transferred to another provider.</p>
<p>What follows from a 1 FPS default is arithmetic, not a benchmark. An event shorter than the sampling interval has no guarantee of landing on a sampled frame, and the documentation publishes no accuracy guarantee for it. If your task depends on such an event, change the sampling configuration, record it as a new condition, and say so in the report.</p>
<h2 id="a-concrete-task-extract-an-invoice-for-human-review">A concrete task: extract an invoice for human review</h2>
<p>Define the required output before choosing a model: invoice identifier, invoice date, currency, total and source page. Keep the original document and a human-labeled answer set. Include clean scans, low-contrast scans, multiple currencies, missing fields and pages with unrelated totals.</p>
<p>Record which upload path you used. A long multi-page scan easily exceeds the 20 MB inline cap, so the Files API path becomes part of the condition rather than an implementation afterthought. If two runs differ in upload path or <code>media_resolution</code>, they are two conditions, not one comparison.</p>
<p>Ask the model to leave uncertain fields unresolved rather than inventing values. Keep source-page information so a reviewer can verify the answer. Do not let extracted text or instructions in the document trigger a payment or send data elsewhere.</p>
<p>Measure field-level exact match and meaningful errors separately. A misplaced decimal or wrong currency can matter much more than a punctuation difference in a supplier name. Track the number of records requiring human review and the time needed to correct them.</p>
<h2 id="validate-output-without-confusing-validation-with-accuracy">Validate output without confusing validation with accuracy</h2>
<p>The <a href="https://baeseokjae.github.io/research/content-quality-batch2-2026-10/evidence_checks.py">offline validator</a> checks a small extracted-record format: required fields, a valid calendar date, supported example currencies, a nonnegative amount and a positive source-page number. The <a href="https://baeseokjae.github.io/research/content-quality-batch2-2026-10/offline-results.json">execution record</a> includes a valid synthetic invoice and rejection cases for an impossible date, extra instruction field, negative amount and invalid page.</p>
<p>These checks catch malformed output. They do not prove that a valid-looking total matches the image. An extraction of <code>12.50</code> and one of <code>125.00</code> can both pass structural checks. A separate comparison against the document and business rules is still required.</p>
<p>The example&rsquo;s currency list and whole-won rule are deliberately narrow application assumptions. Adapt them to the actual contract rather than treating them as universal invoice rules.</p>
<h2 id="build-an-evaluation-matrix-by-modality">Build an evaluation matrix by modality</h2>
<p>Use the <a href="https://baeseokjae.github.io/research/content-quality-batch2-2026-10/multimodal-evaluation.csv">multimodal evaluation sheet</a>. Its columns keep model, input preprocessing and human review minutes separate, and its result cells are intentionally empty: it is a protocol to fill in, not a set of collected measurements.</p>
<table>
	<thead>
			<tr>
					<th>Task</th>
					<th>Representative failure</th>
					<th>Evidence to retain</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Document extraction</td>
					<td>Wrong decimal, date or currency</td>
					<td>Original page, expected fields and extracted fields</td>
			</tr>
			<tr>
					<td>Audio transcription</td>
					<td>Speaker overlap or proper-name error</td>
					<td>Consent-cleared clip, reference transcript and timestamps</td>
			</tr>
			<tr>
					<td>Video event detection</td>
					<td>Short event missed between sampled frames</td>
					<td>Sampling rate and clipping interval, time interval, expected event</td>
			</tr>
			<tr>
					<td>Image question answering</td>
					<td>Confident answer to an absent detail</td>
					<td>Image, question and acceptable abstention</td>
			</tr>
	</tbody>
</table>
<p>Compare models with the same input preprocessing and output requirements. If you change resolution, upload path or video sampling, record that as a new condition. Include abstentions, timeouts and failed requests in the report.</p>
<h2 id="cost-privacy-and-deployment">Cost, privacy and deployment</h2>
<p>Account for modality-specific billing, preprocessing, storage, retries and human review. Text-token rates alone may not describe the cost of video or image processing, and an agentic video usage estimate must include both thought tokens and tool-use tokens rather than relying on the static per-frame calculation. Keep the provider&rsquo;s usage record with the application result.</p>
<p>Obtain appropriate permission for source material and avoid sending unnecessary personal data. Use independent review for consequential outputs. A low error rate on one benchmark cannot certify a healthcare, financial or legal workflow.</p>
<p>Start with one bounded task and expand only when its error handling is understood. The goal is an application whose mistakes can be found and corrected, not a table assigning &ldquo;excellent&rdquo; to every modality.</p>
<h2 id="revision-note">Revision note</h2>
<p><strong>Updated October 21, 2026.</strong> Specified what the API documentation actually states about input paths, the 20 MB inline cap, <code>media_resolution</code>, the 1 FPS static default, the opt-in agentic mode and static-mode token accounting, and separated vendor headline figures from measurements. Removed model-version tags that the body no longer evaluates; the article makes no per-model ranking or price claim. Publication date and URL unchanged.</p>
<p><strong>Updated October 20, 2026.</strong> Removed unsupported market forecasts, blanket model rankings, approximate hallucination rates and safety-critical recommendations. Added a concrete extraction protocol and honestly scoped executed validation checks.</p>
<h2 id="primary-sources">Primary sources</h2>
<p>Checked October 21, 2026: <a href="https://ai.google.dev/gemini-api/docs/image-understanding">gemini image</a>; <a href="https://ai.google.dev/gemini-api/docs/video-understanding">gemini video</a>.</p>
<p>Checked October 21, 2026 (companion files, HTTP 200): <a href="https://baeseokjae.github.io/research/content-quality-batch2-2026-10/multimodal-evaluation.csv">evaluation sheet</a>; <a href="https://baeseokjae.github.io/research/content-quality-batch2-2026-10/offline-results.json">execution record</a>; <a href="https://baeseokjae.github.io/research/content-quality-batch2-2026-10/evidence_checks.py">validator</a>.</p>
]]></content:encoded></item></channel></rss>