# Prompt to Pipeline: Building with Google's Gen Media Stack — Paige & Guillaume, Google DeepMind <!-- ref: @content/youtube/aie/2026-05-23-prompt-to-pipeline-googles-gen-media-stack version: 3 updated_at: 2026-10-31T20:01:48.170Z --> Paige (AI Engineer, 2026-05-23): Paige's organizing heuristic is that when everyone sprints toward the same workaround, that workaround is usually the wrong long-term investment — the capability gets absorbed into the model. *Synthesized from Paige, Guillaume Vernade, and Ian Valentine on AI Engineer, 2026-05-23.* Three Google DeepMind speakers share this afternoon recap session: Paige, a machine learning engineer whose career runs from early NumPy/SciPy/scikit-learn contributions through subsurface geoscience at Chevron, GPU support for TensorFlow, a year at GitHub on VS Code and early Copilot UX testing, and back to the original PaLM 2, Gemini, and Gemma teams; Guillaume Vernade, developer advocate for the generative media models; and Ian Valentine, developer relations engineer on Gemma. ## Core Thesis Paige's organizing heuristic is that when everyone sprints toward the same workaround, that workaround is usually the wrong long-term investment — the capability gets absorbed into the model. The session then demonstrates what's left once you stop building workarounds: a multimodal Gemini you drive from AI Studio and export as code, a composable generative media stack where Gemini writes the prompts for the media models, and Gemma 4 models capable enough that the same agentic patterns now run on a laptop or a phone. ## Key Insights - **The sprint heuristic, with receipts.** Everyone built vector databases to work around 8,000- and 16,000-token context windows; context expanded. Everyone fine-tuned models for individual languages; multilingual support arrived natively. Everyone built agent frameworks and MCP servers; Paige argues much of that is being absorbed, with people moving toward skills — "fancy markdown files" — and eventually a listener that watches what you do and writes skills for you in the background. - Her strongest example is medical: PaLM 2 and early Gemini required dedicated fine-tunes, MedLM and Med-PaLM, to serve medical use cases. Customers who needed those now use Gemini out of the box with retrieval or a custom prompt, because that data was folded into Gemini itself. Challenged from the floor on reproducibility, she concedes the point does not depend on fine-tuning: no large language model is deterministic. She also agrees that the durable value sits in opinionated views of specific use cases and working directly with customers. - **What shipped in the preceding weeks**: Gemini 3.1 Flash Live (real-time conversation), Gemini 3.1 Pro and Flash Lite, Nano Banana 2 (image generation and editing, including reverse image search), an embedding 2.0 model that puts video, audio, images, code, and text in one shared embedding space, Lyria 3 for music, Genie 3 for world models, an AI Studio full-stack runtime with database, OAuth, and custom API keys, Gemma 4 under Apache 2.0, and Veo 3.1 Light. Vernade puts the cadence at a new model or capability roughly every five days for generative media alone, and two to three shipped things a week counting AI Studio and pricing changes. - **Cost as a selection argument.** Gemini 3.1 Flash Lite runs around 25 cents per million tokens analyzed — almost an order of magnitude below Gemini 3.1 Pro — while still handling video and audio. Paige cites Augment Code replatforming their entire agent infrastructure to default to Gemini 3.1 Pro specifically on the performance-to-cost ratio. - **Video analysis in AI Studio is a paste-a-URL operation.** Attach a YouTube link with a start and end time; frames sample at roughly one per second; a 300-second clip came to about 30,900 tokens. The model receives the frames, not just metadata. Toggle Google Search grounding, ask for a timestamped table of dinosaurs with fun facts, then hit **Get code** and receive the whole configuration — model, URL, offsets, prompt — in TypeScript or Python. Her framing: if it works in AI Studio, it works in your app. - **Code execution is a one-line sandbox.** Turning it on gives Gemini a sandboxed Python environment with data-science libraries preinstalled, invoked as tool calls. Asked to draw bounding boxes around green Lego bricks, Flash Lite did it near-instantly for a fraction of a cent. In side-by-side compare mode, Gemini 3 Flash Preview self-verified — drawing segmentation masks over the green spectrum and checking its own coordinates — costing more and taking more tool calls, still on the order of pennies. The same sandbox answers counting and orientation questions across video frames. - **AI Studio's Build feature is a full-stack generator**, comparable to v0.dev or Lovable, now with database and auth. Paige built a bookshelf cataloger live: sign in with Google, upload a shelf photo, use Search grounding to fill in title, author, description, and genre from the spines, persist to Firestore per account, and share by link or QR. It hit a real failure — insufficient Firestore permissions on save — and fixed its own security rules when asked. The environment also carries custom secrets (Supabase, n8n, whatever), version history, Drive connection, GitHub sync to public or private repos, and an app gallery of examples. - **Gemini Live** handles screen sharing and camera feeds in one speech-to-text → understanding → text-to-speech pipeline, and language behavior is steerable mid-conversation rather than only via system instructions — asked for Castilian Spanish specifically, it complied without editing the config. Get code works here too. - **Genie 3 is a composition, not a single model** — Nano Banana for the first frame, Veo, and Gemini for prompting — producing a playable world frame by frame in raw pixels. There is no Unity or Unreal environment and no 3D assets, and no physics engine, yet knocked-over objects persist for the duration of the 60-second session. Paige generated Regent's Canal with dolphins, pirate-flagged boats, and a pink sparkly squirrel in a pirate hat, walkable with WASD and arrow keys, jump on space, downloadable as video afterward. Access is via an Ultra subscription in some regions. She contrasts this with World Labs (Fei-Fei Li's company), which builds actual Unity/Unreal environments instead. - Vernade's generative media walkthrough builds the same book-illustration pipeline as his morning session: pull a public-domain book from Project Gutenberg, feed it once into a chat session, use structured output so the model returns only prompts, then generate character images, chapter images, videos, and music. Notable numbers: the full notebook runs about $1, the Veo notebook alone about $20, Veo 3.1 Light is about 5 cents per second, and Lyria 3 produces 30-second clips or full three-minute songs with lyrics. He believes Google is the first to offer music generation through an API, which makes it usable in agentic workflows — his example is being woken by a song about the morning's news. - **The character-consistency fix, again, is references not history.** Relying on chat history let the toad come out wrong. The clean version emits structured output per chapter that includes the list of characters present, then passes only those characters' reference images. He stresses this is the version that survives scale — a book with 40 characters cannot ride on context — and that he would generate front, back, and side references per character. - **Video prompts should be generated separately from image prompts.** Reusing the still-image prompt gives Veo no idea what happens next. Asking Gemini, with the image attached, to describe the following seconds produces a materially better prompt — though Vernade candidly notes results vary and reused prompts inexplicably tend to add text overlays. - Vernade repeats the training-data point that explains why this pipeline works at all: much of the generative media training data was captioned with Gemini, so Gemini's prompts land in-distribution for Nano Banana, Veo, and Lyria. - **The multi-voice TTS trick**: have Gemini rewrite a scene as a play script labeling only "narrator" and "character," with a distinct speaking style per character reused consistently; assign the narrator one voice (Sulafat) and everyone else another (Fenrir). The styles alone make it impossible to tell the characters share a voice. The gotcha remains that the payload must begin with "read this" or the model ignores the text. - **Vibe-coding guidelines Vernade always supplies**: one file per feature, so that when he asks for a change and an unrelated file moves he knows immediately something is wrong; and add logging, because an error message alone doesn't tell you what happened before it. He is baffled these aren't defaults in vibe-coding tools. He also fed his entire notebook into AI Studio Build as a prompt — "build an app that illustrates a book using gen media models as described in this notebook" — and it produced a working equivalent in roughly 1,000 seconds. - **The service tiers again**: flex trades latency (minutes) for price, comparable to a batch API; priority costs double and is more reliable. He tells the audience to strip `service_tier: priority` from the notebook before running it. - On open weights for generative media, Vernade's honest answer is no for image and video — the pre- and post-generation safety checks are the reason, and an open-weight model is "open bar" by comparison. Music is different: real-time on-device generation would be a legitimate reason to ship weights someday. He also confirms you cannot yet feed Lyria audio into Veo — the model simply wasn't built to ingest audio — and that the direction of travel is every model ingesting every modality. - **Gemma 4 shipped the previous Thursday as a family of four under Apache 2.0.** E2B and E4B are the "effective" models for phones, Raspberry Pis, and Jetson Nanos: a per-layer embedded architecture keeps embeddings on flash and pages them in on demand, so the "brain" is about 2B and 4B parameters while the full weights in RAM are closer to 5B and 8B. Above them sit a 26B mixture-of-experts with 4B activated and a 31B dense flagship, both targeted at laptops, desktops, or single-GPU cloud instances depending on quantization. - Gemma 4's design goal is agentic: thinking is built in, multimodality covers image and video across the family with audio on the two effective models, and coding, function calling, and action taking are architectural rather than dependent on strong instruction-following. Valentine reports performance in the range of models roughly 10x larger by parameter count — a cluster-scale capability moving to a single GPU. The radar-chart story he shows: Gemma 2 spiked on creative writing and was uneven elsewhere; Gemma 3 and 4 evened the profile out. - **On-device agents are real now, not simulated.** The Google AI Edge Gallery app (Play Store and App Store, Android and iOS) added **agent skills**: an E2B model running physically on a Pixel decides which skill to call — Android intents that trigger other apps, custom JavaScript skills, a web view — turning ambiguous input into function calls, including reading from and writing to a research tracker. On-device vibe coding also works: the 2B model generated a calculator that correctly handled divide-by-zero, and Valentine notes turning thinking on adds a planning step and visibly improves output quality. - **The local-serving path is unglamorous and complete.** DeepMind partners with Ollama, LM Studio, vLLM, and SGLang. In LM Studio the 26B loads at about 18 GB, closer to 22 GB of RAM once you allow for context, which an M4 Mac with unified memory can hold. Serve it on `localhost:1234` behind an **OpenAI- or Anthropic-compatible endpoint**, and any client that speaks those APIs works. Configuring opencode is a single JSON block — provider name, schema, exposed models, extra endpoint parameters, and the URL. - Two demos make the point that local is now agentic, not just conversational: an orchestrator spawning **10 local sub-agents** that each generate an SVG in parallel, with combined throughput displayed and no internet involved; and a game spec written by the 31B model, implemented from disk by the local model inside opencode, including reading and writing files, choosing between line-edit and full-rewrite tools, spawning its own sub-agents, and fixing a syntax error when Valentine pasted it back manually. He notes the 31B handles sub-agent delegation reliably while the 26B sometimes needs more prompting. MCP servers and skills work in that environment too. - If you lack the RAM, `gcloud beta ... deploy` puts Gemma on an RTX Pro 6000 in Cloud Run with one command, and the Gemma models are also directly promptable on ai.dev with video, file upload, and search grounding — slower only because a single shared instance serves everyone. - Two more integrations Valentine shows: Open Duck, a robot simulator driven by the E2B model **running in the browser via WebGPU**, where you can watch it announce the command before performing the action; and the Android Studio team's agentic app builder using the 26B. The Agent Development Kit exposes a thinking loop and feedback system for longer-running tasks. - Valentine's framing of what is actually new: none of these capabilities would impress anyone who has used a frontier model in 2026 — the interesting part is that you can now run them on hardware you own. ## Actionable Takeaways 1. Before building infrastructure to route around a model limitation, ask whether the limitation is on the model roadmap. Paige's list of things that got absorbed — vector stores for tiny contexts, per-language fine-tunes, domain fine-tunes like MedLM — is the prior. 2. Prototype in AI Studio and press **Get code**. The exported TypeScript or Python carries the model, tools, offsets, and prompt, so nothing is lost between playground and app. 3. Default to Gemini 3.1 Flash Lite (~25 cents per million tokens analyzed) for video and image analysis workloads, especially if you are still on Gemini 2.0 or 2.5 Flash, and reserve Pro for what needs it. 4. Turn on code execution instead of writing your own image-analysis code — bounding boxes, segmentation masks, counting, and orientation across video frames all come from the sandboxed Python environment for pennies. 5. Use compare mode to check whether the cheaper model's answer matches the more expensive model's self-verified answer before committing to a tier. 6. For character or object consistency across generated images, pass explicit reference images selected by a structured-output list of what appears in the scene — do not rely on chat history, which does not scale past a handful of entities. 7. Write video prompts as a separate Gemini call, with the still image attached, describing what happens next. Reusing the image prompt gives the video model nothing to work with. 8. Set two standing instructions for any vibe-coding tool: one file per feature (so unrelated edits are immediately visible as a defect), and add logging (an error message alone won't tell you what led to it). 9. Strip `service_tier: priority` from shared notebooks; use flex when latency doesn't matter for a 50%-class discount. 10. To run Gemma 4 locally, load the 26B MoE in LM Studio (~18 GB, ~22 GB with context), serve it on port 1234 behind an OpenAI- or Anthropic-compatible endpoint, and point opencode at it with a single provider block in `config.json`. 11. Turn thinking on for on-device Gemma when output quality matters — the added planning step measurably improves generated code and SVGs — and off when you want throughput. 12. Try the Google AI Edge Gallery app's agent skills to prototype on-device agents that call Android intents, custom JavaScript, or a web view, with no server involved. ## Notable Quotes > "Usually if you see everybody sprinting to do the same thing, that's a great indication that it's the wrong thing." — Paige > "No large language model is deterministic. That will be a problem regardless." — Paige > "If you can get it working in AI Studio, you can get it working as part of your app." — Paige > "None of these things are stored as 3D game assets. They're just raw pixels incorporated into the experience." — Paige > "A lot of the training data for the gen media models is actually made using Gemini." — Guillaume Vernade > "This may not be impressive if you've used any model in 2026, other than to know that you can actually run it at home." — Ian Valentine > "What might have required a cluster, now you could do the same capabilities on a single GPU." — Ian Valentine --- *You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).* *Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*