IP Library Granted Patent US 12,367,336
Granted Patent B2
US 12,367,336 · App. 18/314,685 · Granted Jul 22, 2025

Chain of thought reasoning for LLM integrations in spreadsheet environments

Inventors: Daniel Fabian (Wabern, CH); Rasika Mudumbai Chakravarthy (Redmond, WA); Carina Suzana Negreanu (Cambridge, GB); John Herbert Martin Williams (Cambridge, GB)
Assignee: MICROSOFT TECHNOLOGY LICENSING, LLC
G06F40/18G06F16/3329
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,367,336
App. No.
18/314,685
Granted
Jul 22, 2025
Kind
B2
Abstract

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.

Claims (47)

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

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, in a user interface of an application hosting a spreadsheet, a natural language request from a user for a formula suggestion for the spreadsheet;

input a first prompt to a large language model (LLM) service to provide the formula suggestion for the spreadsheet in response to the natural language request;

receive a first output from the LLM service that includes a first formula in a programming language having a syntax that does not support comments;

generate a second prompt instructing the LLM service to provide a chain-of-thought breakdown of the first formula;

receive a second output comprising the chain-of-thought breakdown of the first formula in the same programming language as the first formula, wherein the chain-of-thought breakdown comprises multiple portions and multiple comments corresponding to the multiple portions;

display, in the user interface, a progression of the multiple portions of the chain-of-thought breakdown and the multiple comments corresponding to the multiple portions;

receive, in the user interface, user input comprising an acceptance of a given portion of the multiple portions; and

execute the first formula in the spreadsheet.

2. The computing apparatus of claim 1 , wherein to display the progression of the multiple portions of the chain-of-thought breakdown and the multiple comments corresponding to the multiple portions, the program instructions further direct the computing apparatus to advance the progression to a next portion of the multiple portions in response to receiving the user input comprising the acceptance of the given portion.

3. The computing apparatus of claim 2 , wherein the chain-of-thought breakdown comprises a LET function.

4. The computing apparatus of claim 3 , wherein the programming language comprises a non-procedural programming language native to a spreadsheet application hosting the spreadsheet.

5. The computing apparatus of claim 1 , wherein to display the progression of the multiple portions of the chain-of-thought breakdown and the multiple comments corresponding to the multiple portions, the program instructions further direct the computing apparatus to receive user input in the user interface of the application to accept or reject each portion of the multiple portions after displaying the respective portion.

6. The computing apparatus of claim 5 , wherein the program instructions further direct the computing apparatus to generate a new prompt to the LLM service when a portion of the multiple portions is rejected.

7. The computing apparatus of claim 1 , wherein the chain-of-thought breakdown comprises a decomposition of the first formula into the multiple portions, wherein each portion of the multiple portions comprises an intermediate step in computing the first formula.

8. The computing apparatus of claim 7 , wherein the first prompt includes at least a portion of the spreadsheet.

9. A method comprising:

receiving, in a user interface of an application hosting a spreadsheet, a natural language request from a user for a formula suggestion for the spreadsheet;

inputting a first prompt to a large language model (LLM) service to provide the formula suggestion for a spreadsheet;

receiving a first output from the LLM service that includes a first formula in a programming language having a syntax that does not support comments;

generating a second prompt instructing the LLM service to provide a chain-of-thought breakdown of the first formula;

receiving a second output comprising the chain-of-thought breakdown of the first formula in the same programming language as the first formula, wherein the chain-of-thought breakdown comprises multiple portions and multiple comments corresponding to the multiple portions;

displaying, in the user interface, a progression of the multiple portions of the chain-of-thought breakdown and the multiple comments corresponding to the multiple portions;

receiving, in the user interface, user input comprising an acceptance of a given portion of the multiple portions; and

executing the first formula in the spreadsheet.

10. The method of claim 9 , wherein displaying the progression of the multiple portions of the chain-of-thought breakdown and the multiple comments corresponding to the multiple portions comprises advancing the progression to a next portion of the multiple portions in response to receiving the user input comprising the acceptance of the given portion.

11. The method of claim 10 , wherein the chain-of-thought breakdown comprises a LET function.

12. The method of claim 11 , wherein the programming language comprises a non-procedural programming language native to a spreadsheet application hosting the spreadsheet.

13. The method of claim 9 , wherein displaying the progression of the multiple portions of the chain-of-thought breakdown and the multiple comments corresponding to the multiple portions comprises receiving user input in the user interface of the application to accept or reject each portion of the multiple portions after displaying the respective portion.

14. The method of claim 13 , further comprising generating a new prompt to the LLM service when a portion of the multiple portions is rejected.

15. The method of claim 9 , wherein the chain-of-thought breakdown comprises a decomposition of the first formula into the multiple portions, wherein each portion of the multiple portions comprises an intermediate step in computing the first formula.

16. 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, in a user interface of an application hosting a spreadsheet, a natural language request from a user for a formula suggestion for the spreadsheet;

input a first prompt to a large language model (LLM) service to provide a formula suggestion for the spreadsheet in response to the natural language request;

receive a first output from the LLM service that includes a first formula in a programming language having a syntax that does not support comments;

generate a second prompt instructing the LLM service to provide a chain-of-thought breakdown of the first formula;

receive a second output comprising the chain-of-thought breakdown of the first formula in the same programming language as the first formula, wherein the chain-of-thought breakdown comprises multiple portions and multiple comments corresponding to the multiple portions;

display, in the user interface, a progression of the multiple portions of the chain-of-thought breakdown and the multiple comments corresponding to the multiple portions;

receive, in the user interface, user input comprising an acceptance of a given portion of the multiple portions; and

execute the first formula in the spreadsheet.

17. The one or more computer-readable storage media of claim 16 , wherein to display the progression of the multiple portions of the chain-of-thought breakdown, the program instructions direct the computing device to advance the progression to a next portion of the multiple portions in response to receiving the user input comprising the acceptance of the given portion.

18. The one or more computer-readable storage media of claim 17 , wherein the chain-of-thought breakdown comprises a LET function.

19. The one or more computer-readable storage media of claim 18 , wherein the programming language comprises a non-procedural programming language native to a spreadsheet application hosting the spreadsheet.

20. The one or more computer-readable storage media of claim 17 , wherein to display the progression of the multiple portions of the chain-of-thought breakdown and the multiple comments corresponding to the multiple portions, the program instructions further direct the computing device to receive user input in the user interface of the application to accept or reject each portion of the multiple portions after displaying the respective portion.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 9, 2023
From: FABIAN, DANIEL; MUDUMBAI CHAKRAVARTHY, RASIKA; NEGREANU, CARINA SUZANA; WILLIAMS, JOHN HERBERT MARTIN
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 063585/0955 →
Continuity (2)
Provisional Application 63489731 · Mar 10, 2023
Related Publication 20240303422A1 · Sep 12, 2024
References Cited (21)
US 20030069868A1 · Vos · 2003 [cited by examiner]
US 20030187703A1 · Bonissone · 2003 [cited by examiner]
US 20070220415A1 · Cheng · 2007 [cited by examiner]
US 20170315979A1 · Boucher · 2017 [cited by examiner]
US 20210406256A1 · Meling · 2021 [cited by examiner]
US 20230244938A1 · Wei · 2023 [cited by examiner]
US 20230325587A1 · Sarkar · 2023 [cited by examiner]
US 20230394328A1 · Wei · 2023 [cited by examiner]
US 20240256964A1 · Tay · 2024 [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]
Barke, et al., “Grounded Copilot: How Programmers Interact with Code-Generating Models,” In Proceedings of the ACM on Programming Languages, vol. 7, No. OOPSLA1, Oct. 31, 2022, pp. 85-111. [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/018449, May 24, 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]
Qiao, et al., “Reasoning with Language Model Prompting: A Survey”, In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics, Long Papers, vol. 1, Dec. 19, 2022, pp. 5368-5393. [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]
Wei, et al., “Chain-of-thought prompting elicits reasoning in large language models”, In Repository of arXiv:2201.11903v6, Jan. 10, 2023, 43 pages. [cited by applicant]