LLM Prompting for Semi-Structured Document Matching Accuracy

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional ML-based document matching systems, particularly those using generic line-item matching (GLIM) models, face performance degradation when dealing with semi-structured data tables containing unstructured data, such as text sentences, due to the inability to accurately process contextual information, leading to inaccuracies in matching tasks and automation failures.

Innovation Solution

The proposed solution leverages large language models (LLMs) to extract key information from unstructured tabular data by generating prompts based on unstructured data, using a few-shot prompting approach, and merging the LLM responses with structured data to create a calibrated document for processing with a GLIM model, thereby improving the accuracy of document matching tasks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional ML-based document matching systems (GLIM models) are used to process semi-structured data tables, then the system structure remains simple, but the accuracy of matching tasks degrades when dealing with unstructured data containing contextual information

Engineering Contradiction:
Improvematching accuracyVSAvoidsystem complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system segments the document processing into two distinct pathways: structured data fields are processed directly by the GLIM model, while unstructured data fields are routed through an LLM for contextual extraction. This segmentation allows each component to handle the type of data it processes most effectively, thereby improving overall matching accuracy without requiring the entire system to be overly complex.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The LLM acts as an intermediary component that bridges the gap between unstructured data and the GLIM model. It extracts meaningful contextual information from unstructured fields and transforms it into a format that the GLIM model can effectively utilize for matching decisions, thereby improving accuracy while maintaining a modular system architecture.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If LLMs are integrated to extract key information from unstructured data, then matching accuracy improves, but processing time and computational resources increase

Engineering Contradiction:
Improvematching accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system segments processing resources based on data type: only unstructured fields are routed through the computationally intensive LLM, while structured fields are processed efficiently by the GLIM model. This segmentation ensures that the time and computational overhead of LLM processing is minimized by applying it only where necessary, rather than to the entire document.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system applies LLM processing partially - only to unstructured data fields that require contextual understanding - rather than applying it excessively to all fields. This selective application of the more resource-intensive LLM processing achieves the necessary accuracy improvement while controlling processing time and computational resource consumption.

Inventive Principle:
Principle #16Partial or excessive action

3Adaptability or versatility

If LLMs are used for extracting contextual information from unstructured data, then the system becomes more versatile in handling different data types, but the device complexity increases

Engineering Contradiction:
Improvedata processing versatilityVSAvoidsystem architecture complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system achieves universality by making the LLM component multi-functional: it handles all unstructured data fields across different document types and languages. This single versatile LLM component replaces the need for multiple specialized models, thereby improving data processing versatility while actually simplifying the overall system architecture compared to having separate models for each data type.

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

Solution Approach 2:

The LLM serves as a universal intermediary that can translate and process various forms of unstructured data (different languages, formats, and structures) into a standardized format suitable for the GLIM model. This intermediary approach enhances versatility without requiring complex custom processing pipelines for each data type.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12093300B1Enhancing accuracy of entity matching inference using large language models
Publication Date: 2024.09.17 SAP SE
  • US12093300B1 patent drawing
  • US12093300B1 patent drawing
  • US12093300B1 patent drawing

AI summary

Methods, systems, and computer-readable storage media for receiving a first document including structured data and unstructured data, providing a first sub-document and a second sub-document, the first sub-document including the structured data of the first document, the second sub-document including the unstructured data of the first document, generating a prompt using the second sub-document and a second document, inputting the prompt to a LLM, receiving a response from the LLM, providing a calibrated first document by merging the response into the first sub-document, and processing the calibrated first document and the second document using a ML model to provide a prediction, the prediction indicating a matching class between the first document and the second document.