惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
aimingoo的专栏
aimingoo的专栏
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
IT之家
IT之家
V
Visual Studio Blog
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
A
About on SuperTechFans
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
N
News and Events Feed by Topic
A
Arctic Wolf
WordPress大学
WordPress大学
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Darknet – Hacking Tools, Hacker News & Cyber Security
F
Fortinet All Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Y
Y Combinator Blog
T
Threat Research - Cisco Blogs
Latest news
Latest news
Simon Willison's Weblog
Simon Willison's Weblog
Cyberwarzone
Cyberwarzone
S
Schneier on Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
Lohrmann on Cybersecurity
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
J
Java Code Geeks
Spread Privacy
Spread Privacy
宝玉的分享
宝玉的分享
I
Intezer
L
LangChain Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
G
GRAHAM CLULEY
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
News and Events Feed by Topic
AWS News Blog
AWS News Blog
Attack and Defense Labs
Attack and Defense Labs
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

Inside Nutrient

A guide to the invisible work behind documents Introducing Nutrient Documents for Salesforce: Native document generation and signing Document AI vs. traditional OCR: Choosing between OCR, AI, and hybrid pipelines PDF SDK compliance and security evaluation checklist for enterprise teams (2026) Invariant Corp replaces paper processes with Nutrient Workflow and scales without limits What is process mapping? A complete guide Nutrient vs. Conga Composer for Salesforce document generation (2026) Document routing: How to automate document distribution The CTO’s AI playbook: Why accountability architecture beats orchestration Compliance workflow automation: Why built-in compliance is table stakes Workflow diagrams: Examples, symbols, and how to build one that actually runs Digital forms: Replace paper forms with automated workflows Approval workflow software: How to automate approvals Why document-centric automation is different The CEO’s AI playbook: Why decision architecture beats model selection Nutrient SDK product updates for Q1 2026 PDF redaction verification: How to prove sensitive data is permanently removed What is a VPAT? The complete guide to accessibility conformance reports What is PDF/UA? The accessible PDF standard explained Salesforce eSignatures: Generate, sign, and track documents in one flow Online document viewer: Options, tradeoffs, and how to embed one Document viewer for web apps: React, Vue, Angular (2026) Best document viewers in 2026: A buyer’s guide How to edit a PDF in Python: Add text, images, and annotations Nutrient advances Workflow platform with agentic AI for enterprise-grade speed and consistency in document-heavy operations How to create a Salesforce quote template from opportunity data The business case for accessibility: Five ways it drives enterprise value Python PDF library comparison (2026): 7 libraries for developers Why your AI agent hallucinates PDF table data PDF.js limitations: When to upgrade to a commercial PDF SDK How Subject scaled 5× with Nutrient’s PDF SDK without rebuilding its document layer I replaced our sales training with an AI coach that runs in Slack — here’s what broke Redirecting to: https://securitybuzz.com/cybersecurity-news/why-enterprise-permissions-are-ais-most-dangerous-inheritance/ Nutrient .NET SDK vs. iText Core: Complete comparison for .NET developers DocuVieware: Support’s most frequently asked setup questions Introducing Nutrient Workflow How to convert PDF to Word in C# (.NET) When email and spreadsheets stop working: Work order approval workflows for field teams on the move Compliance with confidence: Why document-centric automation is the foundation of your mission Nutrient expands AI Assistant, automating multistep document workflows inside any application What is document generation? A developer’s guide to PDF generation Document Converter data flow and how real-time watermarks skip the queue PDF/UA compliance guide: Requirements, standards, and best practices Computers still can’t understand you How Athena Intelligence built AI agents for regulated enterprises with Nutrient’s document infrastructure How to convert HTML to PDF (2026): 4 methods from browser print to SDK How to build a document extraction pipeline with Nutrient Vision API OCR vs. intelligent document processing: Choosing the right document extraction engine Beyond OCR: How document intelligence eliminates manual processing in regulated industries Nutrient vs. IronPDF: Complete comparison for .NET developers Nutrient vs. Aspose.PDF: Complete comparison for .NET developers Redirecting to: https://fortune.com/2026/02/19/openclaw-who-is-peter-steinberger-openai-sam-altman-anthropic-moltbook/ Lufthansa Systems uses Nutrient to deliver reliable, scalable PDF rendering for pilots worldwide Nutrient vs. Syncfusion: Complete comparison for .NET developers React’s useTransition: The hook you’re probably using wrong First City Monument Bank streamlines banking processes with Nutrient Workflow Redirecting to: https://www.sdcexec.com/warehousing/automation/article/22957364/nutrient-workflow-automation-the-missing-link-in-supply-chain-efficiency The complete guide to digital signatures: PAdES, CAdES, and XAdES explained Nutrient Python SDK: Production-grade document processing for Python Introducing agentic document editing for web applications with AI Assistant Nutrient vs. QuestPDF: Complete comparison for .NET developers How we fixed the GdPicture license expiration (and what to do if you’re affected) Red team security testing with agentic AI The future of healthcare document automation Best healthcare workflow software compared Nutrient SDK product updates for Q4 2025 How Harvey scaled legal document workflows 50 percent MoM without rebuilding infrastructure HIPAA-compliant document management in hospitals How we optimized rendering performance while handling thousands of annotations in React — Part 2 Automated PII removal with Nutrient API Redirecting to: https://www.devopsdigest.com/2026-low-code-no-code-predictions Redirecting to: https://www.kmworld.com/Articles/Editorial/ViewPoints/Leaders-predict-AI-to-continue-permeating-all-aspects-of-KM-in-2026-172594.aspx What are deep agents and how do they solve complex problems? Whipping up document magic: Your easy-bake recipe for Vue and Nutrient Web SDK 🧁 What I’ve learned about product iteration planning while building SDKs Passwordless document signing: Three-layer security guide New zip folder functionality streamlines file management in Document Automation Server The keyboard shortcuts playbook: Taking control of keyboard events in Nutrient Web SDK From experienced engineer to AI beginner: My unexpected journey AI-assisted manual testing: Handling Safari’s PDF rendering and UI quirks How to keep a 20-year-old SDK up to date How we optimized rendering performance while handling thousands of annotations in React — Part 1 Nutrient announces new executive hires to accelerate next phase of growth High performance UI using web workers Automate document conversion at scale with Python and Nutrient DCS From curiosity to PLG (and AI): My journey to understanding product-led growth Prost to progress: One year as Nutrient Pigeon usage at Nutrient: Bridging native SDKs to Flutter Modernizing CI build servers: How to migrate from Chef to Ansible Unix man pages: AI-friendly documentation since 1971 Consistent hashing for even load distribution Best AI redaction APIs: Complete comparison guide for 2025 Why AI document redaction matters for modern security From coding to coordinating: How AI transformed my workflow What is intelligent document processing (IDP)? A complete guide Enterprise PDF SDKs: Best PSPDFKit (now Nutrient) alternatives Nutrient SDK product updates for Q3 2025 GdPicture support best practices Redacting sensitive data with Nutrient AI redaction API How AI is transforming the customer experience at Nutrient: From instant answers to intelligent support
ReWOO vs. ReAct: Choosing the right agent architecture for the job
Nick Winder · 2025-08-07 · via Inside Nutrient

Picture this: You’re building an AI agent to process hundreds of documents, extract specific data, and generate reports. Should your agent think and act in real time? Or should it plan everything upfront like a project manager?

This fundamental choice between reactive and planned execution shapes how your AI agent will perform. And this blog post will explore ReAct vs. ReWOO — two powerful but very different approaches to agent architecture.

TL;DR

ReAct agents think-act-observe in loops — great for interactive tasks. ReWOO agents plan everything upfront, and then execute — perfect for structured processing.

ReAct: Costly (sometimes), slow (sometimes), but reliable (sometimes)

The ReAct(opens in a new tab) pattern is simple. The “Re” stands for reasoning, and the “Act” stands for action. It’s essentially the trial and error pattern.

ReAct instructs the agent to operate in a loop. The agent generates a thought (chain-of-thought reasoning), takes an action (like searching or calling a tool), observes the result, and repeats.

Here’s how a ReAct agent processes a document analysis task, showing the think-act-observe cycle in action with predefined tools:

User: Please flag this document for review if it exceeds the $100,000 threshold.

Thought: I need to find the contract value in this PDF.

Action: search_document("contract value")

Observation: Found "contract value: $125,000" on page 7.

Thought: Now I need to check if this exceeds our threshold.

Action: compare_value(125000, threshold=100000)

Observation: Value exceeds threshold by 25%.

Thought: I should flag this for review...

This tight feedback loop makes ReAct incredibly powerful for dynamic, interactive tasks where the goal isn’t well defined at the time of development and requires more context at runtime. Research(opens in a new tab) showed it outperformed reasoning-only or acting-only methods (single-pass methods) across QA and decision-making tasks.

But there are drawbacks: Each cycle requires a new LLM prompt with the full conversation history. If the result isn’t found within the first few loops, you’re looking at large token costs and long delays. Essentially, sometimes it’s fast and cheap. Sometimes it’s slow and expensive. And most of that variance comes down to access to tools and the model’s ability.

ReWOO: Plan first, execute later

Would you build a house without a plan? No. Neither should your agent. And that’s ReWOO.

ReWOO(opens in a new tab) uses three distinct stages:

  1. Planner — Breaks down the goal into tasks with placeholders.
  2. Worker — Executes the plan with tools.
  3. Solver — Pulls the results together to create a result.

