{"id":29693912,"url":"https://github.com/gersteinlab/chemagent","last_synced_at":"2025-07-23T08:10:11.072Z","repository":{"id":275674472,"uuid":"884493508","full_name":"gersteinlab/chemagent","owner":"gersteinlab","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T20:04:33.000Z","size":32739,"stargazers_count":31,"open_issues_count":2,"forks_count":6,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-11T21:20:07.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gersteinlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-06T21:14:28.000Z","updated_at":"2025-03-11T20:04:38.000Z","dependencies_parsed_at":"2025-02-04T00:42:06.394Z","dependency_job_id":null,"html_url":"https://github.com/gersteinlab/chemagent","commit_stats":null,"previous_names":["gersteinlab/chemagent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gersteinlab/chemagent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2Fchemagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2Fchemagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2Fchemagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2Fchemagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gersteinlab","download_url":"https://codeload.github.com/gersteinlab/chemagent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2Fchemagent/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266640830,"owners_count":23960809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-23T08:10:08.686Z","updated_at":"2025-07-23T08:10:11.049Z","avatar_url":"https://github.com/gersteinlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [ICLR 2025] ChemAgent: Self-updating Memories in Large Language Models Improves Chemical Reasoning\n## Table of Contents\n\n- [Overview](#overview)\n- [Key Features](#key-features)\n- [Project Structure](#project-structure)\n- [Getting Started](#getting-started)\n- [How to run](#how-to-run)\n- [How to dev](#how-to-dev)\n\n## Overview\n\nChemAgent leverages an innovative self-improving memory system to significantly enhance performance in complex scientific tasks, with a particular focus on Chemistry.\n\n![ChemAgent Framework](./assets/readme/framework.jpg)\n\n## Key Features\n\n- **Self-updating Memory System**: Continuously improves model performance\n- **Specialized for Chemistry**: Tailored for chemical reasoning tasks\n- **Modular Architecture**: Includes task splitting, execution, association, and reflection modules\n\n## Project Structure\n\n- `Xagent/agent/`: Contains prompts and code for functional modules\n- `dev_test.py`: Execution code for memory pool construction\n- `assets/config.yml`: Configuration and module activation management\n- `output/`: Experimental results for GPT-4 and GPT-3.5 across four datasets\n- `memory/`: Plan Memory and Execute Memory for the four datasets\n- `dataset/`: Experimental datasets from [SciBench](https://github.com/mandyyyyii/scibench)\n\n## Getting Started\n\n1. **Installation**: (Add installation instructions here)\n2. **Configuration**: Modify `assets/config.yml` to suit your needs\n3. **Running Experiments**: Use `dev_test.py` with appropriate parameters\n\nFor detailed usage instructions, see the \"How to run\" and \"How to dev\" sections below.\n\n## How to run\n\n#### Run on dataset\n\n```\npython dev_test.py --tool python --mode test --list_source \u003cput_the_datasetname_here\u003e\n```\n\nYou can choose from the following datasets located in the `dataset` folder: `atkins`, `chemmc`, `matter`, or `quan`.\n\n## How to dev\n\nBefore executing tasks using this framework, it is necessary to first construct memory according to the process outlined in the paper. \n\n1. **Add Few-shot Examples:**\n   In the `XAgent/agent/simple_agent/prompt.py` file, select two examples from `fewshot_examples` and incorporate them into the model prompt. \n\n2. **Update Configuration File:**\n   Modify the `assets/config.yml` file to adjust the configuration according to your requirements. \n\n3. **Run Development Tests:**\n   Execute the development test mode using the following command:\n   ```bash\n   python dev_test.py --tool python --mode dev --list_source \u003cput_the_datasetname_here\u003e\n\n## Configuration\n\nThe `assets/config.yml` file allows you to customize various settings for the ChemAgent framework:\n\n### Model Settings\n\n```yaml\ndefault_completion_kwargs:\n  model: gpt-3.5-turbo-16k\n  eva_model: gpt-4\n  temperature: 0.2\n  request_timeout: 60\n```\n\nTo change other settings:\n\n```yaml\nsave_dir: \"./memory/exec_memory/storage_matter_gpt4\"\nplan_save_dir: \"./memory/plan_memory/plan_storage_matter_gpt4\"\nscore: False\nrefine: False\nimage: False\n```\n\nThe configuration parameters control various aspects of the system:\n\n1. Memory Pools:\n   - `plan_save_dir`: Specifies the memory pool for Plan Memory\n   - `save_dir`: Specifies the memory pool for Execution Memory\n\n2. Knowledge Memory:\n   - `img`: Controls the activation of Knowledge Memory\n\n3. Task Execution:\n   - `refine`: Determines if the system should refine the task strategy upon execution failure\n\n4. Evaluation:\n   - `score`: Decides if the evaluation module is enabled\n\n## Cite Us\n\n```\n@inproceedings{tang2025chemagent,\n  title={ChemAgent: Self-updating Library in Large Language Models Improves Chemical Reasoning},\n  author={Tang, Xiangru and Hu, Tianyu and Ye, Muyang and Shao, Yanjun and Yin, Xunjian and Ouyang, Siru and Zhou, Wangchunshu and Lu, Pan and Zhang, Zhuosheng and Zhao, Yilun and others},\n  booktitle={The Twelfth International Conference on Learning Representations}\n} \n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgersteinlab%2Fchemagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgersteinlab%2Fchemagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgersteinlab%2Fchemagent/lists"}