avbiswas/fast-rlm

A feature rich implementation of Recursive Language Models, with ACP integration, REPL tool support, structured IO, advanced visualization, logging tools.

What it solves

fast-rlm 提供了一个极简的 Recursive Language Models (RLMs) 实现,允许 LLM 处理超出其上下文窗口 (context window) 的问题。它通过让代理 (agent) 通过外部 REPL 以编程方式探索、分解和转换数据,而不是试图将所有信息放入单个提示词中,从而解决了上下文溢出问题。

How it works

该系统使用一个 REPL (由 Deno 和 Pyodide 提供动力),其中 LLM 可以编写并执行代码来操作其输入。代理不再是将所有数据加载到提示词中,而是通过代码与数据进行交互。它可以递归地调用子代理 (sub-agents) 来处理更小的子任务,从而使得响应作为父代理 REPL 环境中的变量或符号 (symbols) 返回,从而防止父代理的上下文是否变得杂乱。

Who it’s for

需要处理海量数据集或复杂任务,而无需手动分块 (chunking) 或复杂的 RAG 管道 (pipelines) 流程,且需要编程式分解和递归代理工作流的开发者和 AI 研究人员。

Highlights

  • Arbitrarily Long Context: Agents 可以编程式地搜索、过滤和分块 (chunking) 海量文件 (例如,数百万个 token) 。
  • Recursive Delegation: 能够产生子代理 (sub-agents) 来完成具有隔离上下文的子任务。
  • Structured I/O: 支持 Pydantic models、JSON Schema 和 Python primitives 进行了输入和输出验证。
  • Resumable Sessions: 状态在每一步之后都会自动保存,允许后续查询重新使用之前的工作和变量。
  • **Structured I/-- hought }

Wait, I see a mistake in my manual thought process. Let me re-generate the full JSON correctly. I will ensure the JSON is valid and follows the schema. I will not include any control characters like or inside the JSON values, but the prompt says

相关

  • 项目
  • 项目
  • 项目
  • 项目
  • 项目