grishahq/recursive-llm ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python library called Recursive Language Models that lets me work with really long documents without stuffing everything into the prompt.

I want to pass in a query and a huge context, and have the library store that context in a Python REPL style worker so the model can inspect parts of it recursively, search through it, and answer with less token usage. Please include a simple main API like complete, plus a result version that returns the answer, stats, and a trajectory of what happened. I also want async support and a safe failure result so runs can be saved even when something goes wrong.

Make it easy to use with common LLM providers, and include basic usage examples, stats like calls, tokens, and estimated cost, plus a couple of benchmark scripts for comparing recursive mode versus direct mode. If you need current provider docs or pricing details, look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab