Cisco open-sources FAPO: automatic LLM pipeline optimization with diagnosis at every step
Cisco Foundation AI has released the source code of FAPO, a system that automatically optimizes multi-step LLM pipelines. The tool runs on Claude Code: it executes a chain of prompts, finds the step where accuracy drops, proposes fixes at the level of the prompt, the parameters or the chain structure, and checks the result with an independent reviewer. In Cisco's tests, FAPO beat GEPA in 15 of 18 comparisons.
AI-processed from MarkTechPost; edited by Hamidun News
Cisco Foundation AI has made FAPO publicly available. It is an automatic prompt optimization system that works at the level of an entire pipeline rather than a single request. Claude Code handles orchestration, turning tuning into a fully autonomous loop.
Why a single prompt is not enough
Most modern AI products are not a single request to a language model but a chain of interconnected steps: one extracts data, a second classifies it, a third reasons over it, a fourth generates the final answer. When overall quality drops, finding by hand the step where accuracy is lost is a slow and unobvious task. Existing prompt optimization systems, including the popular GEPA, treat each prompt in isolation: they do not account for how changing one step affects the inputs and quality of the steps that follow. FAPO is built on a fundamentally different principle: it sees the whole pipeline and optimizes it as a connected system.
How the optimization loop works
FAPO works in four stages that repeat iteratively:
- Diagnosis: the system runs the pipeline on a test set and measures accuracy at each step. This identifies the specific step where quality is lost; the authors call it step-level failure attribution.
- Variant generation: for the problem step, FAPO proposes fixes at three levels at once: the prompt (a new wording of the instruction), the parameters (temperature, top-p) and the chain structure (adding or removing a step).
- Independent validation: each variant is evaluated by a separate LLM reviewer agent, which decides based only on metrics, free of the bias of whoever made the change.
- Iteration: the loop repeats until the target accuracy is reached or the budget of attempts runs out.
Claude Code acts as the orchestrator: it runs diagnosis in sequence, calls the variant generators, passes data to the reviewer and applies the approved changes. All of this happens without human involvement.
Benchmarks: FAPO vs.
GEPA
Cisco compared FAPO with GEPA, one of the leading methods for automatic prompt optimization. The result was convincing: FAPO won 15 of 18 comparisons across "model + task" combinations.
"The step-level error attribution approach is especially effective where the problem is not
localized in a single prompt but smeared across several transitions in the chain," the authors state in the technical documentation.
FAPO's key advantage lies in the multi-step context: GEPA and similar tools look at each prompt separately. FAPO understands that the output of one step is the input of the next, and optimizes the chain with those dependencies in mind. This is critical for agentic systems, where a change to an early step cascades through all the later ones.
What this means
Cisco has published FAPO under an open license, so the system can be deployed on your own pipelines right now. For teams building multi-step AI agents, it is a way to automate what used to take weeks of manual trial and error. The choice of Claude Code as the orchestration engine is a telling signal: corporate AI tooling is increasingly built on the Claude ecosystem.
- Dec 2, 2026Ai2 Releases MolmoWeb2 Web Agents: 27B Model Solves 75.3% of Tasks
- Dec 2, 202650 AI Models Beat 62 Teams at 'Zakovat': 48.3% Correct Answers vs 39.8%
- Dec 2, 2026Claude Fable 5.2 ran 1,000 agents for eight days and built an operating system
- Dec 2, 2026Amazon Releases Ergo Open Weights for Coding: 1.1 Trillion Parameters and 2,200 Tokens per Second
Key Questions Answered
Why a single prompt is not enough?
Most modern AI products are not a single request to a language model but a chain of interconnected steps: one extracts data, a second classifies it, a third reasons over it, a fourth generates the final answer. When overall quality drops, finding by hand the step where accuracy is lost is a slow and unobvious task. Existing prompt optimization systems, including the popular GEPA, treat each prompt in isolation: they do not account for how changing one step affects the inputs and quality of the steps that follow.
How the optimization loop works?
FAPO works in four stages that repeat iteratively: Diagnosis: the system runs the pipeline on a test set and measures accuracy at each step. This identifies the specific step where quality is lost; the authors call it step-level failure attribution. Variant generation: for the problem step, FAPO proposes fixes at three levels at once: the prompt (a new wording of the instruction), the parameters (temperature, top-p) and the chain structure (adding or removing a step).
What are the key details on Benchmarks: FAPO vs. GEPA?
Cisco compared FAPO with GEPA, one of the leading methods for automatic prompt optimization. The result was convincing: FAPO won 15 of 18 comparisons across "model + task" combinations. "The step-level error attribution approach is especially effective where the problem is not localized in a single prompt but smeared across several transitions in the chain," the authors state in the technical documentation. FAPO's key advantage lies in the multi-step context: GEPA and similar tools look at each prompt separately.
Free 2-Day Vibecoding & AI Agents Intensive
Day 1: the autonomous Hermes + DeepSeek AI agent — vibecoding and development on par with Claude Code / Codex / Gemini. Led by Jemal Hamidun, Head of AI at Alpina Digital and academic supervisor at MIPT. Right after you register with our bot Nika: the recording + 11 materials from the previous intensive.
Daily 60-sec AI Voice Brief + Weekly Production AI Agent Playbook
Listen to a 60-second AI news brief every morning and get a weekly hands-on playbook for shipping AI agents to production — tools, MCP servers and patterns that work. Curated by Jemal Hamidun, Head of AI at Alpina Digital.
