PatEx-Gym Teaches AI Agents to Hunt for Patent Prior Art: 1 Million Patents and a 4B Model

A team of researchers led by Qiyao Wang has released PatEx-Gym, the first environment for developing and evaluating AI agents acting as patent examiners. The agent independently searches for prior art, reads documents, rewrites queries, and drafts an Office Action with a novelty assessment. At the core of the environment is a 1,000-task benchmark and two corpora: more than 1 million patents and 52,000 scientific papers. A 4-billion-parameter agent, trained on synthetic trajectories, reportedly competes with significantly larger general-purpose agents, according to the authors. • PASS synthesizes search trajectories without manual annotation • Final verdict accuracy poorly reflects the quality of the examination • Code and project page are open on GitHub

AI-processed from Hugging Face Daily Papers; edited by Hamidun News
PatEx-Gym Teaches AI Agents to Hunt for Patent Prior Art: 1 Million Patents and a 4B Model
Source: Hugging Face Daily Papers. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceHugging Face Daily Papers ↗
Editor-in-Chief
Key metric #1PASS synthesizes search trajectories without manual annotation
Key metric #2Final verdict accuracy poorly reflects the quality of the examination
Key metric #3Code and project page are open on GitHub

Patent examination has long been considered one of the most awkward tasks for AI. It requires finding rare documents that undermine the novelty of an application, sifting through millions of texts spanning different technical fields to do so. A team of researchers — Qiyao Wang, Xinyi Chen, Hongbo Wang, Jiayuan Lu, Jianhang Li, Minghuan Tan, Yuan Lin, and Min Yang — has introduced PatEx-Gym. It's the first environment where an agent follows the entire path of an examiner: searching, reading, reasoning, and reaching a final conclusion. The environment includes 1,000 realistic tasks, a corpus of more than 1 million patents, and 52,000 scientific papers. The reference agent, PatEx-Agent, has just 4 billion parameters.

Why old benchmarks didn't reflect real examiner work

Most existing tests hand the model a ready-made, limited set of candidates. The task boils down to picking the right one from what's already shown. A real examiner works differently. They formulate a query, review the results, open documents, realize they searched for the wrong thing, and reformulate the search. The outcome is documented in an Office Action, an official ruling where the novelty conclusion must be grounded in specific sources.

PatEx-Gym transfers this logic into an interactive environment. The agent uses search tools, "visits" documents, reasons through the problem, and finally generates a conclusion. The authors call this a long-horizon task: an error made early in the search can't be fixed later by a polished final write-up.

What makes up PatEx-Gym

The framework combines three components, built on four artifacts:

  • PatEx-Bench — a benchmark with 1,000 realistic examiner tasks, two large search corpora (over 1 million patents and 52,000 scientific papers), and an executable environment. The environment supports iterative search, document visits, reasoning, and Office Action generation.
  • PASS (Prior-Art Agentic Search Trajectory Synthesis) — a method for synthesizing training search trajectories without manual annotation. It uses document visits as an implicit relevance signal and as anchor points for gathering evidence. These signals are used to model three levels: query behavior within a single turn, how the search evolves across turns, and the quality of evidence and outcome across the entire trajectory.
  • PatEx-SynData — a dataset produced via PASS from selected trajectories.
  • PatEx-Agent — a 4-billion-parameter agent trained through supervised fine-tuning on these trajectories. The authors position it as a lightweight baseline.

The move to PASS shows how to avoid costly manual annotation. Instead of asking experts to describe the correct search path, the method simply takes which documents the agent opened and treats that as a signal that they were useful.

What the experiments showed

The main finding concerns metrics: final accuracy on the binary "novel or not novel" decision poorly reflects the quality of the examination. A model can reach the correct verdict without having found the key documents, and such a conclusion is legally weak. That's why PatEx-Bench also evaluates the process itself, including prior-art discovery.

This part turned out to be the hardest. Finding rare, relevant documents remains a challenge even for strong frontier models. At the same time, PatEx-Agent at 4B, after training on PatEx-SynData, reportedly delivers results competitive with substantially larger general-purpose agents, according to the authors. For a narrow professional task, that's an argument in favor of specialized smaller models.

The authors see patent examination as a demanding testbed for agentic search and deep-research agents. The task combines long action chains, ambiguous relevance, and the need to document conclusions.

Who can use this right now

The code is published in the AIforIP/PatEx-Gym repository, and there's also a project page. Teams building deep-research agents or search systems for technical literature now have a ready-made testbed with a thousand tasks and a large corpus. Patent offices and law firms can use it to compare tools not just by verdict but by the evidence found. For model developers, the real value lies in the PASS approach itself: it shows how to build training data for agents from behavioral logs without manual annotation.

Story

Key Questions Answered

Why old benchmarks didn't reflect real examiner work?

Most existing tests hand the model a ready-made, limited set of candidates. The task boils down to picking the right one from what's already shown. A real examiner works differently. They formulate a query, review the results, open documents, realize they searched for the wrong thing, and reformulate the search. The outcome is documented in an Office Action, an official ruling where the novelty conclusion must be grounded in specific sources. PatEx-Gym transfers this logic into an interactive environment. The agent uses search tools, "visits" documents, reasons through the

What makes up PatEx-Gym?

The framework combines three components, built on four artifacts: PatEx-Bench — a benchmark with 1,000 realistic examiner tasks, two large search corpora (over 1 million patents and 52,000 scientific papers), and an executable environment. The environment supports iterative search, document visits, reasoning, and Office Action generation. PASS (Prior-Art Agentic Search Trajectory Synthesis) — a method for synthesizing training search trajectories without manual annotation. It uses document visits as an implicit relevance signal and as anchor points for gathering evidence. T

What the experiments showed?

The main finding concerns metrics: final accuracy on the binary "novel or not novel" decision poorly reflects the quality of the examination. A model can reach the correct verdict without having found the key documents, and such a conclusion is legally weak. That's why PatEx-Bench also evaluates the process itself, including prior-art discovery. This part turned out to be the hardest. Finding rare, relevant documents remains a challenge even for strong frontier models. At the same time, PatEx-Agent at 4B, after training on PatEx-SynData, reportedly delivers results competit

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…