Skip to content

Conversation

@devpatelio
Copy link
Collaborator

@devpatelio devpatelio commented Jan 12, 2026

Working draft and design for RLM (see blog) for SkyRL Gym.

  • REPL execution: Executes Python code from blocks in model responses
  • Recursive LLM calls: Supports llm_query() for nested LLM calls from code
  • Context management: Loads and exposes context data (strings, dicts, lists) to the REPL
  • Multi-turn loop: Iterates up to max_turns until a final answer is found
  • Final answer extraction: Detects FINAL(...) or FINAL_VAR(name) patterns

Reference Code: rlm/rlm repo

TODO:

  • Change the RLM client to be the inference client being used during the generation run
  • Test on long-context benchmarks and return results for inference
  • Evaluate RLM output "FINAL(answer)" and modify with parser

gemini-code-assist[bot]

This comment was marked as outdated.

@devpatelio
Copy link
Collaborator Author

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a Recursive Language Model (RLM) tool and environment for SkyRL Gym. The changes include a new RLMExecutorEnv environment, a powerful RLMExecutorToolGroup with a sandboxed Python REPL for secure code execution, and supporting utilities and configuration. The implementation is comprehensive, with good attention to security aspects like sandboxing code execution. My review focuses on improving code clarity, robustness, and configuration flexibility. I've suggested changes to make parts of the new environment more configurable, improve logging and error handling, and refine some implementation details for efficiency and correctness. I also noted a potentially impactful change in an existing shell script.

devpatelio and others added 10 commits January 12, 2026 03:53
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@devpatelio devpatelio self-assigned this Jan 12, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@devpatelio devpatelio changed the title [draft] RLM Tool for SkyRL Environments RLM Tool for SkyRL Environments Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant