LLM-Based Parser Generation for Dynamic Email Extraction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing email extraction systems face challenges in scalability and accuracy when dealing with unpredictable changes in email message formats and structures, as they often require significant processing power and resource-intensive Large Language Models (LLMs) or fail with unknown structures, and fast XPATH-based parsers are not straightforward to create and maintain.

Innovation Solution

A method using LLMs to generate parsers for emails with unknown structures by providing text from the email to the model, receiving a response with populated output templates, and validating the response to create a parser that can extract information from subsequent messages with similar templates, thereby improving scalability and accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If LLMs are used to extract information from emails, then accuracy in handling unknown email structures is improved, but processing power requirements and resource consumption increase

Engineering Contradiction:
Improveextraction accuracyVSAvoidprocessing power
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent introduces an intermediary parser generation system that translates LLM capabilities into efficient XPATH-based parsers. This mediator converts the high-level semantic understanding of LLMs into low-level, computationally efficient parsing rules, allowing accurate extraction without direct LLM processing for every email.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system performs preliminary action by generating parsers in advance using LLMs for unknown email structures. Once generated, these parsers are cached and reused for subsequent emails with similar structures, avoiding repeated LLM processing and reducing overall computational requirements.

Inventive Principle:
Principle #10Preliminary action

2Speed

If XPATH-based parsers are used for fast processing, then processing speed is improved, but ability to handle new unknown email structures deteriorates

Engineering Contradiction:
Improveprocessing speedVSAvoidhandling unknown structures
Core Design Contradiction:
SpeedVSAdaptability or versatility

Solution Approach 1:

The system implements dynamic parser management where parsers are not static but can be generated and updated on-demand. When new email structures are detected, the system dynamically creates new parsers using LLMs, then caches them for future use, combining the speed of XPATH with the adaptability of machine learning.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system enables self-service by automatically detecting when existing parsers fail on new email structures and autonomously generating new parsers without human intervention. This self-adaptation mechanism maintains high processing speeds while improving versatility over time.

Inventive Principle:
Principle #25Self-service

3Manufacturing precision

If manual parser creation is performed, then precision for specific templates is improved, but time and resources required for creation increase

Engineering Contradiction:
Improveparser precisionVSAvoidparser creation time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The patent replaces the mechanical process of manual parser creation with an automated LLM-based generation system. The LLM analyzes email structures and automatically produces XPATH-based parsers, eliminating manual effort while maintaining or improving parser precision through the LLM's understanding of email semantics.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The system uses copying by generating parsers from templates and patterns learned from existing emails. Once a parser is generated for a particular email structure, it can be copied and adapted for similar structures, reducing creation time while maintaining precision through pattern recognition.

Inventive Principle:
Principle #26Copying

4Measurement precision

If parsers are trained for specific email templates, then extraction accuracy for those templates is improved, but scalability to handle format changes deteriorates

Engineering Contradiction:
Improveextraction accuracyVSAvoidscalability
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The system implements universality by creating a multi-functional parser management system that handles both known and unknown email structures. The LLM-based parser generator serves multiple functions: analyzing new structures, generating appropriate parsers, validating them, and caching them for future use, making the system adaptable to any email format.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The system incorporates feedback mechanisms where parsing results are validated and evaluated. When parsers encounter new or changed email structures, the feedback loop triggers regeneration of appropriate parsers using LLMs, allowing the system to continuously adapt and maintain accuracy across diverse email formats.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20240354710A1Methods and systems for the creation of parsers using large language models
Publication Date: 2024.10.24 SHOPIFY INC
  • US20240354710A1 patent drawing
  • US20240354710A1 patent drawing
  • US20240354710A1 patent drawing

AI summary

A computer system, and a method at a computer system, the method including. receiving a first message at the computing system; determining that a parser for the first message does not exist at the computing system; providing text from the first message and an output template to a large language model; receiving a response from the large language model, the response comprising the output template populated with information from the message; and generating a parser for the message based on the response.