IP Library › Granted Patent US 12,499,306
Granted Patent B2
US 12,499,306 · App. 18/314,994 · Granted Dec 16, 2025

Prompt chaining for LLM integrations in spreadsheet environments

Inventors: Daniel Fabian (Wabern, CH); Alexander A. Babanov (Bothell, WA); Rasika Mudumbai Chakravarthy (Redmond, WA); Jakub Piotr Kotynia (Redmond, WA); Jason Christopher Tan (Woodinville, WA); Skyler Mark Goodell (Bothell, WA)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
G06F40/18G06F40/40
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,499,306
App. No.
18/314,994
Granted
Dec 16, 2025
Kind
B2
Abstract

Technology is disclosed herein for an application service which interfaces with an LLM service. In an implementation, the application service receives a natural language input from a user associated with a spreadsheet. The application service generates multiple prompts based on the natural language input and a portion of the spreadsheet and determines an order in which to input the prompts to an LLM service. The application service determines an order in which to input the prompts to an LLM service, then inputs the prompts to the LLM service according to the determined order.

Claims (43)

1 . A computing apparatus comprising:

one or more computer-readable storage media;

one or more processors operatively coupled with the one or more computer-readable storage media; and

an application comprising program instructions stored on the one or more computer-readable storage media that, when executed by the one or more processors, direct the computing apparatus to at least:

receive, via a user interface of the application, a natural language input associated with a user with of a spreadsheet;

generate and submit multiple prompts to a large language model (LLM) service, wherein an initial prompt of the multiple prompts comprises the natural language input and a portion of the spreadsheet, wherein the initial prompt tasks the LLM service with generating a suggested formula responsive to the natural language input and returning a first output comprising the suggested formula in a parse-able format, and wherein a second prompt of the multiple prompts tasks the LLM service with generating a description of the suggested formula and returning a second output comprising the description of the suggested formula in the parse-able format;

store the first output and the second output received from the LLM service in a data structure associated with the spreadsheet;

parse the first output according to the parse-able format to extract the suggested formula for display in the user interface;

parse the second output according to the parse-able format to extract the description of the suggested formula and display, via the user interface, a graphical input device to display the description of the suggested formula;

receive, via the user interface, user input comprising a selection of the graphical input device; and

enable, via the user interface, display of the description of the suggested formula.

2 . The computing apparatus of claim 1 , wherein the parse-able format comprises one or more of: semantic tags and JavaScript Object Notation.

3 . The computing apparatus of claim 2 , wherein the second prompt is sent to the LLM service after the initial prompt.

4 . The computing apparatus of claim 3 , wherein a third prompt of the multiple prompts is sent after the second prompt, and wherein the third prompt comprises a request for the LLM service to output an explanation of the formula.

5 . The computing apparatus of claim 1 , wherein the program instructions further direct the computing apparatus to display replies by the LLM service in a progressive series of conversational dialogs in response to input by the user to proceed through the replies on a per-reply basis.

6 . The computing apparatus of claim 5 , wherein the program instructions direct the computing apparatus to input the multiple prompts to the LLM service prior to receiving any of the replies from the LLM service.

7 . The computing apparatus of claim 1 , wherein to input the multiple prompts to the LLM service, the program instructions direct the computing apparatus to input each prompt of the multiple prompts in-series to the LLM service.

8 . The computing apparatus of claim 7 , wherein to input the multiple prompts to the LLM service, the program instructions direct the computing apparatus to wait for a reply to a current one of the multiple prompts before inputting a next one of the multiple prompts.

9 . A method comprising:

receiving, via a user interface of an application, a natural language input associated with a user of a spreadsheet;

generating and submitting multiple prompts to a large language model (LLM) service, wherein an initial prompt of the multiple prompts comprises the natural language input and a portion of the spreadsheet, wherein the initial prompt tasks the LLM service with generating a suggested formula responsive to the natural language input and returning a first output comprising the suggested formula in a parse-able format, and wherein a second prompt of the multiple prompts tasks the LLM service with generating a description of the suggested formula and returning a second output comprising the description of the suggested formula in the parse-able format;

storing the first output and the second output received from the LLM service in a data structure associated with the spreadsheet;

parsing the first output according to the parse-able format to extract the suggested formula for display in the user interface;

parsing the second output according to the parse-able format to extract the description of the suggested formula and displaying, via the user interface, a graphical input device to display the description of the suggested formula;

receiving, via the user interface, user input comprising a selection of the graphical input device; and

enabling, via the user interface, display of the description of the suggested formula.

10 . The method of claim 9 , wherein a first one of the prompts comprises a request for the LLM service to output a formula for the spreadsheet the parse-able format comprises one or more of: semantic tags and JavaScript Object Notation.

11 . The method of claim 10 wherein the second prompt is sent to the LLM service after the initial prompt.

12 . The method of claim 11 , wherein a third prompt of the multiple prompts is sent after the second prompt, and wherein the third prompt comprises a request for the LLM service to output an explanation of the formula.

13 . The method of claim 9 , further comprising displaying replies by the LLM service in a progressive series of conversational dialogs in response to input by the user to proceed through the replies on a per-reply basis.

14 . The method of claim 13 , wherein inputting the multiple prompts to the LLM service occurs prior to receiving any of the replies from the LLM service.

15 . One or more computer-readable storage media having program instructions stored thereon that, when executed by one or more processors operatively coupled with the one or more computer-readable storage media, direct a computing device to:

receive, via a user interface of an application, a natural language input associated with a user of a spreadsheet;

