Cisco AI、FAPO(パイプライン対応プロンプト最適化)を発表:ステップごとの失敗特定とClaude Codeによるオーケストレーションを実現
本文の状態
日本語全文を表示中
詳細モードで約12分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
MarkTechPost
Cisco AIは、LLMアプリケーションの信頼性向上を目的とした「FAPO」というシステムを導入した。これはClaude Codeを活用し、多段階パイプラインにおける各ステップの失敗箇所を特定しながらプロンプトを自動最適化する技術である。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
信頼性の高い LLM アプリケーションをリリースする上で、プロンプトを正しく設計することは依然として最も困難な部分です。わずかな言葉の使い方の違いで精度が 20% も変動することがあります。数例では機能しても、スケールすると破綻してしまうケースも少なくありません。多段階パイプラインが誤った回答を返した際、どのステップで失敗したかを特定するには、手動で中間出力を検証する必要があります。
Cisco AI はこのボトルネックに対処するため FAPO を導入しました。FAPO とは Fully Automated Prompt Optimization(完全自動化プロンプト最適化)の略称です。これは Claude Code を駆使したシステムであり、ベースラインのプロンプトから目標精度に至るまで LLM パイプラインを最適化するものです。ユーザーはデータセットと初期プロンプトを提供します。FAPO はその後、評価を行い、失敗を分類し、バリエーションを提案し、それらを検証して反復処理を行います。この一連のループ全体は Claude Code エージェントによってオーケストレーションされます。本プロジェクトは Apache 2.0 ライセンスの下でオープンソースとして公開されており、最適化エージェントとして Codex もサポートしています。
Cisco が報告した評価では、FAPO は最先端のプロンプトオプティマイザである GEPA を、18 のモデル・ベンチマーク比較のうち 15 で上回りました。FAPO がパイプラインの変更へとエスカレーションした 2 つのベンチマークにおいては、GEPA に対する平均的な改善幅は +33.8 ポイントに達しました。
TL;DR(要約)
FAPO は、Apache 2.0 ライセンスの下でオープンソース化された、Claude Code を駆使したシステムです。これはベースラインのプロンプトから目標精度に至るまで、多段階 LLM パイプラインを自律的に最適化するものです。
このシステムは、ステップレベルの失敗帰属(step-level failure attribution)を用いて次の変更対象を判断し、3 つのレベル(プロンプト→パラメータ→チェーン構造)へとエスカレーションします。
Cisco の評価では、FAPO は 18 のモデル・ベンチマーク比較のうち 15 で GEPA を上回り、平均的な改善幅は +14.1 ポイントとなりました。
HoVer および IFBench ではパイプライン変更へとエスカレートしましたが、FAPO は 6 つのペアすべてで勝利し、平均獲得率は +33.8 ポイントポイントとなりました。AIME については GEPA の唯一の勝利であり、これはサンプリングノイズの範囲内です。
過学習に対するガードレールとしては、トレーニング分割のみでの検査、変更不可能なバリアントファイル、および各提案に対する独立したレビューヤーが挙げられます。
FAPO とは何か
FAPO はマルチテナント型の評価・最適化フレームワークです。テナントとは、自己完結型の最適化プロジェクトを指します。各テナントディレクトリには、1 つのタスクに関するプロンプト、データセット、チェーン定義、スコアラー、設定ファイルが格納されます。テナントは相互に隔離されているため、無関係なタスクも干渉することなく並列して最適化できます。
中核となるエンジン名は hephaestus であり、ドメインに依存しません。評価、チェーンの実行、スコアリングを処理します。チェーンは LangGraph の状態グラフ(state graphs)で構成され、各テストケースを処理します。標準機能として FAPO は 3 つのプロバイダーをサポートしています:OpenAI、Baseten、SageMaker です。
ユーザーが用意しなければならない入力はデータセットのみです。これは成功の基準となるペア入力と期待される出力から成ります。FAPO はこれを検証用セット(validation set)と保持されたテストセット(held-out test set)に分割します。検証用セットは反復処理を駆動し、テストセットは最終的なワンショット評価(one-shot evaluation)のみで使用されます。タスクの説明から Claude が残りの部分を構築できます:初期プロンプト、チェーン、スコアラーです。
最適化ループの仕組み
構成要素が整うと、FAPO は目標精度に達するまでクローズドループを実行します。各サイクルは 6 つのステージで構成されます:
評価(Evaluate)— データセット上でチェーンを実行し、ケースごとのスコアおよびステップレベルでの出力を収集します。
属性分類 — ルールベースのヒューリスティックと LLM(大規模言語モデル)分析を用いて、失敗の原因を分類する。
提案生成 — 支配的な失敗クラスターを対象としたバリアントを生成する。
レビュー — 独立したエージェントが、提案のスコープ適合性とデータ漏洩の有無を検証する。
比較 — 前回の最良結果よりも改善された場合のみバリアントを採用し、そうでなければ却下する。
反復 — 目標精度に達するか、最適化予算が尽きるまで継続する。
システムは3つの段階で動作します。プロンプト編集はコストが最も低く最初に試されます。パラメータ変更は、retrieval_k や temperature などの設定値を調整します。構造変更は、自己反省ノードの追加や ReAct パターンへの切り替えなど、チェーンのトポロジーを変更するものです。FAPO は1つのレベルを使い果たしてから次の段階へエスカレーションします。
ステップ帰属分析により、失敗は4 つのクラスに分類されます。検索失敗では空または無関係なコンテンツが返されます。カスケード失敗は、初期のステップで空の出力が生じた場合に発生します。フォーマット失敗では、正解がスコアラーが解析できないテキスト内に隠されています。推論失敗では、良い入力であっても誤った結論が導き出されます。フォーマットと推論の問題はプロンプトで対応可能です。検索とカスケードの問題は構造変更で対応可能です。
ガードレールにより、最適化が過学習するのを防ぎます。トレーニング分割のケースのみを検査し、検証セットとテストセットでは集計スコアのみを公開します。各バリアントは新しい不変ファイルとして作成され、その場で編集されることはありません。実行前に独立したレビューアーが各提案をチェックします。
ベンチマーク事例:FAPO と GEPA の比較
Cisco チームは、FAPO を最先端のプロンプト最適化手法である GEPA(Generalized Evolutionary Prompt Architecture)と比較評価しました。GEPA は、遺伝的演算子を用いた進化的探索により、多段階パイプライン向けにプロンプトを最適化するアプローチを採用しています。両システムとも、同一のベースラインパイプラインとプロンプトから開始されました。FAPO は、失敗原因帰属分析によってボトルネックが特定された場合に、構造的変更へとエスカレートすることが可能でした。一方、GEPA はプロンプトレベルでの最適化に限定されていました。
比較は 6 つのベンチマークと 3 つのタスクモデル(GPT-4.1-mini、GPT-5.4-mini、Gemma 3-12B)にわたって行われました。Claude Opus 4.6 は、FAPO のオーケストレーターおよび GEPA のリフレクターとして両方の役割を担いました。以下のスコアは、3 つのタスクモデル全体で平均化された値です。
ベンチマーク | ベースライン | GEPA | FAPO | GEPA に対する改善幅
HoVer | 35.9 | 48.5 | 83.8 | +35.3 ポイント
IFBench | 35.7 | 48.5 | 80.7 | +32.2 ポイント
LiveBench-Math | 51.0 | 52.6 | 62.0 | +9.4 ポイント
HotpotQA | 50.9 | 61.8 | 68.3 | +6.5 ポイント
Papillon | 73.6 | 90.7 | 94.9 | +4.2 ポイント
AIME | 16.7 | 16.0 | 12.9 | -3.1 ポイント
FAPO は、18 のモデル・ベンチマーク比較のうち 15 で勝利し、GEPA に対する平均改善幅は +14.1 ポイントでした。特に FAPO がパイプライン変更へとエスカレートした HoVer と IFBench では、6 つのすべてのモデル・ベンチマークペアで勝利を収め、その平均改善幅は +33.8 ポイントに達しました。構造的変更が行われなかった 4 つのベンチマークにおいても、FAPO はプロンプト最適化のみによって 12 の比較のうち 9 で勝利しました。GEPA が上回ったのは AIME のみで、その差は 3.1 ポイントでした。この差は、確率的試行全体における標準偏差よりも小さいものです。
能力比較により、Cisco が報告した設計上の違いが示されています。以下の各行は、2 つのシステムのソース記述を反映しています。
| 能力 | GEPA | FAPO |
|---|---|---|
| 最適化レベル | プロンプトテキストのみ | プロンプト → パラメータ → 構造 |
| チェーン構造の変更可否 | いいえ | はい(アトリビューションでボトルネックが特定された場合) |
| 駆動方法 | 遺伝的演算子による進化探索 | Claude Code または Codex エージェントループ |
| 18 のモデル・ベンチマークペア全体での結果 | リファレンス | 18 件中 15 件で勝利;平均 +14.1 ポイント |
適用場面:ユースケース
FAPO は単一のプロンプトではなく、多段階の LLM パイプラインを対象としています。いくつかの具体的な例を挙げます。
マルチホップ質問応答:チェーンが文書を検索し、事実を抽出し、証拠に基づいて推論し、回答をフォーマットします。Cisco のドキュメントに記載されたウォークスルーでは、2 回の反復を経て、マルチホップ QA チェーンの検証完全一致率が 39.3% から 70.3% に向上しました。その後、アトリビューションにより残りの失敗が検索制限に起因するものとしてフラグされ、構造的な修正が必要であることが示されました。一方、HotpotQA ベンチマークでは、FAPO はテスト精度 68.3% を達成し、GEPA の 61.8% を上回りました。
指示の遵守:IFBench において、フォーマット制約への失敗により FAPO はプロンプトを超えてエスカレートし、テスト精度 80.7% に到達しました。
分類:ソフトウェア名をカテゴリに割り当てるタスクは Claude Code によってスキャフォールディングされ、その後、完全一致目標に向けて最適化されます。
ReAct エージェント:MCP ワークフロー拡張により、トラジェクトリスコアリングと LLM-as-Judge スコアリングを用いて、ツール呼び出しを行う ReAct エージェントが最適化されます。
始め方
最速の道は、Claude Code にテナントファイルを作成させることです。リポジトリから、平文の英語でタスクを記述し、JSONL データセットを追加します。各行は 1 つのテストケースであり、case_id、task_type、context、expected、metadata を含みます:
Copy CodeCopiedUse a different Browser
{"case_id": "1", "task_type": "qa", "context": {"question": "What is the capital of France?"}, "expected": {"answer": "Paris"}, "metadata": {}}
{"case_id": "2", "task_type": "qa", "context": {"question": "What is 2 + 2?"}, "expected": {"answer": "4"}, "metadata": {}}
スコアラーは、チェーンの出力を期待される答えと比較します。これは早期に不良データを検出するために validate_case を実装し、複合スコアを返すために score_case を実装しています:
Copy CodeCopiedUse a different Browser
from hephaestus.scoring.scorer import Scorer as BaseScorer
class Scorer(BaseScorer):
def validate_case(self, case, scoring_profile):
assert "answer" in case.expected, "Missing 'answer' in expected"
def score_case(self, case, output_text, scoring_profile):
expected = case.expected["answer"].strip().lower()
predicted = output_text.strip().lower()
em = 100.0 if predicted == expected else 0.0
return {"composite_score": em, "score_breakdown": {"exact_match": em}}
ベースライン評価でセットアップを検証します:
Copy CodeCopiedUse a different Browser
export OPENAI_API_KEY="sk-..."
python -m hephaestus.cli eval --config tenants/my_project/configs/eval.json
翻訳全文
テナント、設定、および複合スコア >= 90 のような成功基準を指定して最適化エージェントを呼び出します。Claude Code はスコープ契約を作成し、その後自律的に反復処理を行います。各プロンプト変種、設定、および変種ごとの分析はディスクに書き込まれるため、各実行は監査可能となります。後には FAPO Explorer と呼ばれるローカルの読み取り専用 UI がアーティファクトを閲覧します。
強みと弱み
強み
パイプライン認識スコアリングでは、失敗の原因が最終出力ではなく、失敗を引き起こしたステップに帰属されます。
プロンプト単独では解決できない失敗に対して、3 段階のエスカレーション処理が行われます。
過学習を防ぐためのガードレール:トレーニング分割のみの検査、不変の変種、および独立したレビューアーが用意されています。
Apache 2.0 ライセンスの下でオープンソース化されており、Claude Code と Codex の両方がサポートされています。
弱み
最適化の品質は、あなたが供給する必要があるデータセットの品質とカバレッジによって制限されます。
プロジェクトは比較的新しいため、独立した実運用での実績はまだ限られています。
デフォルトのループは、スタンドアロンのオプティマイザではなく、エージェント型コーディングツール(Claude Code または Codex)に依存しています。
インタラクティブな解説
原文を表示
Getting prompts right is still the hardest part of shipping reliable LLM applications. Small wording changes can swing accuracy by 20 percent. What works on a few examples often breaks at scale. When a multi-step pipeline returns a wrong answer, finding the failing step means inspecting intermediate outputs by hand.
Cisco AI introduced FAPO to address that bottleneck. FAPO stands for Fully Automated Prompt Optimization. It is a Claude Code-driven system that optimizes LLM pipelines from baseline prompts to target accuracy. You supply a dataset and an initial prompt. FAPO then evaluates, classifies failures, proposes variants, validates them, and iterates. The whole loop is orchestrated by Claude Code agents. The project ships open source under Apache 2.0, and also supports Codex as the optimization agent.
In Cisco’s reported evaluation, FAPO beat GEPA, a state-of-the-art prompt optimizer, on 15 of 18 model-benchmark comparisons. On the two benchmarks where FAPO escalated to pipeline changes, the mean gain over GEPA reached +33.8pp.
TL;DR
FAPO is a Claude Code-driven system that autonomously optimizes multi-step LLM pipelines from baseline prompts to target accuracy, open source under Apache 2.0.
It escalates through three levels — prompt, parameter, then chain structure — using step-level failure attribution to decide what to change next.
In Cisco’s evaluation, FAPO beat GEPA on 15 of 18 model-benchmark comparisons, with a +14.1pp mean gain.
On HoVer and IFBench, where it escalated to pipeline changes, FAPO won all six pairs at a +33.8pp mean gain; AIME was GEPA’s only win, within sampling noise.
Guardrails against overfitting include training-split-only inspection, immutable variant files, and an independent reviewer on every proposal.
What is FAPO
FAPO is a multi-tenant evaluation and optimization framework. A tenant is a self-contained optimization project. Each tenant directory holds one task’s prompts, dataset, chain definition, scorer, and config. Tenants stay isolated, so unrelated tasks optimize side by side without interference.
The core engine is named hephaestus and is domain-agnostic. It handles evaluation, chain execution, and scoring. Chains are LangGraph state graphs that process each test case. Out of the box, FAPO supports three providers: OpenAI, Baseten, and SageMaker.
The one input you must bring is a dataset. It is paired inputs and expected outputs that define success. FAPO splits it into a validation set and a held-out test set. The validation set drives iteration; the test set is used only for a final one-shot evaluation. From a task description, Claude can scaffold the rest: the initial prompt, the chain, and the scorer.
How the Optimization Loop Works
Once the pieces exist, FAPO runs a closed loop until target accuracy is reached. Each cycle runs six stages:
Evaluate — run the chain on the dataset, collect per-case scores and step-level outputs.
Attribute — classify failures by root cause using rule-based heuristics plus LLM analysis.
Propose — generate a variant targeting the dominant failure cluster.
Review — an independent agent validates the proposal for scope compliance and data leakage.
Compare — accept the variant only if it improves on the previous best, otherwise reject.
Iterate — continue until target accuracy is reached or the optimization budget is exhausted.
The system works at three escalating levels. Prompt edits are lowest cost and tried first. Parameter changes adjust config values like retrieval_k or temperature. Structural changes alter chain topology, such as adding a self-reflection node or switching to a ReAct pattern. FAPO exhausts one level before escalating to the next.
Step attribution sorts failures into four classes. Retrieval failures return empty or irrelevant content. Cascading failures begin when an early step produces empty output. Format failures hide the correct answer inside text the scorer cannot parse. Reasoning failures occur when good inputs still produce a wrong conclusion. Format and reasoning issues are prompt-addressable. Retrieval and cascade issues are structural-addressable.
Guardrails keep the optimizer from overfitting. It inspects only training-split cases, while validation and test expose aggregate scores only. Every variant is a new immutable file, never edited in place. An independent reviewer checks each proposal before it runs.
The Benchmark Case: FAPO vs. GEPA
Cisco team evaluated FAPO against GEPA (Generalized Evolutionary Prompt Architecture), a state-of-the-art prompt optimization method. GEPA uses evolutionary search with genetic operators to optimize prompts for multi-step pipelines. Both systems started from identical baseline pipelines and prompts. FAPO could escalate to structural changes when attribution found bottlenecks. GEPA was limited to prompt-level optimization.
The comparison spanned six benchmarks and three task models: GPT-4.1-mini, GPT-5.4-mini, and Gemma 3-12B. Claude Opus 4.6 served as both FAPO’s orchestrator and GEPA’s reflector. Scores below are averaged across the three task models.
BenchmarkBaselineGEPAFAPOGain vs. GEPA
HoVer35.948.583.8+35.3pp
IFBench35.748.580.7+32.2pp
LiveBench-Math51.052.662.0+9.4pp
HotpotQA50.961.868.3+6.5pp
Papillon73.690.794.9+4.2pp
AIME16.716.012.9-3.1pp
FAPO won 15 of 18 model-benchmark comparisons, with a mean gain of +14.1pp over GEPA. On HoVer and IFBench, where FAPO escalated to pipeline changes, it won all six model-benchmark pairs. The mean gain there was +33.8pp. On the four benchmarks without structural changes, FAPO still won 9 of 12 through prompt optimization alone. AIME was the only benchmark where GEPA led, by 3.1pp. The gap is smaller than the standard deviation across stochastic trials.
A capability comparison shows the design difference reported by Cisco. Every row below reflects the source description of the two systems.
CapabilityGEPAFAPO
Optimization levelsPrompt text onlyPrompt → parameter → structural
Can change chain structureNoYes, when attribution finds bottlenecks
How it is drivenEvolutionary search with genetic operatorsClaude Code or Codex agent loop
Result across 18 model-benchmark pairsReferenceWins 15 of 18; +14.1pp mean
Where It Fits: Use Cases
FAPO targets multi-step LLM pipelines, not single prompts. A few concrete examples:
Multi-hop question answering: A chain retrieves documents, extracts facts, reasons over evidence, and formats an answer. In Cisco’s documented walkthrough, a multi-hop QA chain rose from 39.3% to 70.3% validation exact match across two iterations. Attribution then flagged the remaining failures as retrieval-limited, signaling a structural fix. Separately, on the HotpotQA benchmark, FAPO reached 68.3% test accuracy versus GEPA’s 61.8%.
Instruction following: On IFBench, format-constraint failures pushed FAPO to escalate beyond prompts, reaching 80.7% test accuracy.
Classification: A software-name-to-category task can be scaffolded by Claude Code, then optimized to exact-match targets.
ReAct agents: An MCP workflow extension optimizes a tool-calling ReAct agent using trajectory scoring and LLM-as-Judge scoring.
Getting Started
The fastest path is to let Claude Code create the tenant files. From the repo, describe your task in plain English, then add a JSONL dataset. Each line is one test case with case_id, task_type, context, expected, and metadata:
Copy CodeCopiedUse a different Browser
{"case_id": "1", "task_type": "qa", "context": {"question": "What is the capital of France?"}, "expected": {"answer": "Paris"}, "metadata": {}}
{"case_id": "2", "task_type": "qa", "context": {"question": "What is 2 + 2?"}, "expected": {"answer": "4"}, "metadata": {}}
A scorer compares the chain output to the expected answer. It implements validate_case to catch bad data early and score_case to return a composite score:
Copy CodeCopiedUse a different Browser
from hephaestus.scoring.scorer import Scorer as BaseScorer
class Scorer(BaseScorer):
def validate_case(self, case, scoring_profile):
assert "answer" in case.expected, "Missing 'answer' in expected"
def score_case(self, case, output_text, scoring_profile):
expected = case.expected["answer"].strip().lower()
predicted = output_text.strip().lower()
em = 100.0 if predicted == expected else 0.0
return {"composite_score": em, "score_breakdown": {"exact_match": em}}
Verify the setup with a baseline evaluation:
Copy CodeCopiedUse a different Browser
export OPENAI_API_KEY="sk-..."
python -m hephaestus.cli eval --config tenants/my_project/configs/eval.json
Then invoke the optimization agent with a tenant, config, and success criteria such as composite_score >= 90. Claude Code produces a scope contract, then iterates autonomously. Every prompt variant, config, and per-variant analysis is written to disk, so each run stays auditable. A local read-only UI called FAPO Explorer browses the artifacts afterward.
Strengths and Weaknesses
Strengths
Pipeline-aware scoring attributes failures to the step that caused them, not just the final output.
Three-level escalation handles failures that prompts alone cannot fix.
Guardrails against overfitting: training-split-only inspection, immutable variants, and an independent reviewer.
Open source under Apache 2.0, with both Claude Code and Codex supported.
Weaknesses
Optimization quality is bounded by the dataset’s quality and coverage, which you must supply.
The project is recent, so independent production track records are still limited.
The default loop depends on agentic coding tools (Claude Code or Codex) rather than a standalone optimizer.
Interactive Explainer
Check out the Repo and Technical details. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us
The post Cisco AI Introduces FAPO: Pipeline-Aware Prompt Optimization With Step-Level Failure Attribution and Claude Code Orchestration appeared first on MarkTechPost.
News to Guide
ニュースの次に確認する
発表内容を、現在の料金や仕様と照らし合わせられる関連ガイドです。
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み