Spreadsheet LLM Prompt Preparation for Lower-Latency Responses

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing spreadsheet applications with integrated AI models are limited to spreadsheet data and functionalities, while large language models (LLMs) introduce latency, require significant compute power, and may generate irrelevant or inaccurate responses due to their broad training data.

Innovation Solution

An application generates prompts based on user input and spreadsheet data to guide LLMs in performing preparatory steps like data cleaning and generating suggestions, tailoring the interaction to minimize latency and improve relevance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If LLMs are integrated to provide general-purpose natural language processing, then the capability to handle diverse tasks and generate novel responses is improved, but latency increases and user experience deteriorates

Engineering Contradiction:
Improvecapability to handle diverse tasksVSAvoidlatency
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent segments the LLM's processing task into two distinct phases: a preprocessing phase that identifies and structures relevant information from spreadsheet data, and a main processing phase that generates the final response. This segmentation allows the system to prepare data in advance, reducing the latency of the actual LLM query while maintaining its general-purpose capabilities.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements preliminary action by performing data extraction, validation, and structuring operations before the LLM generates its response. The system pre-processes spreadsheet data to identify relevant cells, validate data types, and organize information in a structured format that the LLM can efficiently consume, thereby reducing the time required for the main generation task.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If LLMs are used for broad data analysis, then the ability to generate open-ended and unpredictable responses is improved, but compute power requirements increase significantly

Engineering Contradiction:
Improveability to generate open-ended responsesVSAvoidcompute power
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts and isolates only the specific portions of spreadsheet data that are relevant to the user's query, separating them from the rest of the data. By taking out only the necessary information and presenting it in a structured format, the system reduces the amount of data the LLM must process, thereby lowering compute power requirements while preserving the ability to generate open-ended responses about the relevant data.

Inventive Principle:
Principle #2Taking out (Extraction)

3Adaptability or versatility

If LLMs process diverse training data, then the range of knowledge is improved, but the accuracy and relevance of responses to specific spreadsheet queries deteriorates due to hallucinations

Engineering Contradiction:
Improverange of knowledgeVSAvoidaccuracy of responses
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent introduces an intermediary layer between the LLM and the spreadsheet data that acts as a mediator. This intermediary validates the data, ensures it meets specific criteria, and structures it in a way that guides the LLM to generate accurate, relevant responses. The intermediary prevents the LLM from hallucinating by providing verified, context-specific information while still allowing the LLM to leverage its broad knowledge base.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the reliance on the LLM's general knowledge with a structured, rule-based validation system that checks data against specific criteria. This substitution ensures that responses are grounded in actual spreadsheet data rather than the LLM's potentially inaccurate general knowledge, improving reliability while maintaining the ability to handle diverse queries.

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

4Measurement precision

If spreadsheet-specific AI models are used, then the precision for spreadsheet tasks is improved, but the versatility to handle general natural language processing deteriorates

Engineering Contradiction:
Improveprecision for spreadsheet tasksVSAvoidversatility for natural language processing
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The patent merges the strengths of spreadsheet-specific AI models with general-purpose LLMs. The spreadsheet-specific model handles data extraction, validation, and structuring with high precision, while the general-purpose LLM handles natural language understanding and response generation with high versatility. This combination allows the system to maintain precision for spreadsheet tasks while gaining the ability to handle diverse natural language queries.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS12481823B2Predicate-guided preparation for LLM integrations in spreadsheet environments
Publication Date: 2025.11.25 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12481823B2 patent drawing
  • US12481823B2 patent drawing
  • US12481823B2 patent drawing

AI summary

Technology is disclosed herein for the integration of spreadsheet environments and LLM services. In an implementation, an application receives a natural language input from a user associated with a spreadsheet. The application generates a prompt based on the user input and at least a portion of the spreadsheet. The prompt includes a statement of the problem, a request for an LLM service to identify preparatory steps before generating a solution to the problem, and a request to include the preparatory steps in output that includes the solution to problem. The application service receives a reply to the prompt from the LLM service that includes the output. The application service implements the preparatory steps with respect to data in the spreadsheet and implements the solution to the problem with respect to the data in the spreadsheet.