# Harvey's Playbook for Competing With Frontier AI Labs | Gabe Pereyra <!-- ref: @content/youtube/sequoia/2026-08-11-harvey-s-playbook-for-competing-with-frontier-ai-labs version: 3 updated_at: 2026-10-31T19:08:44.127Z --> Gabe Pereyra (Sequoia Capital (Training Data), 2026-08-11): Pereyra calls this talk "building a research lab on a budget." An application-layer company can't outspend frontier labs on money, talent, compute, or data. **[Watch on YouTube](https://www.youtube.com/watch?v=MGouk8W51v0)** *Synthesized from Gabe Pereyra on Sequoia Capital (Training Data), 2026-08-11.* Gabe Pereyra is co-founder and president of Harvey, the legal AI company, and previously worked as a research scientist at Google Brain, DeepMind, and Meta before co-founding Harvey with their college roommate. ## Core Thesis Pereyra calls this talk "building a research lab on a budget." An application-layer company can't outspend frontier labs on money, talent, compute, or data. However, it can now reach frontier-level performance on its own domain by leaning on the surrounding ecosystem. That ecosystem includes strong open-source base models, "neolab" post-training partners, data vendors, and hosted training and serving infrastructure. Pereyra's sequence is strict: build benchmarks first, then post-train, then serve. The serving and evaluation machinery should exist before any custom model does. ## Key Insights **Step 1: Benchmarks and training data come first** - Pereyra's ordering logic: without a good benchmark you can't train models, and without trained models there is nothing to serve. - Harvey released three datasets this year: - **Legal Agent Bench**: a taxonomy of tasks done by associates at large law firms. It spans multiple practice areas and includes complex work such as drafting fund formation documents and doing case-law research. - **A contracting dataset**: teaches agents to negotiate the way an in-house legal department would. - **A large due-diligence dataset**: Pereyra calls it one of the largest RL environments released publicly. Its largest data rooms reach **80 million tokens**, which supports research on long-context, highly complex tasks. - **Core constraint:** Harvey cannot train on customer data. Law firm and enterprise data is privileged. It can't go into generic models, and it can't go into Harvey's own models either. - **The unlock: domain experts steering synthetic data generation.** Pereyra borrows an analogy from Brendan of Reka. Engineers now guide coding models instead of writing code by hand, and lawyers can do the same to generate data. - Pereyra's younger brother is a lawyer at Harvey and one of its first hires. He became skilled with coding models and trained other Harvey lawyers to produce highly realistic datasets, used both for training and for evaluating the product. - **Synthetic data is a starting point, not the finish line.** Harvey scales the process with **Mercor** and **Snorkel** to build larger sets, particularly for training. - **RL environments must be made cheap to run.** The diligence dataset uses **1,000+ unit tests** that grade outputs with an LLM-as-judge. Running RL rollouts with the largest judge models gets very expensive, so Harvey worked with **LangChain** on efficiency. - **Open-sourcing the datasets (initially controversial).** Pereyra's reasoning comes from his Google Brain and DeepMind years: - You only learn whether a dataset is good once many people train on it. ImageNet, CIFAR, and MNIST are the examples. - Harvey now receives pull requests and suggestions on the datasets. - Frontier labs increasingly report new-model results on Harvey's benchmarks. - Pereyra joked that the most important outcome was an Elon Musk retweet. **How the planted-issue data rooms work (from Q&A)** - **The problem:** M&A diligence data rooms can hold around **10,000 contracts** plus negotiation emails and meeting records, and none of it is public. Sometimes the final output exists publicly, such as a public purchase agreement, but the inputs never do. Asking lawyers to hand-build a coherent fake data room used to be impractical. - **Julio's method works backward from the rubric:** 1. Write the rubric first, listing the issues a reviewer should catch. Examples: contracts that don't tie together, or a missing contract. 2. Plant those issues deliberately into a generated data room. 3. Use Mercor and Snorkel to make the contracts look realistic. 4. Have the model write a diligence memo. 5. Grade the memo on whether it caught every known, planted issue. - **Why this mattered commercially:** It broke a chicken-and-egg standoff. Firms had asked Harvey to prove it could train on their data, and they refused to share data for that proof. Now Harvey can demonstrate results on synthetic data, and firms are asking to run the same process on their own data. - **Rubric difficulty comes from realism, not from targeting the models.** Asked how experts design rubrics that separate frontier models, Pereyra said the aim is simply realistic client work. In legal, a faithful reproduction of a top-firm matter is already beyond today's frontier models. Pereyra's brother has worked with the models for **4 years**, and that experience shapes how he generates data. **Step 2: Post-training on open-source models** - **Why post-training pays off now:** Previously, each new pretrained model quickly absorbed any gains from post-training. Today's open base models are strong enough to post-train to frontier level on a narrow task, though not as general models. Pereyra named **Kimi 3, GLM 5.2, NeMo-Megatron, and Inkling**. - **Start with neolabs.** They already have infrastructure and training recipes. Pereyra's diagnostic: if a neolab partner can't improve your results, the problem is probably in your dataset. - **Harvey's partner projects:** - **Fireworks:** training **GLM 5.1** to consult **Fable or Opus 4.8** as an advisor model. - **Baseten:** KV compaction. - **N gram:** enterprise search and firm knowledge. - **Trajectory:** training NeMo-Megatron models. - **Applied Compute:** work on Harvey's **Vault** product. - **Why work with several neolabs instead of one:** - Harvey has more research projects than its internal team or any single partner can handle. - Each neolab is making a different research bet. - Harvey wants to train different open-source base models. - More partners means more learning. - **Harvey increasingly post-trains in-house as well.** It uses **Tinker**-style APIs and the Fireworks and Baseten infrastructure, and post-training talent is becoming easier to hire. - **The target, modeled on Cursor:** Harvey wants its own equivalent of Cursor's **Composer 1**. That means one in-house model combining the synthetic data work, Mercor scaling, and neolab research, served alongside the closed models. **Step 3: Serving in production** - **Serving was already hard before any custom model.** Harvey operates in **60 countries**, has multiple product surfaces, and serves customers with differing model preferences. - **What the serving layer handles:** a matrix of model families, several models within each family, and fallbacks across providers to meet SLAs. Fireworks now lets Harvey add open-source models to that mix. - **Pre-production gates (identical for post-trained and off-the-shelf models):** - **Generic, automated:** the legal benchmark gives a fast read on whether a model is frontier-class and which legal areas it handles well. - **Generic, human:** side-by-side comparisons against other models. - **Product-specific, automated:** critical user journeys and automated tests for each product surface. A model can be strong in general and still be a poor fit for a particular surface. - **Product-specific, human:** hands-on testing by people in each product. - **Heuristics:** cost, latency, and regional availability. - **In-production gates:** A/B tests for large rollouts, engagement tracking, uptime, and token efficiency. Pereyra also tracks "product feedback," which they call angry customer emails. - **"Simple open-source switches" to make before post-training:** 1. **Naive swaps.** Find spots where a smaller open model is enough. Example: Harvey's citation-generation features don't need the largest models, so GLM 5.2 can replace them for cost or performance gains. Doing this builds the operational muscle of running open and closed models side by side. 2. **Model routing.** Where a full swap isn't possible, route certain queries to open-source models. - **Then the flywheel starts:** serve, collect feedback, improve. Pereyra stresses that for Harvey "feedback" never means training on customer data. It means signals from user testing and similar sources, which guide how future datasets are built. **Debugging the end-to-end pipeline (from Q&A)** - **Product-market fit came first.** Harvey achieved it on closed models, which gave confidence the whole system worked before any custom training. - **Post-training is a small input to a larger system.** That system includes harness engineering, context management, and the model-onboarding process. A post-trained model is treated as just another new model. - **Staged gates make failures easy to locate.** If a model underperforms on the benchmarks, it stops there. - **Overfitting is the classic failure.** A model can score well on benchmarks and still break down out of distribution, for example in a general assistant-style product. **Open problems Pereyra wants help with** 1. **Distribution mismatch.** Synthetic sets are somewhat future-facing. A model may excel at a diligence data room, but real usage includes things like drafting emails. Harvey can't inspect customer data to close that gap. 2. **Very long context.** Models handle an 80M-token data room poorly. Training them to manage context in complex environments remains a large performance gap. 3. **Continual learning with privacy.** Pereyra says the end goal is not the best legal model. It is letting each firm's system improve with every client matter while client data stays protected. Pereyra calls this a technical, operational, and AI challenge all at once. **Talent and strategy** - **Pereyra's early hiring mistake:** recruiting former frontier-lab colleagues when those people were getting **$100M+** pay packages, at a stage when Harvey couldn't justify matching that. - **Why the talent pool is wider now:** - Harvey is reaching a size where it can hire PhDs and researchers who prefer not to work at large labs. - Early on, the scarce skill was building training and serving infrastructure, not just post-training. Fireworks and Tinker-like APIs now cover much of that. Pereyra notes their former roommate helped run post-training at OpenAI. - **Why open-source the benchmarks:** - Customers learn which models are good at which tasks. Pereyra originally expected a single "best model" to satisfy everyone, but customer preferences differ widely. - The flood of ecosystem vendors can test their techniques on the open data first, which saves Harvey bandwidth when screening them. - The truly strategic data is in helping law firms train systems on their own private data. - **How Harvey competes with horizontal products such as Claude Cowork:** - Horizontal tools target individual productivity. Harvey targets organizational productivity. - A large firm juggles **10,000 clients** and needs every matter to go well and stay profitable. - A single matter can run **6 months** with **20–30 people**, plus outside parties. That looks like project management that orchestrates both humans and agents. - At firm level, there are **thousands of matters**, raising questions of resource allocation, billing, and pitching. - A Fortune 500 company may work with **a thousand law firms** and a thousand internal staff. - Pereyra's answer is to go hyper-vertical in ways horizontal products won't. ## Actionable Takeaways 1. **Build the benchmark before anything else.** Have domain experts use coding models to generate realistic synthetic tasks. Then scale with vendors like Mercor or Snorkel, especially for training-scale sets. 2. **Generate data from the rubric backward.** Write the rubric first, plant known issues into synthetic inputs, make the inputs look realistic, and grade on whether the model catches the planted issues. This works when the real inputs are private. 3. **Optimize grading costs early.** With 1,000+ LLM-as-judge unit tests, large judge models make RL rollouts expensive. 4. **Consider open-sourcing part of your benchmark.** Outside usage surfaces errors through pull requests, attracts frontier-lab reporting, and lets ecosystem vendors prove their techniques without using your bandwidth. 5. **Stand up evaluation and serving infrastructure before post-training:** - Pre-production: generic automated benchmark, generic human side-by-sides, per-surface critical user journeys and automated tests, per-surface human testing, plus cost, latency, and region checks. - Post-production: A/B tests, engagement, uptime, token efficiency, and customer complaints. 6. **Make the "simple open-source switches" next.** First, naively swap open models (e.g., GLM 5.2) into low-demand features such as citation generation. Second, add model routing for queries that suit open models. 7. **Begin post-training with a neolab partner** (e.g., Fireworks, Baseten, Trajectory, Applied Compute) on a strong open base such as Kimi 3, GLM 5.2, or NeMo-Megatron. If a partner can't move the numbers, check your dataset first. Run several partners in parallel when projects exceed capacity. 8. **Bring post-training in-house gradually** using Tinker-style APIs and hosted training and serving from Fireworks or Baseten. The goal is a Composer 1–style house model served next to closed models. 9. **Treat each post-trained model as just another new model** in the existing gate pipeline. Watch specifically for benchmark overfitting that fails out of distribution in general-assistant surfaces. 10. **Never let "feedback" mean training on customer data** in regulated domains. Use user-testing signals to shape future synthetic datasets. 11. **Hire for post-training, not frontier pretraining.** Recruit PhDs and researchers who prefer smaller companies, and let managed infrastructure replace the rare infra-plus-research hires. 12. **Against horizontal agents, differentiate on organizational workflows:** matter-level orchestration of humans and agents, plus firm-level resource allocation and billing. ## Notable Quotes > "It's an unfair game competing with the frontier labs if you're an application layer company." — Gabe Pereyra > "If you don't have a good benchmark, you can't train models, and if you can't train models, you don't need to serve them in production." — Gabe Pereyra > "Synthetic data isn't good enough, but it's a way to get started." — Gabe Pereyra > "It's never been easier to post train these models and then serve them." — Gabe Pereyra > "We think in the future every company is going to need to become an AI company and figure out some version of this playbook." — Gabe Pereyra > "But if we win on this budget with this team we'll have changed the game." — Gabe Pereyra (quoting Billy Beane in *Moneyball*) --- *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).*