LLM-Guided Parsing Expressions for Changing Web Page Layouts

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current web scraping systems face inefficiencies in adapting to frequent changes in webpage layouts, requiring manual and resource-intensive methods to generate parsing expressions, and often result in inaccurate data extraction due to outdated models.

Innovation Solution

A system utilizing machine learning to generate parsing expressions by adding index values to webpage elements, interfacing with a large language model to identify elements, and generating expressions that can adapt to layout changes, allowing for efficient and accurate data extraction.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual methods are used to generate parsing expressions, then accuracy can be maintained, but the process becomes time-consuming and resource-intensive

Engineering Contradiction:
Improvedata extraction accuracyVSAvoidtime to generate parsing expressions
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system automatically generates parsing expressions by downloading web pages, extracting elements, and creating expressions without requiring manual intervention. The parser self-updates its expressions when webpage layouts change, eliminating the need for manual regeneration while maintaining accuracy.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system pre-processes web pages by downloading them and extracting elements before generating parsing expressions. This preliminary action allows the system to have ready-made reference data when expressions need to be generated or updated, reducing overall processing time.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If outdated parsing expressions are used, then resource consumption is reduced, but data extraction accuracy deteriorates due to layout changes

Engineering Contradiction:
Improvedata extraction accuracyVSAvoidcomputing resource efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system continuously monitors webpage layouts and receives feedback about changes. When layout changes are detected, the system automatically updates parsing expressions based on the new layout structure, ensuring continued accuracy without requiring manual intervention or resource-intensive retraining.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The parsing expressions are made dynamic and adaptive rather than static. The system automatically generates new expressions when webpage layouts change, allowing the parser to adapt to evolving web structures while maintaining efficient resource consumption through automated updates.

Inventive Principle:
Principle #15Dynamics

3Adaptability or versatility

If frequent updates to parsing expressions are made to adapt to layout changes, then data extraction accuracy improves, but system complexity increases

Engineering Contradiction:
Improveadaptation to layout changesVSAvoidparser system complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The parser automatically detects layout changes and generates updated expressions without external intervention. The system self-manages the complexity of expression generation and updates, reducing the operational burden while maintaining high adaptability to webpage layout changes.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system segments the web page into discrete elements and generates parsing expressions for each element independently. This segmentation allows the system to handle complex pages by processing them in manageable units, reducing overall system complexity while maintaining adaptability.

Inventive Principle:
Principle #1Segmentation

4Reliability

If multiple parsing expressions are generated and used, then data extraction reliability improves, but computing resources increase

Engineering Contradiction:
Improvedata extraction success rateVSAvoidcomputing resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system generates multiple parsing expressions for robustness but uses them selectively based on success. Rather than always executing all possible expressions, the system tries expressions in sequence and stops when one succeeds, reducing overall resource consumption while maintaining high extraction reliability through the preparation of multiple expressions.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20260072994A1Generating a path to a document element using machine learning
Publication Date: 2026.03.12 OXYLABS UAB
  • US20260072994A1 patent drawing
  • US20260072994A1 patent drawing
  • US20260072994A1 patent drawing

AI summary

Disclosed herein are system, method, and computer program product embodiments for improving web scraping technology by using machine learning to generate parsing expressions. A system receives a request to identify an element in a first document at a target web page. The system downloads and modifies the first document by adding an index value as an attribute to a tag for the element. A query is submitted to a large language model (LLM), including the modified first document, a description of the element, and a request asking the LLM to identify the element based on the description. The system obtains, from the LLM, the index value assigned to the element. The system generates an expression defining a path to the element in the first document using the index returned by the large language model. The system downloads a second document, and parses data of a second element using the expression.