Here’s how ReWOO handles the same document analysis task from above, breaking it into distinct planning and execution phases:

User: Please flag this document for review if it exceeds the $100,000 threshold.

# Planner

Goal: Determine whether the contract should be flagged for review based on its value.

Plan:

1. Extract the contract value from the document. → {{contract_value}}

2. Compare the extracted value to a threshold of $100,000. → {{comparison_result}}

# Worker

{{contract_value}} = search_document("contract value") → "contract value: $125,000" (page 7)

{{comparison_result}} = compare_value(125000, threshold=100000) → "Value exceeds threshold by 25%"

# Solver

The contract value is $125,000, which exceeds the threshold of $100,000 by 25%.

Therefore, this contract should be flagged for review.

All reasoning happens upfront with abstract placeholders. There’s no waiting for intermediate results, there are no token-heavy loops, and some work can even be done in parallel. On HotpotQA benchmarks(opens in a new tab), GPT-3.5 ReWOO achieved 42.4 percent accuracy vs 40.8 percent for ReAct, while using ~2,000 tokens instead of 9,795. That’s an 80 percent reduction in token usage.

Each approach has tradeoffs

While it may seem like you should jump on the ReWOO train right now, wait. Both approaches have their strengths and weaknesses. The best choice depends on the specific task and its requirements.

AspectReActReWOO
Token usageHigh (~5× more)Low
AdaptabilityCan pivot mid-taskPlan is fixed upfront (mistakes are possible)
Error recoveryCan adapt and adjust tool callingUsually a hard failure
LatencySequential, slowerCan parallelize execution

Real-world document use cases

So when should you choose each approach? It comes down to predictability and interaction patterns.

ReAct shines when you need flexibility and adaptability

Live document chat is where ReAct truly excels. When users are asking follow-up questions about documents, you never know what they’ll ask next. Your agent needs to adapt on the fly, building context from previous interactions and pivoting based on what users actually want to explore.

Dynamic form filling is another perfect fit. When each field depends on previous answers — like determining eligibility questions based on initial responses — ReAct’s ability to reason through dependencies step by step becomes invaluable.

Exploratory data analysis scenarios like “What patterns do you see in this report?” are inherently unpredictable. The agent might need to dig deeper into unexpected findings or change direction based on what the data reveals.

ReWOO excels when you have structured, repeatable workflows

Batch document processing is ReWOO’s sweet spot. When you need to extract data from 1,000 invoices that all follow the same structure, you can plan the extraction steps once and execute them efficiently in parallel across all documents.

Compliance checks work beautifully with ReWOO because you’re verifying contracts against a standard set of criteria. The checklist is known upfront, so you can plan all the validation steps and execute them systematically.

Report generation that combines data from multiple sources into summaries follows a predictable pattern that ReWOO can execute efficiently. Plan the data gathering, execute the collection, and then synthesize the results.

How to improve on ReAct and ReWOO

An area we at Nutrient — and others — have been exploring is a hybrid approach. There are many directions you can go with this, but here are a few we’ve explored.

1. ReWOO with ReAct fallbacks

First, the agent plans the tasks for the workers, and the workers begin to execute in a ReWOO fashion.

If any of these workers fail, we revert to a ReAct execution loop with all the context gained from the ReWOO workers and attempt a recovery.

Here’s an example of how the hybrid approach recovers from a failed ReWOO execution:

User: Please flag this document for review if it exceeds the $100,000 threshold.

# Planner

Goal: Determine whether the contract should be flagged for review based on its value.

Plan:

1. Extract the contract value from the document. → {{contract_value}}

2. Compare the extracted value to a threshold of $100,000. → {{comparison_result}}

# Worker

{{contract_value}} = search_document("contract value") → ❌ ERROR: Term not found

{{comparison_result}} = skipped (due to missing input)

# ReAct Recovery

Thought: The direct search for "contract value" failed. Maybe it's phrased differently in the document.

Action: search_document("total amount")

Observation: Found "Total Contract Amount: $125,000" on page 7

Thought: This is likely the value we need. Let's try the comparison again.

Action: compare_value(125000, threshold=100000)

Observation: Value exceeds threshold by 25%

# Solver

The total contract amount is $125,000, which exceeds the threshold of $100,000 by 25%.

Therefore, this contract should be flagged for review.

2. ReAct for structure discovery → ReWOO to scale

Sometimes you need to process thousands of documents, but you don’t know upfront how the data is structured or labeled. In this case, you can use ReAct iteratively on sample documents to discover field locations and phrasing, and then shift to a ReWOO pipeline to process the rest of the documents at scale. Here’s how this two-phase approach works:

User: Please flag any document for review if it exceeds the $100,000 threshold.

# Phase 1: ReAct (Exploration on Sample Documents)

