<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sam Huang | UCSC OSPO</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sam-huang/</link><atom:link href="https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sam-huang/index.xml" rel="self" type="application/rss+xml"/><description>Sam Huang</description><generator>Wowchemy (https://wowchemy.com)</generator><language>en-us</language><lastBuildDate>Wed, 05 Nov 2025 00:00:00 +0000</lastBuildDate><image><url>https://deploy-preview-1007--ucsc-ospo.netlify.app/media/logo_hub6795c39d7c5d58c9535d13299c9651f_74810_300x300_fit_lanczos_3.png</url><title>Sam Huang</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/author/sam-huang/</link></image><item><title>Final Report for Smart Environments</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20251105-sam_huang/</link><pubDate>Wed, 05 Nov 2025 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20251105-sam_huang/</guid><description>&lt;h2 id="introduction">Introduction&lt;/h2>
&lt;p>The process of creating the necessary software environment for code to run is a significant challenge in software development. Given a piece of open-source software intended for research, setting up the environmental dependencies to run the software could take significant manual effort. Existing automation methods struggle due to the complexity of managing diverse languages, dependencies, and hardware. In Smart Environments, I have created ENVAGENT, a general multi-agent framework designed to automate the construction of executable environments for reproducing research prototypes from top-tier conferences and journals. While reproducibility has become a growing concern in the research community, the process of setting up environments remains time-consuming, error-prone, and often poorly documented.&lt;/p>
&lt;p>To assess this capability, a new benchmark, ENVBENCH, was created, containing 54 popular projects across seven languages. Results show ENVAGENT dramatically improves environment construction compared to current agents (+16.2%). Furthermore, the system shows initial promise in dynamically adjusting cloud-based hardware resources based on the code’s needs.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="EnvGym Cover" srcset="
/report/osre25/uchicago/smart_environments/20251105-sam_huang/cover_hue02fdf353b4e99cf1af213026c4f6804_1815797_30e3b2194be140fa608780847e6c7fa1.webp 400w,
/report/osre25/uchicago/smart_environments/20251105-sam_huang/cover_hue02fdf353b4e99cf1af213026c4f6804_1815797_d39b2369b5df80ffa715197c993f0681.webp 760w,
/report/osre25/uchicago/smart_environments/20251105-sam_huang/cover_hue02fdf353b4e99cf1af213026c4f6804_1815797_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20251105-sam_huang/cover_hue02fdf353b4e99cf1af213026c4f6804_1815797_30e3b2194be140fa608780847e6c7fa1.webp"
width="760"
height="760"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="method">Method&lt;/h2>
&lt;h3 id="envagent">EnvAgent&lt;/h3>
&lt;p>The EnvAgent I created during my time at OSRE utilizes a multi-agent workflow to automatically build software execution environments. The process is structured into three phases: preparation, construction, and refinement.&lt;/p>
&lt;p>Phase 1 (Preparation): Specialized agents collect information about the software repository – its structure, relevant files, and the host system’s hardware specifications (CPU, memory, etc.). This data is then used by a planning agent to generate a detailed, step-by-step instruction set for creating a functional Dockerfile.&lt;/p>
&lt;p>Phase 2 (Construction): Two agents work in tandem: one generates or modifies the Dockerfile based on the plan, while the other executes the Dockerfile within an isolated container, capturing any errors.&lt;/p>
&lt;p>Phase 3 (Refinement): A final agent analyzes the container execution data, identifying areas for improvement in the Dockerfile. This process repeats until a stable, executable environment is achieved.&lt;/p>
&lt;p>To improve efficiency, EnvAgent incorporates rule-based tools for predictable tasks like directory setup and log management, reducing the need for complex agent reasoning. This combination of intelligent agents and automated routines (&amp;ldquo;scaffolding&amp;rdquo;) ensures a robust and adaptive system.&lt;/p>
&lt;h3 id="enveval-benchmark">EnvEval Benchmark&lt;/h3>
&lt;p>In addition to the agent, one significant contribution is the manual curation of a benchmark that measures the quality of generated environments. EnvEval is a benchmark specifically designed to assess environment setup qualities across 54 carefully curated open-source repositories. They are chosen from both Chameleon reproducible artifacts and Multi-SWE-bench dataset. EnvEval contains json rubrics that can be used to automatically determine the quality of constructed environments.&lt;/p>
&lt;p>Each rubric is divided into three parts, corresponding to three major objectives that a successfully constructed environment should have:&lt;/p>
&lt;ol>
&lt;li>Structure: Checks for basic directory structure, file presence, and environment variables.&lt;/li>
&lt;li>Configuration: Asks the question &amp;ldquo;Is this configured?&amp;rdquo;, checks for whether dependencies have been correctly configured.&lt;/li>
&lt;li>Functionality: Asks the question &amp;ldquo;Is this usable?&amp;rdquo;, runs actual tests to see if the functionalities are present.&lt;/li>
&lt;/ol>
&lt;p>There are many tests in each category, and their weights are adjusted based on their importance.&lt;/p>
&lt;h2 id="evaluation">Evaluation&lt;/h2>
&lt;p>Baseline Systems:&lt;/p>
&lt;p>The study compared EnvAgent to two established automated code generation systems: one utilizing Anthropic’s advanced reasoning models and the other employing OpenAI’s code-focused models. These systems were chosen for their strong performance in creating software code and their prevalence in automated engineering processes. Both baselines were given full access to the target software repositories and complete details about the host system’s hardware.&lt;/p>
&lt;p>Evaluation Metrics:&lt;/p>
&lt;p>The performance of EnvAgent was assessed using three key metrics. These included the ability to create working environments, the quality of those environments, and a single combined score. Results showed EnvAgent significantly outperformed the baselines, achieving a 33.91% improvement in the final overall score – reaching 74.01, which was higher than the best baseline score of 30.10. This suggests EnvAgent produced both more functional environments and ensured greater accuracy through extensive testing.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>The process of creating the necessary software environments for code agents is a major hurdle in scaling up research and development. Currently, this task relies heavily on manual labor. To address this, a new system, ENVAGENT, was created to automatically build these environments using intelligent agents and by understanding dependencies. A new benchmark, ENVBENCH, was also developed to assess this system’s effectiveness. Preliminary results demonstrate a significant improvement – ENVAGENT achieved a 33.91% increase in success rates compared to existing automated agents, representing a substantial step towards more efficient and reproducible research.&lt;/p>
&lt;h1 id="thank-you">Thank you!&lt;/h1>
&lt;p>Autofill&lt;/p>
&lt;p>;
20251105-Sam_Huang&lt;/p></description></item><item><title>Midterm for Smart Environments</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20250724-sam_huang/</link><pubDate>Thu, 24 Jul 2025 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20250724-sam_huang/</guid><description>&lt;h2 id="what-is-envgym">What is EnvGym?&lt;/h2>
&lt;p>EnvGym is a general multi-agent framework designed to automate the construction of executable environments for reproducing research prototypes from top-tier conferences and journals. While reproducibility has become a growing concern in the research community, the process of setting up environments remains time-consuming, error-prone, and often poorly documented.&lt;/p>
&lt;p>EnvGym addresses this gap by leveraging LLM-powered agents to analyze project instructions, resolve dependencies, configure execution environments, and validate results—thereby reducing human overhead and improving reproducibility at scale.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="EnvGym Cover" srcset="
/report/osre25/uchicago/smart_environments/20250724-sam_huang/cover_hue02fdf353b4e99cf1af213026c4f6804_1815797_30e3b2194be140fa608780847e6c7fa1.webp 400w,
/report/osre25/uchicago/smart_environments/20250724-sam_huang/cover_hue02fdf353b4e99cf1af213026c4f6804_1815797_d39b2369b5df80ffa715197c993f0681.webp 760w,
/report/osre25/uchicago/smart_environments/20250724-sam_huang/cover_hue02fdf353b4e99cf1af213026c4f6804_1815797_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20250724-sam_huang/cover_hue02fdf353b4e99cf1af213026c4f6804_1815797_30e3b2194be140fa608780847e6c7fa1.webp"
width="760"
height="760"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;h2 id="progress">Progress&lt;/h2>
&lt;h3 id="new-tools">New Tools&lt;/h3>
&lt;p>Initially, our agent had access to only one tool: the command line. This constrained the agent’s ability to decompose complex tasks and respond flexibly to failures. Over the last few weeks, we introduced a modular tool system, enabling the agent to handle specific subtasks more effectively.&lt;/p>
&lt;p>The new toolset includes:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>dockerrun: Executes Dockerfiles.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>hardware_checking, hardware_adjustment: Tailor builds to available resources.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>history_manager, stats: Tracks historical data for improvement and reproducibility.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>planning: Generates high-level execution plans.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>summarize: Interprets build results to adjust subsequent iterations.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>writing_docker_initial, writing_docker_revision: Generate and refine Dockerfiles.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>While some of those tools, such as dockerrun, run programmatic scripts, other scripts such as planning are more complex and use LLMs themselves.&lt;/p>
&lt;h3 id="agent-re-architecture-moving-beyond-codex">Agent Re-Architecture: Moving Beyond Codex&lt;/h3>
&lt;p>We transitioned away from OpenAI&amp;rsquo;s Codex agent implementation. While powerful, Codex&amp;rsquo;s framework was overly reliant on its CLI frontend, which added unnecessary complexity and limited customizability for our research context.&lt;/p>
&lt;p>We implemented our own lightweight, customizable agent pipeline that integrates LLM-based planning with iterative execution. Conceptually, the agent executes the following loop:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Repo Scanning&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Hardware Check&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Planning &amp;amp; Initial Dockerfile Generation&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Docker Execution&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Progress Summarization &amp;amp; Adjustment&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Iterative Dockerfile Refinement (up to 20 rounds)&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Success Check &amp;amp; Logging&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>This new agent design is easier to control, extend, and debug—aligning better with the needs of reproducibility research.&lt;/p>
&lt;h3 id="prompt-engineering">Prompt Engineering&lt;/h3>
&lt;p>For each tool that requires LLMs to function, we created a set of custom prompts that outline the task and breaks down the goals. For instance, the prompt used in summarize differs from the one in planning, allowing us to optimize the behavior of LLM agents per context.&lt;/p>
&lt;h3 id="performance-gains">Performance Gains&lt;/h3>
&lt;p>With these improvements, EnvGym now successfully replicates 9 repositories, surpassing our baseline Codex agent which struggled with the same set. We’ve observed more reliable planning, better handling of edge-case dependencies, and faster convergence in iterative Dockerfile revisions.&lt;/p>
&lt;h2 id="next-steps">Next Steps&lt;/h2>
&lt;h3 id="granular-evaluation-metric">Granular Evaluation Metric&lt;/h3>
&lt;p>We plan to adopt a tree-structured rubric-based evaluation, inspired by PaperBench. Instead of binary success/failure, each repo will be assigned a reproducibility score from 0–100.&lt;/p>
&lt;p>Key tasks include:&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Rubric Design: Define a hierarchical rubric with criteria like dependency resolution, test success rate, runtime match, etc.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Manual Annotation: Build a dataset of ground-truth rubrics for a subset of repos to calibrate our automatic judge.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>Judge Implementation: Develop an LLM-based judge function that takes (i) rubric and (ii) environment state, and returns a reproducibility score.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;p>
&lt;figure >
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Example of a rubric tree" srcset="
/report/osre25/uchicago/smart_environments/20250724-sam_huang/rubric-tree_hu9020427fa0020bc8ab99a7f01a351cd0_70521_ae181d659b85544bd98fa2bbdbe0c09d.webp 400w,
/report/osre25/uchicago/smart_environments/20250724-sam_huang/rubric-tree_hu9020427fa0020bc8ab99a7f01a351cd0_70521_700416bce638eba7acc49573f12b11b0.webp 760w,
/report/osre25/uchicago/smart_environments/20250724-sam_huang/rubric-tree_hu9020427fa0020bc8ab99a7f01a351cd0_70521_1200x1200_fit_q75_h2_lanczos_3.webp 1200w"
src="https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20250724-sam_huang/rubric-tree_hu9020427fa0020bc8ab99a7f01a351cd0_70521_ae181d659b85544bd98fa2bbdbe0c09d.webp"
width="557"
height="497"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
Source: Starace, Giulio, et al. &amp;ldquo;PaperBench: Evaluating AI&amp;rsquo;s Ability to Replicate AI Research.&amp;rdquo; arXiv preprint arXiv:2504.01848 (2025).&lt;/p>
&lt;p>This will make EnvGym suitable for benchmarking. We will run our new method and obtain a score to compare with baseline methods!&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>EnvGym has made strong progress toward automating reproducibility in computational research. Through modularization, agentic design, and prompt optimizations, we’ve surpassed existing baselines and laid the groundwork for even more improvement.&lt;/p>
&lt;p>The upcoming focus on metrics and benchmarking will elevate EnvGym from a functional prototype to a standardized reproducibility benchmark tool and also quantitatively prove that our new agentic method is better than existing tools such as Codex. Excited for what&amp;rsquo;s to come!&lt;/p>
&lt;p>Autofill&lt;/p>
&lt;p>;
20250724-Sam_Huang&lt;/p></description></item><item><title>Smart Environments – An AI System for Reproducible Custom Computing Environments</title><link>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20250616-sam_huang/</link><pubDate>Mon, 16 Jun 2025 00:00:00 +0000</pubDate><guid>https://deploy-preview-1007--ucsc-ospo.netlify.app/report/osre25/uchicago/smart_environments/20250616-sam_huang/</guid><description>&lt;p>Hi everyone, I&amp;rsquo;m Sam! I&amp;rsquo;m excited to be working with the Argonne National Laboratory and SoR this summer on Smart Environments. Have you ever encountered a great opensource project and wanted to run it or use it locally, only to find that it&amp;rsquo;s such a headache to set up all the dependencies? Maybe your system version wasn&amp;rsquo;t correct, or a piece of software was outdated, or the dependencies were incompatible with something you had already on your machine?&lt;/p>
&lt;p>In comes EnvGym to save the day! We want EnvGym to be an agent that would help reproduce opensource projects by automatically setting up the environmental dependencies required to get them running. That&amp;rsquo;s what I will be working on for the rest of the summer! To make EnvGym work, we will be leveraging LLM agents to tackle the problem. We will use EnvGym to read documentations, understand code structures, run commands to set up environments, and reflectively react to any errors and warnings.&lt;/p>
&lt;p>To build EnvGym, I have the following to-do&amp;rsquo;s in mind:&lt;/p>
&lt;ul>
&lt;li>Building a dataset that includes repos to be reproduced&lt;/li>
&lt;li>Establishing a baseline using current methods&lt;/li>
&lt;li>Implementing the actual EnvGym algorithm&lt;/li>
&lt;li>Testing EnvGym against baseline performance and iteratively improving it&lt;/li>
&lt;li>Deploying EnvGym to real-world use cases and gathering feedback&lt;/li>
&lt;/ul>
&lt;p>Here is the repo that we are working on:
&lt;a href="https://github.com/EaminC/EnvGym/tree/main" target="_blank" rel="noopener">https://github.com/EaminC/EnvGym/tree/main&lt;/a>&lt;/p>
&lt;p>More updates to come, thanks for reading!&lt;/p></description></item></channel></rss>