nowfound

AI · March 20, 2023

RL

Recursive LLM Prompts

I've been playing with the idea of an LLM prompt that causes the model to generate and return a new prompt. https://github.com/andyk/recursive_llm The idea I'm starting with is to implement recursion using English as the programming language and GPT as the runtime. 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. Here is a prompt for infinitely generating Fibonacci numbers: > You are a…

In plain words

Recursive LLM Prompts is a tool that uses language models to implement recursion through English-language prompts rather than traditional code. Instead of functions calling themselves, prompts return modified versions of themselves with updated variables to reflect new parameters. The approach treats English as a programming language and the language model as the runtime, enabling iterative computation like generating infinite Fibonacci sequences. It's designed for developers exploring unconventional ways to structure computation through large language models.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

I've been playing with the idea of an LLM prompt that causes the model to generate and return a new prompt. https://github.com/andyk/recursive_llm The idea I'm starting with is to implement recursion using English as the programming language and GPT as the runtime. 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. Here is a prompt for infinitely generating Fibonacci numbers: > 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. 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 https://raw.githubusercontent.com/andyk/recursive_llm/main/p...)

More ai this month

the category →
  • I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

    AI · 17d ago · simedw.com

  • Astute585

    Automate your B2B brand going viral, with new media creators

    AI · 18d ago · company-app.joinastute.com

  • Grok Bot547

    AI teammates that you can give real work to

    AI · 25d ago · x.ai

  • Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…

    AI · 26d ago · cactuscompute.com

  • Make your software self-driving

    AI · 30d ago · coldtea.ai

  • Soloop472

    Approval-first Agent OS for solo founders

    AI · 30d ago · soloop.io

Launched alongside, March 2023

the whole month →
  • GPT-41,161

    LLM that exhibits human-level performance

    AI · 2023 · openai.com

  • Collato972

    One AI search to find anything instantly, across all apps

    AI · 2023

  • A better UI for ChatGPT

    AI · 2023 · typingmind.com

  • Meet the internet again

    Work · 2023 · apps.apple.com

  • Sequoia726

    Anonymous sexual health app for men

    Life & fun · 2023 · sequoia.health

  • BI

    I'm a big fan of the BBC podcast In Our Time -- and (like most people) I've been playing with the OpenAI APIs. In Our Time has almost 1,000 episodes on everything from Cleopatra to the evolution of teeth to plasma physics, all still available, so it's my starting point to learn about most topics. But it's not well organised. So here are the episodes sorted by library code. It's fun to explore. Web scraping is usually pretty tedious, but I found that I could send the minimised HTML to GPT-3 and get (almost) perfect JSON back: the prompt includes the Typescript definition. At the same time I…

    AI · 2023 · genmon.github.io