Web Extraction Scripts for Accurate Target Content Capture

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large Language Model (LLM)-based chatbot systems struggle with extracting relevant information from webpages due to hallucinations caused by irrelevant content, leading to inaccurate responses.

Innovation Solution

A multi-agent code generator that includes a content analysis agent and a code generation agent, with a critique agent providing feedback, to accurately identify and extract target content from webpages, reducing hallucinations and improving response accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If LLM is prompted to identify relevant information on a webpage, then the chatbot system can access information for responses, but the output is prone to hallucinations and inaccurate due to irrelevant content

Engineering Contradiction:
Improverelevance of extracted informationVSAvoidaccuracy of content identification
Core Design Contradiction:
Loss of informationVSMeasurement precision

Solution Approach 1:

The patent segments the webpage content processing into distinct functional components: a content analysis agent that identifies relevant sections, a code generation agent that creates extraction scripts, and a critique agent that validates results. This segmentation allows each component to specialize in specific tasks, improving overall accuracy by preventing hallucinations that occur when a single LLM attempts to handle all aspects of information extraction.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary code generation layer between the LLM and the webpage content. Instead of directly querying the LLM with raw webpage content, the system generates and executes automated scripts that precisely extract target content based on structural analysis. This intermediary mechanism eliminates hallucinations by using deterministic code-based extraction rather than probabilistic LLM generation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If a script is generated to extract target content from webpage, then extraction accuracy and consistency improve, but the system complexity increases due to multi-agent architecture

Engineering Contradiction:
Improvecontent extraction accuracyVSAvoidsystem architecture complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The multi-agent system is designed to be self-service and self-correcting. The critique agent automatically evaluates the output of the content analysis and code generation agents, providing feedback and requesting regeneration when accuracy thresholds are not met. This self-service mechanism reduces the need for external human intervention and automated manual correction, justifying the increased system complexity through autonomous operation.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent implements a feedback loop where the critique agent continuously monitors and evaluates the performance of other agents. When the critique agent determines that extracted content does not meet accuracy standards, it provides feedback that triggers regeneration by the content analysis or code generation agents. This feedback mechanism ensures high extraction accuracy while managing system complexity through automated iterative improvement.

Inventive Principle:
Principle #23Feedback

3Adaptability or versatility

If entire webpage content is stored in database, then all information is available for chatbot responses, but response times increase and storage efficiency decreases

Engineering Contradiction:
Improvecompleteness of available dataVSAvoiddata access and processing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent extracts only the essential target content from webpages using generated scripts, storing only this extracted information in the database rather than complete webpage content. This extraction approach maintains data completeness for chatbot responses while dramatically reducing storage requirements and access times, as the system stores only the relevant portions of webpages that are actually needed for answering user queries.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS20260050422A1Extraction Script Generation
Publication Date: 2026.02.19 MAPLEBEAR INC
  • US20260050422A1 patent drawing
  • US20260050422A1 patent drawing
  • US20260050422A1 patent drawing

AI summary

An online system may include a multi-agent code generator that receives webpage data describing a webpage with target content, identifies the target content by analyzing the structure of the webpage, and generates a script configured to extract the target content. The online system can execute the script to extract the target content and store the extracted data in a database for later access by the online system. For example, a chatbot of the online system can reference the stored data describing the target content to generate a response to a query.