Spreadsheet LLM Formula Suggestions with Cached Chain-of-Thought Comments

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing spreadsheet applications face limitations in integrating large language models (LLMs) due to latency issues, high computational requirements, and the potential for generating irrelevant or inaccurate responses, which hinder user experience and productivity.

Innovation Solution

An application service integrates LLMs with spreadsheet environments by generating prompts that include a chain-of-thought breakdown of formulas, using the LET function, and displaying comments to enhance user understanding and control over the suggestions provided by the LLM.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If LLMs are integrated into spreadsheet environments to provide formula suggestions, then the capability to generate novel and open-ended responses is improved, but latency increases and user experience deteriorates

Engineering Contradiction:
Improveformula generation capabilityVSAvoidlatency
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent segments the formula generation process into two distinct phases: (1) an offline pre-computation phase where the LLM generates and caches formula suggestions with their chain-of-thought breakdowns, and (2) an online query phase where pre-computed results are retrieved and presented to users. This segmentation eliminates latency during user interactions while maintaining high adaptability in formula generation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary actions by pre-computing formula suggestions, generating chain-of-thought breakdowns, and caching results before users actually query the system. This advance preparation ensures that when users need formula suggestions, the results are already available, eliminating wait time while preserving the LLM's capability to generate novel responses.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If LLMs are used to generate formula suggestions, then the creativity and novelty of responses are improved, but computational requirements increase tremendously

Engineering Contradiction:
Improveresponse noveltyVSAvoidcompute power
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The computational workload is segmented between offline batch processing and online lightweight retrieval. The energy-intensive LLM computations are performed once offline to generate and cache formula suggestions, while online operations only require minimal computational resources to retrieve and display pre-computed results, dramatically reducing ongoing computational requirements.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Instead of running the LLM for every user query, the system creates copies of pre-generated formula suggestions and their chain-of-thought breakdowns, storing them in a cache. These copies can be rapidly retrieved and presented to multiple users without requiring the original LLM computation to be repeated, significantly reducing computational power consumption.

Inventive Principle:
Principle #26Copying

3Speed

If LLMs generate formula suggestions directly without chain-of-thought breakdown, then the response speed is improved, but the relevance and accuracy of suggestions deteriorates

Engineering Contradiction:
Improveresponse speedVSAvoidformula accuracy
Core Design Contradiction:
SpeedVSMeasurement precision

Solution Approach 1:

The suggestion generation process is segmented into two components: the chain-of-thought breakdown (which ensures accuracy through step-by-step reasoning) and the final formula suggestion (which provides the actionable result). Both components are pre-computed offline and cached together, allowing the system to retrieve complete, accurate suggestions with explanations instantly during online queries.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs the cognitively demanding task of generating chain-of-thought breakdowns in advance, before users need the suggestions. This preliminary reasoning work ensures high accuracy and relevance of formula suggestions while the actual user interaction only requires fast retrieval of the already-analyzed results, maintaining both speed and precision.

Inventive Principle:
Principle #10Preliminary action

4Adaptability or versatility

If LLMs are integrated to provide comprehensive formula suggestions, then the usefulness of AI models is improved, but the device complexity increases

Engineering Contradiction:
ImproveAI model utilityVSAvoidsystem architecture
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

An intermediary caching layer is introduced between the LLM service and the spreadsheet application. This cache stores pre-computed formula suggestions with chain-of-thought breakdowns and handles retrieval requests, shielding the complex LLM infrastructure from direct user interaction. The intermediary simplifies the system architecture by providing a straightforward query-response interface while managing the complexity of LLM integration in the background.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS12367336B2Chain of thought reasoning for LLM integrations in spreadsheet environments
Publication Date: 2025.07.22 MICROSOFT TECHNOLOGY LICENSING LLC
  • US12367336B2 patent drawing
  • US12367336B2 patent drawing
  • US12367336B2 patent drawing

AI summary

Technology is disclosed herein for the integration of spreadsheet environments and LLM services. In an implementation, an application service inputs a first prompt to a LLM service to provide a formula suggestion for a spreadsheet. The application service receives a first output from the LLM service that includes a first formula in a programming language having a syntax that does not support comments. The application service generates a second prompt instructing the LLM service to provide a chain-of-thought breakdown of the first formula and receives a second output. The second output includes a second formula in the same programming language as the first formula and multiple comments corresponding to multiple portions of the second formula.