Goal: Discover how target fields (e.g. contract value) are phrased or located in documents.

Document 1:

Thought: I need to find the contract value in this document.

Action: search_document("contract value")

Observation: Not found.

Thought: Try a different phrasing like "total amount".

Action: search_document("total amount")

Observation: Found "Total Contract Amount: $125,000" on page 7

Thought: This phrasing works. Note the label: "Total Contract Amount"

→ Field Mapping Learned: contract_value → "Total Contract Amount"

Document 2:

Thought: Try using "Total Contract Amount" directly.

Action: search_document("Total Contract Amount")

Observation: Found "Total Contract Amount: $93,400" on page 3

→ Field Mapping Confirmed

...

# Phase 2: Generalize Field Mapping

Discovered Field Mapping:

- contract_value → ["Total Contract Amount", "Contract Value", "Contract Total", etc.]

# Phase 3: ReWOO (Scale Up with Learned Field Phrases)

# Planner

Goal: Extract and evaluate contract values from a batch of documents

Plan:

1. Find the contract value using known label variations → {{contract_value}}

2. Compare it against the threshold of $100,000 → {{comparison_result}}

# Worker (for each document)

{{contract_value}} = search_document(["Total Contract Amount", "Contract Value", "Contract Total"])

→ e.g. "$93,400" on page 3

{{comparison_result}} = compare_value(93400, threshold=100000)

→ "Below threshold by 6.6%"

# Solver

For this document, the contract value is $93,400, which is below the threshold. No flag required.

In this, you can see field mappings were discovered via ReAct reasoning and trial/error, and once the agent has “learned” enough about the task at hand, it can hand off to the ReWOO executors.

3. ReWOO within a ReAct executor

A ReAct agent may decide to run a high-level action (e.g. run_financial_summary), which internally executes a well-defined ReWOO-style pipeline — layering structured execution within an adaptable control shell. This is similar to a multi-agent approach where a supervisor can call subagents to complete a task. Here’s how this nested approach works:

User: Please run a financial summary on this contract

# ReAct Loop Begins

Thought: I need to determine whether this document presents any financial risks.

Action: run_financial_summary(document)

# Inside Action: run_financial_summary → triggers ReWOO pipeline

--- Begin Embedded ReWOO Pipeline ---

# Planner

Goal: Summarize key financial indicators and assess risk.

Plan:

1. Extract total contract value → {{contract_value}}

2. Extract payment terms → {{payment_terms}}

3. Extract penalties or late fees → {{penalties}}

4. Evaluate risk based on extracted values → {{risk_assessment}}

# Worker

{{contract_value}} = search_document(["Total Contract Amount", "Contract Value"])

→ "$125,000"

{{payment_terms}} = search_document(["Payment Terms", "Payable within", "Due in"])

→ "Payable within 30 days of invoice"

{{penalties}} = search_document(["Penalty", "Late fee", "Interest charge"])

→ "Late payments incur a 5% monthly fee"

{{risk_assessment}} = assess_financial_risk(contract_value=125000, payment_terms="30 days", penalties="5% monthly fee")

→ "Moderate risk: High penalty rate for late payment"

# Solver

The document outlines a $125,000 contract payable within 30 days, with a 5% monthly penalty for late payment. This indicates a moderate financial risk.

--- End ReWOO Pipeline ---

# Back to ReAct Loop

Observation: Financial summary complete. Risk level: moderate.

Thought: Since the risk is moderate, I should flag this for manual review.

Action: flag_document(reason="Moderate financial risk")

Observation: Document flagged successfully.

Thought: Task complete.

Conclusion

As you can see, agents can become complicated fast. So the best advice I can offer is this:

Start simple with ReAct, and create quality tools that an LLM can reason about well.

ReAct helps you learn what tools your agent actually needs, how it reasons with them, and where things tend to break. That feedback loop is invaluable early on. Here’s a practical roadmap I follow when developing agents:

  1. Start with ReAct — Build a simple agent with 2–3 core tools for your specific use case.
  2. Refine your tools — Monitor how your agent uses each tool. Split tools that handle multiple distinct tasks into smaller, focused ones.
  3. Track token usage — Identify where costs spike and which workflows consume the most tokens.
  4. Spot repetitive patterns — Look for predictable sequences of tool calls that happen consistently across tasks.
  5. Migrate to ReWOO — Convert your most token-heavy, repetitive workflows to ReWOO’s planned execution.
  6. Experiment with hybrid approaches — For complex scenarios, combine ReAct’s flexibility with ReWOO’s efficiency using the patterns explored above.

Don’t feel pressured to complete every step — stop when your agent performs well enough for your needs.

Remember: The best architecture is the one that solves your specific problem efficiently. Don’t optimize prematurely — let your use case guide your choice.