LLM-Based Parser Generation for Dynamic Email Extraction
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Speed
If XPATH-based parsers are used for fast processing, then processing speed is improved, but ability to handle new unknown email structures deteriorates
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.
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.
3Manufacturing precision
If manual parser creation is performed, then precision for specific templates is improved, but time and resources required for creation increase
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.
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.
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
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.
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.
Data Source
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.