generate and submit multiple prompts to a large language model (LLM) service, wherein an initial prompt of the multiple prompts comprises the natural language input and a portion of the spreadsheet, wherein the initial prompt tasks the LLM service with generating a suggested formula responsive to the natural language input and returning a first output comprising the suggested formula in a parse-able format, and wherein a second prompt of the multiple prompts tasks the LLM service with generating a description of the suggested formula and returning a second output comprising the description of the suggested formula in a parse-able format;

store the first output and the second output received from the LLM service in a data structure associated with the spreadsheet;

parse the first output according to the parse-able format to extract the suggested formula and display, via the user interface, a graphical input device to display the description of the suggested formula;

receive, via the user interface, user input comprising a selection of the graphical input device; and

display, via the user interface, the description of the suggested formula.

16 . The one or more computer-readable storage media of claim 15 , wherein a first one of the prompts comprises a request for the LLM service to output a formula for the spreadsheet the parse-able format comprises one or more of: semantic tags and Javascript Object Notation.

17 . The one or more computer-readable storage media of claim 16 , wherein the second prompt is sent to the LLM service after the initial prompt.

18 . The one or more computer-readable storage media of claim 17 , wherein a third prompt of the multiple prompts is sent after the second prompt, and wherein the third prompt comprises a request for the LLM service to output an explanation of the formula.

19 . The one or more computer-readable storage media of claim 15 , wherein the program instructions further direct the computing device to display replies by the LLM service in a progressive series of conversational dialogs in response to input by the user to proceed through the replies on a per-reply basis.

20 . The one or more computer-readable storage media of claim 19 , wherein the program instructions direct the computing device to input the multiple prompts to the LLM service prior to receiving any of the replies from the LLM service.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 10, 2023
From: FABIAN, DANIEL; BABANOV, ALEXANDER A.; MUDUMBAI CHAKRAVARTHY, RASIKA; KOTYNIA, JAKUB PIOTR; TAN, JASON CHRISTOPHER; GOODELL, SKYLER MARK
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 063595/0301 →
Continuity (2)
Provisional Application 63489683 · Mar 10, 2023
Related Publication 20240303423A1 · Sep 12, 2024
References Cited (18)
US 20240249080A1 · Sun · 2024 [cited by examiner]
US 20240249081A1 · UzZaman · 2024 [cited by examiner]
Kojima et al. “Large Language Models are Zero-Shot Reasoners”. 36th Conference on Neural Information Processing Systems (NeurIPS 2022 (Year: 2022). [cited by examiner]
Wachtel et al. “Initial implementation of natural language turn-based dialog system”. 7th International Conference in Intelligent Human Computer Interaction, IHCI 2015, Procedia Computer Science 84 (2016), 49-56 (Year: … [cited by examiner]
Arora et al. “Ask Me Anything: a Simple Strategy for Prompting Language Models”. arXiv:2210.02441v3 [cs.CL] Nov. 20, 2022 (Year: 2022). [cited by examiner]
Wu et al. “PromptChainer: Chaining Large Language Model Prompts through Visual Programming”. CHI '22 Extended Abstracts, Apr. 29-May 5, 2022, New Orleans, LA, USA (Year: 2022). [cited by examiner]
Zhang et al. “Automatic Chain of Through Prompting in Large Language Models”. arXiv:2210.03493v1 [cs.CL] Oct. 7, 2022 (Year: 2022). [cited by examiner]
White et al. “A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT”. arXiv:2302.11382v1 [cs. SE] Feb. 21, 2023 ( Year: 2023). [cited by examiner]
Anonymous, “Holy Google Sheets! You Can Now Integrate the ChatGPT API”, Retrieved from the URL: https://ai.plainenglish.io/holy-google-sheets-you-can-now-integrate-the-chatgptapi-b401ac065844, Mar. 8, 2023, 7 Pages. [cited by applicant]
Gislason, Hjalmar, “Generative AI and spreadsheets”, Retrieved from the URL: https://medium.grid.is/gpt-3-and-spreadsheets-4808acfda30d, Feb. 8, 2023, 7 Pages. [cited by applicant]
Gislason, Hjalmar, “Launching GRID 2.0: the magical surface for numbers”, Retrieved from the URL: https://grid.is/blog/launching-grid-2-0-the-magical-surface-for-numbers, Feb. 14, 2023, 3 Pages. [cited by applicant]
International Search Report and Written Opinion received for PCT Application No. PCT/US2024/018450, May 27, 2024, 15 pages. [cited by applicant]
Kogan, Daniel, “ChatGPT and Excel: Excelhero”, Retrieved from the URL: https://web.archive.org/web/20230306105400/https://excelhero.de/ki/chatgpt-und-excel/, Mar. 6, 2023, 28 Pages. [cited by applicant]
Mcnutt, et al., “On the Design of AI-powered Code Assistants for Notebooks”, In Repository of arXiv:2301.11178, Jan. 26, 2023, 18 Pages. [cited by applicant]
Ragavan, et al., “GridBook: Natural Language Formulas for the Spreadsheet Grid”, In Proceedings of the 27th ACM symposium on virtual reality software and technology, Mar. 22, 2022, pp. 345-368. [cited by applicant]
Ross, et al., “The Programmer's Assistant: Conversational Interaction with a Large Language Model for Software Development”, In repository of arXiv2302.07080v1, Feb. 14, 2023, 43 Pages. [cited by applicant]
Sarkar, et al., “What is it like to program with artificial intelligence?”, In Repository of arXiv:2208.06213v1, Aug. 12, 2022, 26 Pages. [cited by applicant]
International Preliminary Report on Patentability (Chapter I) received for PCT Application No. PCT/US2024/018450, mailed on Sep. 18, 2025, 08 pages. [cited by applicant]