Recursive Task Decomposition in Excel ![rw-book-cover](https://i.ytimg.com/vi/jJShRQ-S75s/maxresdefault.jpg) ## Metadata - Author: [[Chris Price]] - Full Title: Recursive Task Decomposition in Excel - Category: #articles - Document Note: Short Summary for [Recursive Task Decomposition in Excel](https://www.youtube.com/watch?v=jJShRQ-S75s) by [Merlin](https://merlin.foyer.work/) Title: Excel Recursive Task Decomposition for Implementing Model Invocations in Edgar Allan Poe's The Telltale Heart [00:01](https://www.youtube.com/watch?v=jJShRQ-S75s&t=1) Using Excel's dependency tracking with custom functions for recursive task decomposition [00:15](https://www.youtube.com/watch?v=jJShRQ-S75s&t=15) Using decomposition to summarize a short story [00:29](https://www.youtube.com/watch?v=jJShRQ-S75s&t=29) Exploring the selected cell and its content [00:41](https://www.youtube.com/watch?v=jJShRQ-S75s&t=41) The outermost function invokes the chat completion endpoint. [00:55](https://www.youtube.com/watch?v=jJShRQ-S75s&t=55) Calculating parameters using template prompt and Excel functions [01:09](https://www.youtube.com/watch?v=jJShRQ-S75s&t=69) Use named range parameters in Excel formulas [01:29](https://www.youtube.com/watch?v=jJShRQ-S75s&t=89) Using output from previous steps as inputs [01:56](https://www.youtube.com/watch?v=jJShRQ-S75s&t=116) Rapidly prototype model invocation with openAI custom functions --------------------------------- Detailed Summary for [Recursive Task Decomposition in Excel](https://www.youtube.com/watch?v=jJShRQ-S75s) by [Merlin](https://merlin.foyer.work/) Title: Excel Recursive Task Decomposition for Implementing Model Invocations in Edgar Allan Poe's The Telltale Heart [00:01](https://www.youtube.com/watch?v=jJShRQ-S75s&t=1) Using Excel's dependency tracking with custom functions for recursive task decomposition - Showcasing the implementation of a chain of model invocations in Excel - Utilizing the technique of recursive task decomposition for the demonstration [00:15](https://www.youtube.com/watch?v=jJShRQ-S75s&t=15) Using decomposition to summarize a short story - The video discusses using decomposition to summarize Edgar Allen Poe's 'The Telltale Heart.' - It explains how to utilize individual paragraphs of the story and the prompt to complete the summary. [00:29](https://www.youtube.com/watch?v=jJShRQ-S75s&t=29) Exploring the selected cell and its content - Understanding the formula - Realizing the simplicity of the process [00:41](https://www.youtube.com/watch?v=jJShRQ-S75s&t=41) The outermost function invokes the chat completion endpoint. - The custom function uses the open AI model API or playground with a prompt. - The chat completion endpoint is invoked for an open AI model. [00:55](https://www.youtube.com/watch?v=jJShRQ-S75s&t=55) Calculating parameters using template prompt and Excel functions - The prompt in the tool tip is derived from the template prompt in the blue cell - Built-in Excel functions are used to replace the placeholders with the sample output [01:09](https://www.youtube.com/watch?v=jJShRQ-S75s&t=69) Use named range parameters in Excel formulas - Named ranges can be referenced from another sheet - Formulas can be evaluated for multiple input pairs [01:29](https://www.youtube.com/watch?v=jJShRQ-S75s&t=89) Using output from previous steps as inputs - Applying the formula with the outputs as inputs to the next step - Obtaining the final answer by following the process [01:56](https://www.youtube.com/watch?v=jJShRQ-S75s&t=116) Rapidly prototype model invocation with openAI custom functions - Easily observe partial results of each step in the chain - Summary: This video demonstrates how to use the dependency tracking feature in Excel, along with custom functions, to implement recursive task decomposition. The example uses the short story "The Telltale Heart" by Edgar Allan Poe. The left side of the Excel sheet contains the paragraphs of the story, the prompt, and placeholders. The formula in the selected cell invokes an OpenAI model to generate completions based on the prompt and sample values. The formula is evaluated for all pairs of input paragraphs and recursively applied to generate the final answer. This approach allows for rapid prototyping of a chain of model invocations using just an Excel spreadsheet and custom functions. - URL: https://www.youtube.com/watch?v=jJShRQ-S75s this video demonstrates using the inherent dependency tracking in Excel together with our own open aai custom functions to implement a chain of model invocations in this case we're going to use a technique called recursive Tas decomposition to summarize a short story Edgar alen pose The Telltale Heart to orient you down the left we have the individual paragraphs of the story at the top we have the prompt complete with placeholders for the pairs of paragraphs we'll be considering finally to the right of those we have the selected cell which is where the interesting stuff starts happening this formula might look intimidating but it's quite easy to follow if we break it down the outermost function is our custom function which invokes the chat completion end point for an open AI model as with using the API or the playground it requires a prompt and some miscellaneous parameters The Prompt which you can see in the tool tip is calculated by taking the template prompt from the blue blue cell and using built-in Excel functions to substitute the placeholders with the sample values from the red and purple cells the parameters come from a named range in the other sheet let's evaluate this formula and see what results we get so far so good let's evaluate it for all the pairs of input paragraphs and now let's recursively apply the formula by using those output paragraphs as the inputs to the next and we have our final answer I'm no literary scholar but that seems reasonable to me using just an Excel spread sheeet and our openai custom functions we've been able to rapidly prototype a chain of model invocation with each of the partial results easily observable, Recursive Task Decomposition in Excel, Chris Price, 01hksrem2mdc1kyzd13hfz9xpm.