Design a Multimodal Assistant at Very Large Scale
How to design one assistant for text, photos and voice at very large scale: media, routing, latency and cost, for your AI interview.
In short
A multimodal assistant reads text, photos and voice in one chat. At very large scale, media goes straight to storage and is shrunk, a router picks the model, live voice and slow jobs are split, and a per-minute budget for model tokens keeps peaks under control.
13 min readAdvancedOccasional ยท estimateFacts checked 27 November 2026
Say it out loud
Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.
A multimodal assistant takes text, photos and voice in one chat. At very large scale I send media straight to storage, shrink it, and keep only a file ID in the chat. A router picks a small or large model for each request. Live voice uses a realtime model so it stays quick. Slow photo jobs go to a queue. A token budget per minute stops one peak from breaking everyone else.
A multimodal assistant takes more than typed text. A customer can send a photo of a cracked phone, record a voice note about a bill, or type a chat. At very large scale, the hard part is getting big files in without choking your servers, keeping live voice fast, and not running out of tokens at peak.
I split the work. Media goes straight to cloud storage with a signed upload link, then gets checked and shrunk. The chat keeps a short file ID, not the file. A router reads each request and sends easy ones to a small model and hard ones to a large one. Live voice uses a realtime model that listens and speaks without a separate transcription step, which lowers the delay before the reply.
Slow jobs, such as a claim photo, go to a queue, and the customer is told when to expect an answer. At peak I rate-limit each customer, scale the workers up, and keep reserved room for live calls. I also set a token budget per minute, because image tokens count toward those limits. That way the system slows down on purpose, so it does not fail for everyone.
I would say honestly that the numbers here are made up. Before launch I would measure the real ones with load tests and a cost dashboard.
What is a multimodal assistant, in plain words?
A multimodal assistant takes more than typed text. In one chat, a customer can send a photo, record a voice note, or type a question. The assistant reads all of it and answers in one thread.
Think of a triage nurse at a busy hospital front desk. A patient may hand over a form, show a rash, or describe pain on the phone. The nurse sends each case to the right place, and only the hard ones reach the doctor. A multimodal system works the same way: cheap steps first, and the big model only when it is needed.
Key words
- Token
- The unit a model counts: a small chunk of text, or a patch of a picture, that sets the bill and the speed limit.
- Visual token
- One small block of a picture that the model counts as a unit of work.
- Router
- Code that reads each request and picks the model that handles it.
- Realtime voice
- A model that listens and talks in one stream, with no separate transcription step.
- File ID
- The ID a model provider gives an uploaded file, sent in place of the file.
Our made-up case is a mobile operator with 30 million customers. People send photos of damaged phones for insurance claims, voice notes about bills, and text chats. A typical message reads "My bill went up again and nobody has called me back." On a Monday peak, the same assistant handles tens of thousands of chats at once.
How do photos and voice get in without slowing everything?
Avoid pushing a photo through your own web servers. The app asks for an upload slot, the phone sends the file straight to cloud storage, and a check runs on the type and size. The chat then keeps the provider's file ID, not the file.
- 1
Upload straight to storage
The phone uses a signed upload link, a temporary web address that lets it send the file straight to storage, so your servers never carry the bytes.
- 2
Check before anything runs
Reject the wrong file type and anything too large. Store the file's ID with the customer's record.
- 3
Shrink to what the model needs
Resize and compress the photo. A compressed format such as JPEG or WebP sends fewer bytes, but heavy compression can make text on a bill hard to read.
- 4
Upload once, reuse the file ID
Upload the file once to the model provider, keep the file_id it returns, and send that ID on later turns, so the bytes are not resent.
โUpload the image once, then reference the returned file_id in subsequent messages instead of resending base64 data.โ
Anthropic, Claude vision docs
Why shrink? A model turns a picture into visual tokens, and one token covers a small square of pixels. A 1,000 by 1,000 pixel photo works out to 36 by 36 squares, which is 1,296 tokens by the vendor's formula. A 512 by 512 thumbnail is 361. Big photos are also resized by the model, so check the largest size your model accepts.
Files are also an attack path. OWASP lists images among the inputs that can alter a model's behaviour, and describes an attacker hiding an instruction in an image below the human visual threshold. Treat text found in photos and voice notes as untrusted, the same as a web page.
How do you keep replies fast at peak?
Live voice and slow jobs are different. A voice call has to answer while the customer is still talking, so it gets its own path. A claim photo can wait a short while for its check, so it goes to a queue.
โOne of the most powerful features of the Realtime API is voice-to-voice interaction with the model, without an intermediate text-to-speech or speech-to-text step.โ
OpenAI, Realtime API
Two speeds for one assistant
Live voice call
Customer talks
speaks, no typing
Claim photo
Claim photo
uploaded to storage first
Realtime model
hears and answers at once
Job queue
waits, retries, scales
One thread
same chat, same customer
- 1A live call goes straight to a realtime model.
- 2A photo or voice note waits in a queue, after upload.
- 3The live answer is spoken back during the call.
- 4The queued job posts its answer later, in the same thread.
Live voice uses a realtime model, so the audio is not turned into text and back before an answer. The alternative is a speech model that turns audio into text, which adds a step. Speech models of that kind are trained on large amounts of audio transcripts.
- 1
Scale the workers with the queue
Add capacity as the queue grows. AWS's guidance is to use auto-scaling (adding servers automatically as load grows), rate limits and throttling, and to design for bursts.
- 2
Rate-limit each customer
One customer in a loop must not use up the peak for everyone else.
- 3
Batch requests on your own GPUs
If you host the model yourself, serve many requests together. vLLM documents continuous batching, which adds new incoming requests to the batch that is already running. GPU memory limits how many fit, and the PagedAttention paper says poor memory handling can waste much of it.
- 4
Reserve room for live calls
Keep a set share of capacity for voice, so a queue of photos can never block a call.
Latency, the wait before a reply starts, is a budget you set in advance. AWS calls inference latency, the time a model takes to produce a reply, critical for real-time applications. Pick a target for each path, then measure it. Meta tested adding image, video and speech to Llama 3 through a compositional approach, which joins separate parts to one language model. The paper says those versions were not yet broadly released. A model that takes every input natively is the other route. Each one trades quality, speed and cost differently.
How do you keep cost and limits under control?
Tokens are both the bill and the speed limit. OpenAI's docs say image tokens count toward tokens per minute limits, so a flood of photos can use up the shared per-minute budget.
Choose the detail level on purpose. OpenAI says its detail setting controls how an image is prepared, so a routine check can use less detail and a claim photo more.
Routing each request to the cheapest model that can do it
Incoming request
text, photo or voice note
Router
reads the type and size
Easy cases
Small model
simple checks, low cost
Hard cases
Large model
disputed bills, many steps
Reply
checked before it is sent
- 1The request arrives with its text, photo or audio.
- 2The router sends simple work to the small model.
- 3Disputed or long work goes to the large model.
- 4A small-model answer goes out after its check.
- 5A large-model answer goes out after the same check.
Here is a capacity check with made-up peak numbers. It turns photos per minute into image tokens per minute and compares the total with a budget.
import math
PATCH = 28 # pixels per side of one visual token (Claude vision docs)
BUDGET = 1_000_000 # made-up: image tokens we may send each minute
PEAK_PHOTOS = 1_200 # made-up: photos per minute at the Monday peak
def visual_tokens(width, height):
return math.ceil(width / PATCH) * math.ceil(height / PATCH)
for label, side in [("Customer original 1000 x 1000", 1000), ("Our resize 512 x 512", 512)]:
per_photo = visual_tokens(side, side)
per_minute = per_photo * PEAK_PHOTOS
verdict = "fits the budget" if per_minute <= BUDGET else "over budget, so degrade"
print(f"{label}: {per_photo} tokens a photo, {per_minute:,} a minute, {verdict}")Output
Customer original 1000 x 1000: 1296 tokens a photo, 1,555,200 a minute, over budget, so degrade Our resize 512 x 512: 361 tokens a photo, 433,200 a minute, fits the budget
At peak, the original photo breaks the budget and the resized one fits. So the rule is to shrink first, then lower the detail for routine checks, then queue the rest. Live calls keep their share throughout.
How would you handle a Monday peak with three times the usual load?
Decide the order before the peak comes, so nobody is improvising in the middle of it.
- 1
Protect live calls first
Keep the reserved voice share. A call is the one path where a delay is heard at once.
- 2
Shrink photos harder
Use a smaller size and lower detail for routine checks only, and keep text on bills readable.
- 3
Queue the slow jobs
Claim photos wait in line, and the customer sees roughly when to expect an answer.
- 4
Send easy cases to the small model
The large model works only on the disputed bills.
- 5
Watch the queue age and the budget
If the oldest job waits too long, stop taking new photos rather than slowing live calls.
Say clearly what you would not do: never drop a live call to save a photo, and never send a photo to the large model just because the small one is busy.
What does the interviewer want to hear?
A strong answer covers
- A plain definition: one assistant for text, photos and voice, with files kept out of the chat.
- The media path: direct upload, shrink, then reuse by ID.
- Live voice and slow jobs split, and what happens to each at peak.
- A router that sends each request to the cheapest model that can do it.
- A token budget per minute, and how the system degrades when it is used up.
- Honest trade-offs, and numbers measured with load tests.
Common traps
Trap"Send every file through our API server, it's simpler."
BetterYour servers then carry every byte and slow down at peak. Upload straight to storage and send an ID.
Trap"The biggest model handles everything."
BetterIt is the most expensive path for easy checks. Route small first, and escalate only when needed.
Trap"We'll just add more servers at peak."
BetterScaling helps only with rate limits and a budget. Without them, one spike starves the live calls.
Can you spot the mistake?
Spot the mistake
A design doc for the Monday peak. Which line is the mistake?
Quick check
A cracked-phone photo lands at the Monday peak. What protects the live voice calls first?
Can you answer these from memory?
Flash cards ยท tap a card to flip it
What will they ask next?
Learn it in depth
Last updated on 27 November 2026
Building an assistant for photos, voice and text?
I design and build AI products and agents, including the UI and the system behind them. Book a short call and tell me your volume, the media types you handle, and where it has to be fast.