Skip to content

Add CLI support for running RecursiveMAS on custom prompts#18

Open
lamm-mit wants to merge 7 commits into
RecursiveMAS:mainfrom
lamm-mit:custom-runs
Open

Add CLI support for running RecursiveMAS on custom prompts#18
lamm-mit wants to merge 7 commits into
RecursiveMAS:mainfrom
lamm-mit:custom-runs

Conversation

@lamm-mit
Copy link
Copy Markdown

@lamm-mit lamm-mit commented May 1, 2026

Summary

  • Added run_custom.py, a CLI entry point for running RecursiveMAS on user-provided prompts without modifying benchmark datasets.
  • Supports custom inputs from repeated -q/--question flags or .txt, .json, .jsonl, and .ndjson files.
  • Adds task routing for math, choice, and code, plus a new custom reasoning mode for open-ended prompts, mapping each mode onto the existing RecursiveMAS inference pipelines and prompt/evaluation
    families.
  • Captures the internal runner JSONL output, normalizes it into cleaner per-sample records, prints readable outputs, and optionally writes results with --output_jsonl.
  • Adds controls for sampling, rollouts, recursion depth, token limits, dtype/device settings, answer-format retries, pipeline log capture, and tool/code-generation options.
  • Updated the README with run_custom.py in the project layout, a short component description, supported file formats, task guidance, and examples for direct prompts, file-based prompts, and collaboration-style comparisons.

Example usage

python run_custom.py --style sequential_scaled --task reasoning \
  -q "In materiomics, a material is studied across atomic, molecular, microstructural, and macroscopic scales. Explain how hierarchical structure can create toughness in bone while preserving stiffness." \
  --device cuda

Validation

  • Checked the README custom prompt section against the implemented CLI behavior.
  • Verified run_custom.py syntax with python -m py_compile run_custom.py

TODO: Replace the current compatibility-layer implementation with a first-class custom dataset and inference API. The present runner intentionally reuses the existing benchmark-oriented inference path so that custom prompts behave consistently with the current RecursiveMAS pipelines, but a dedicated custom inference endpoint would make this workflow cleaner, easier to maintain, and less dependent on runtime adaptation.

@RecursiveMAS RecursiveMAS requested a review from jiaruzouu May 3, 2026 03:46
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.

2 participants