Smart Caching for LLM Document Classification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing document classification techniques using Large Language Models (LLMs) are computationally expensive and time-consuming, especially for long documents, due to their reliance on document similarity for classification.

Innovation Solution

A document classification system that employs a smart caching mechanism and a database of indicators identified by the LLM, allowing for efficient classification of new documents by checking for indicators in the cache and database, and applying a majority vote based on associated classifications.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If document classification is performed using LLMs by identifying indicators in documents, then classification accuracy is improved, but computational cost and time consumption increase

Engineering Contradiction:
Improveclassification accuracyVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary classification by checking indicators against the cache and database before invoking the LLM. This preliminary action filters out documents that can be classified using existing indicators, reducing the number of documents that require full LLM processing and thereby reducing time consumption while maintaining accuracy.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system extracts and stores key indicators from documents in a database during the LLM classification process. These extracted indicators are then reused for future classifications, separating the indicator extraction task from the full LLM processing and reducing redundant computational work.

Inventive Principle:
Principle #2Taking out (Extraction)

2Measurement precision

If document classification is performed using LLMs by identifying indicators in documents, then classification accuracy is improved, but computational cost increases

Engineering Contradiction:
Improveclassification accuracyVSAvoidcomputational cost
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The system creates a cache containing copies of indicator-classification pairs from previous LLM processing. Instead of re-invoking the LLM for similar documents, the system queries this cache for matching indicators and applies the cached classifications, significantly reducing computational cost while maintaining accuracy through the use of replicated classification knowledge.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The system discards redundant LLM invocations by recovering and reusing classifications from the cache and database based on indicator matching. This allows the system to eliminate unnecessary computational operations while preserving the essential classification information.

Inventive Principle:
Principle #34Discarding and recovering

3Productivity

If a smart caching mechanism is used to store classifications and indicators, then productivity is improved, but device complexity increases

Engineering Contradiction:
Improveclassification efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system introduces a cache and database as intermediary components between the LLM and the classification process. These intermediaries store and retrieve indicator-classification pairs, mediating between the expensive LLM calls and the frequent classification queries, thereby improving productivity while managing complexity through a clear layered architecture.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12216717B1Methods and systems for implementing large language models and smart caching with zero shot
Publication Date: 2025.02.04 INTUIT INC
  • US12216717B1 patent drawing
  • US12216717B1 patent drawing
  • US12216717B1 patent drawing

AI summary

A Large Language Model (LLM) for classifying documents by identifying indicators within the documents. A smart caching mechanism stores document classifications and associated indicators output from the LLM. The database contains document details, classifications, and associated indicators. A classification module classifies a new document by analyzing it for indicators, checking the cache for a match, and querying the database for the indicators if no match is found. The module applies a majority vote based on the classifications associated with the indicators.