liveBook · Manning

Web research chain

As explained in AI Agents and Applications

The Web Research chain is a workflow that performs multiple web searches, summarizes their results, and combines those summaries into a research report.

A Web Research chain turns one user question into a research report. It generates multiple searches, processes each search in parallel, summarizes retrieved pages, and combines the summaries into a final answer. section 4.7 section 4.7.4

Build the workflow from focused chains:

  • Use an Assistant Instructions chain to select a research assistant and define its system prompt. section 4.7
  • Use a Web Searches chain to generate several queries that provide different perspectives or divide a complex question. section 4.7
  • Run a Search and Summarization chain for every query; each instance searches, retrieves URLs, scrapes pages, and summarizes content. section 4.7
  • Join the summaries with a RunnableLambda, then pass them and the original question to a Research Report chain. section 4.7.4
  • Use LCEL's map() operator to run the search-and-summarization sub-chain concurrently for each generated search. section 4.7.4

Travel research about Astorga

Invoking the chain with “What can I see and do in the Spanish town of Astorga?” produces a Markdown report covering attractions, activities, history, and trip-planning information. section 4.7.4

Figure 4.7 Chain architectural diagram showing how parallelization is applied in the research summarization engine, highlighting the execution of separate chain instances in parallel for efficiency
figure

The architecture diagram makes the concurrency pattern visible: separate Search and Summarization chain instances execute in parallel before report synthesis. section 4.7

How AI Agents and Applications covers it

How deep it goes
Explains component chains, LCEL composition, parallel mapping, testing, and output formatting, stopping short of production hardening.
Examples
Demonstrates the workflow with an Astorga travel question and a shortened Markdown research report.
What you can do after
Apply it via LCEL to build, invoke, experiment with, and customize a parallel web research workflow.
How it connects
Connects LCEL, Runnable protocol, web search, web scraping, summarization, parallelization, and research report generation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Agents and Applications. The section links point to the parts of the book it draws on.