Back office ops · Production

Dropbox brings AI-powered summarization and Q&A to web file previews using Riviera and LLMs

The problem

Knowledge workers suffer from information overload and need to understand large documents, videos, and other files without reading them in full or remembering exactly how content was worded or where it was located within a file.

First attempt

An earlier summary-of-summaries (map-reduce) approach repeated information across individual summaries, caused significant loss of overall file content, and compounded hallucination risk with each additional LLM call. The initial version also did not cache embeddings, resulting in redundant LLM calls for the same document.

Workflow diagram · grounded in source
1
File preview triggers AI request
Trigger
A user previews a file on the Dropbox web interface, triggering AI-powered summarization or Q&A.
source quote
“Dropbox can generate summaries and answer questions about files when those files are previewed on the web”
2
Riviera extracts text from file
Integration
The Riviera framework converts the file from its original format to raw text through a chained plugin pipeline.
source quote
“the conversions we are interested are those that convert any file type to raw text. In the case of video, text extraction might looks something like: Video (.mp4) -> Audio (.aac) -> Transcript (.txt)”
3
Paragraph-level embedding generation
Ai action
Text is split into paragraph-sized chunks and an embedding vector is calculated for each chunk.
source quote
“we split the text into paragraph-sized chunks and calculate an embedding for each chunk”
4
K-means clustering for summarization
Ai action
The summarization plugin uses k-means clustering to group text chunks into semantically distinct clusters representing the file's main ideas, then sends representative context to the LLM.
source quote
“Our summarization plugin takes the chunks and associated embeddings from the embeddings plugin and uses k-means clustering to group the text chunks from the file into clusters in this multi-dimensional embedding space. With this method, we can organize data into …”
5
Similarity-based chunk retrieval for Q&A
Ai action
The Q&A plugin generates a new embedding for the user's question and selects the text chunks most semantically similar to the query.
source quote
“The Q&A plugin takes in the embeddings and text chunks from the embedding plugin and generates a new embedding for the user question. Then for each chunk of file text it computes the distance to the query text embedding. By …”
6
LLM generates response with follow-up questions
Ai action
The LLM generates a summary or answer and simultaneously produces context-relevant follow-up questions via function calling and structured outputs.
source quote
“we also request context-relevant follow-up questions from the LLM. In testing we found that follow-up questions allow the user to more naturally learn about a file and the topic they are interested in. To gather these follow-up questions, we utilize …”
7
Output returned with source references
Output
The answer or summary is returned to the user along with references to the specific file chunks that contributed to the response.
source quote
“The relevant chunk locations are then returned to the user as sources, allowing them to reference the specific parts of the file that contributed to the answer”
Reported outcome

After optimization, cost-per-summary dropped by 93% and cost-per-query dropped by 64%.
P75 latency for summaries decreased from 115 seconds to 4 seconds, and p75 latency for queries decreased from 25 seconds to 5 seconds, making the feature more affordable and more responsive for users.

Reported metrics
Cost-per-summary reduction93%
Cost-per-query reduction64%
P75 summary latencyfrom 115 seconds to 4 seconds
P75 query latencyfrom 25 seconds to 5 seconds
Show all 7 reported metrics
cost-per-summary reduction93%
cost-per-query reduction64%
p75 summary latencyfrom 115 seconds to 4 seconds
p75 query latencyfrom 25 seconds to 5 seconds
topic diversity vs map-reduceapproximately 50% more
Riviera daily requestsabout 2.5 billion requests per day
supported file type conversionsabout 300 file types
Reported stack
RivieraLLMsk-means clustering
◆ Does this fit your context?

Compare to your context

Tell us your scale, team, and constraints. We'll show what changes at your size, what fails at your scale, and whether this case is a fit, needs adaptation, or won't scale to you. Free demo, no signup.

Compare to your context →
~30 seconds · free
Source
https://dropbox.tech/machine-learning/bringing-ai-powered-answers-and-summaries-to-file-previews-on-the-web
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

After optimization, cost-per-summary dropped by 93% and cost-per-query dropped by 64%.

What tools did this team use?

Riviera, LLMs, k-means clustering.

What results were reported?

Cost-per-summary reduction: 93%; Cost-per-query reduction: 64%; P75 summary latency: from 115 seconds to 4 seconds; P75 query latency: from 25 seconds to 5 seconds (source-reported, not independently verified).

What failed first in this deployment?

An earlier summary-of-summaries (map-reduce) approach repeated information across individual summaries, caused significant loss of overall file content, and compounded hallucination risk with each additional LLM call.

How is this back office ops AI workflow structured?

File preview triggers AI request → Riviera extracts text from file → Paragraph-level embedding generation → K-means clustering for summarization → Similarity-based chunk retrieval for Q&A → LLM generates response with follow-up questions → Output returned with source references.

WHAT TO DO WITH THIS

Now compare it to your context

This case is one data point. Whether its pattern fits you depends on your volumes, your stack, and your exception load — that comparison is the step no case study can do for you.