Title: I&#x27;ve been playing with the idea of an LLM prompt that causes the model to generate and return a new prompt. <a href="https:&#x2F;&#x2F;github.com&#x2F;andyk&#x2F;recursive_llm">https:&#x2F;&#x2F;github.com&#x2F;andyk&#x2F;recursive_llm</a><p>The idea I&#x27;m starting with is to implement recursion using English as the programming language and GPT as the runtime.<p>It’s kind of like traditional recursion in code, but instead of having a function that calls itself with a different set of arguments, there is a prompt that returns itself with specific parts updated to reflect the new arguments.<p>Here is a prompt for infinitely generating Fibonacci numbers:<p>&gt; You are a recursive function. Instead of being written in a programming language, you are written in English. You have variables FIB_INDEX = 2, MINUS_TWO = 0, MINUS_ONE = 1, CURR_VALUE = 1. Output this paragraph but with updated variables to compute the next step of the Fibbonaci sequence.<p>Interestingly, I found that to get a base case to work I had to add quite a bit more text (i.e. the prompt I arrived at is more than twice as long <a href="https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;andyk&#x2F;recursive_llm&#x2F;main&#x2F;prompt_fibonnaci_include_math.txt" rel="nofollow">https:&#x2F;&#x2F;raw.githubusercontent.com&#x2F;andyk&#x2F;recursive_llm&#x2F;main&#x2F;p...</a>)
Upvote: