How Scribd Classified 400M+ Documents on Gemini Enterprise

Scribd, Inc. ran trust and safety classification across its entire user-generated content corpus — more than 400 million documents and 12 billion pages on Scribd and Slideshare — using Gemini Enterprise batch prediction. The corpus-wide backfill completed in a matter of months, with Google Cloud scaling batch throughput to meet the timeline. Native PDF input meant more than 99% of the corpus was processed as-is, with no OCR, rendering, or screenshotting pipeline to build. Gemini Enterprise’s batch prediction, priced at a 50% discount to interactive rates, made LLM classification viable at corpus scale.

The problem was that document understanding requires reading text and images together in context, across all languages and use cases. Historically, each policy area required its own specialized detection model, which meant either years of in-house engineering or vendor solutions that did not fit the economics of a 400-million-document backfill. The team evaluated several off-the-shelf moderation tools and open models, but none delivered the needed quality at that scale. Gemini collapsed the work into one model, one prompt, and one pipeline, as Scribd Senior Engineering Manager Sachin Sebastian put it.

The key technical advantage was treating PDFs as first-class input. Gemini reads each PDF page as both text and image, so a single multimodal model could handle dense text documents and image-heavy presentations without OCR, page rendering, or screenshot infrastructure. Each PDF page processes at a fixed, predictable token count, so costs scale linearly across 12 billion pages. After benchmarking model families, Scribd selected Gemini 2.5 Flash Lite as the classification workhorse, with Gemini 2.5 Pro acting as an LLM judge in a second consistency pass to validate output quality. In the team’s evaluations, Gemini’s multimodal understanding caught visual policy signals that text-only moderation endpoints routinely missed.

The execution model was deliberately simple: documents staged in Cloud Storage, submitted to Gemini Enterprise batch prediction, with results flowing into the team’s data platform for downstream analysis. No serving infrastructure, rate-limiting logic, or GPU capacity management was required. Batch pricing made the economics work, and the team later used Gemini Enterprise’s implicit prefix caching by restructuring prompts so static policy text hit the cache, further improving efficiency without loss of classification quality.

Processing 400 million documents was ultimately a throughput problem, and the partnership with Google Cloud mattered throughout. Scribd connected with Google Cloud engineering and product teams to plan the backfill, advise on region strategy, and ensure capacity was in place before launch. As the backfill ramped up, Google Cloud scaled throughput to match demand. For much of the run, Gemini Enterprise was not the bottleneck — Scribd’s own upstream pipeline was.

The backfill is now the foundation of an ongoing program: newly uploaded content flows through the same Gemini classification pipeline, keeping the corpus continuously evaluated rather than periodically cleaned. Because the pattern of PDFs in Cloud Storage, Gemini batch prediction, and results in the lakehouse proved operationally simple, the team is applying it to a growing set of content-understanding workloads. As Sebastian summarized: work previously classified as multi-year, multi-team efforts is now a prompt, a batch pipeline, and a few weeks of runtime.

Scribd, Inc. classifies millions of documents on Gemini Enterprise

View Original