Source code for our paper : PASE: Program-Aided Patchable Skill Evolution (arXiv)
If you find this work useful, please cite our paper and give us a shining star 🌟
@article{wang2026pase,
title={PASE: Program-Aided Patchable Skill Evolution},
author={Jiahao Wang and Yuqi Xiong and Qing Yang and Zhipeng Xu and Zhenghao Liu and Zulong Chen and Yubin Bao},
year={2026},
eprint={2611.14019},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2611.14019},
}Agent skills have emerged as an effective means of enabling LLM agents to solve complex, interactive tasks by encoding reusable knowledge without modifying model parameters. Recent approaches further improve skill adaptation by distilling reusable experience from agent execution trajectories and evolving skills based on downstream task feedback. However, existing methods primarily represent skills as natural language documents, intertwining procedural logic with descriptive knowledge and making skills difficult to maintain and evolve. To address this limitation, we propose PASE (Program-Aided Patchable Skill Evolution), a program-aided framework that iteratively evolves skills by associating them with executable programs. Unlike prior approaches that encode trajectory-derived experience primarily in natural language, PASE separates reusable procedural logic into editable programs, enabling targeted updates to executable components while reducing the need to repeatedly revise natural language skills. Extensive experiments across diverse models and benchmarks demonstrate that PASE consistently outperforms all baselines, by achieving over 2.8% improvements. Further analyses show that PASE exhibits greater evolutionary stability and generalisation capability, highlighting the critical role of programmatic knowledge in skill evolution.
Use git clone to download this project
git clone https://github.com/NEUIR/PASE.git
cd PASE
Requirements
- Python ≥ 3.10,
pip install openai pyyaml tqdm openpyxl numpy pandas(seeeval/requirements.txt) - [Optional] LibreOffice — only needed for
--recalc(recomputes formula caches before evaluation)
Configure the LLM endpoint
cp config.example.yaml config.yaml # then edit llm.model / base_url / api_key
Serve the model with vLLM (any OpenAI-compatible endpoint works)
VLLM_MODEL_PATH=/path/to/model bash vllm.sh # serves on port 8019
Benchmark sources are listed in dataset/dataset.txt:
| Benchmark | Source |
|---|---|
| SpreadsheetBench | https://huggingface.co/datasets/KAKA22/SpreadsheetBench |
| Domain-Spreadsheet | https://huggingface.co/datasets/Spreadsheet-RL/Spreadsheet-RL |
| WikiTQ | https://github.com/ppasupat/WikiTableQuestions |
| HiTab | https://github.com/microsoft/HiTab |
Expected directory layout (the inference scripts read dataset.json or a manifest from --dataset_path):
data/
├── spreadsheetbench/ # dataset.json + one folder per task (spreadsheet_path)
│ └── <spreadsheet_path>/
│ ├── 1_<id>_input.xlsx # also 2_, 3_ for multi-case tasks
│ └── 1_<id>_answer.xlsx # ground truth (or _golden.xlsx)
├── domain_spreadsheet/ # dataset.json; <spreadsheet_path>/{input,answer}.xlsx
├── wikitq/ # *.tsv or *.jsonl manifest (id, question, table path, answers) + .xlsx tables
└── hitab/ # *.jsonl manifest (id, question, xlsx_path, answers) + .xlsx tables
All scripts read config.yaml from the repo root by default (--config to override). --skill is optional: pass a skill directory to inject it into the prompt (skill_infer.py additionally mounts program.py files as read-only bash functions skill_<name> '<JSON args>'). Outputs go to output/<benchmark>/<dataset>/<skill_name>_<model>/, including a conv_*.jsonl trajectory log. Add --resume to continue an interrupted run.
# SpreadsheetBench
python infer/spreadsheetbench/skill_infer.py --skill path/to/skill --dataset_path data/spreadsheetbench --output-dir output/spreadsheetbench/run/skill_model
# Domain-Spreadsheet
python infer/domain_spreadsheet/inference.py --skill path/to/skill --dataset_path data/domain_spreadsheet
# WikiTQ / HiTab (answer is written to cell A1 of output.xlsx, one value per line)
python infer/wikitq/inference.py --skill path/to/skill --dataset_path data/wikitq --manifest data/wikitq/test.tsv
python infer/hitab/inference.py --skill path/to/skill --dataset_path data/hitab --manifest data/hitab/test.jsonl
python eval/spreadsheetbench/evaluation.py --output_path output/spreadsheetbench/run/skill_model --dataset_path data/spreadsheetbench [--test-cases 1|3] [--recalc]
python eval/domain_spreadsheet/evaluation.py --output_path output/domain_spreadsheet/run/skill_model --dataset_path data/domain_spreadsheet [--recalc]
python eval/wikitq/evaluation.py --predictions output/wikitq/run/skill_model/predictions.jsonl --manifest data/wikitq/test.tsv --dataset-path data/wikitq
python eval/hitab/evaluation.py --predictions output/hitab/run/skill_model/predictions.jsonl --manifest data/hitab/test.jsonl --dataset-path data/hitab
--recalc recomputes formulas with LibreOffice before comparing cell values.
A skill is a directory with skill.md (YAML frontmatter + ## When to Apply + ## Rules) and an optional program.py (exactly one public function named after the skill):
skill/
└── <skill_name>/
├── skill.md
└── program.py # optional
One iteration = sample → propose → validate (10 iterations in the paper, 8 tasks per iteration):
# 1. Sample success/fail tasks and build the reflection workspace
python reflection/sample.py --eval-file output/iter0/eval.json --output-path output/iter0 \
--dataset-path data/spreadsheetbench_train --skill-dir skill/current --tmp-root workspace/iter1 \
--trajectory-file state/trajectory.json --skill-file state/skill.json --iter 1
# 2. Propose one patch (create / repair / delete) over skills and programs
python reflection/proposal.py --workspace workspace/iter1 --results-dir workspace/iter1/proposal_results \
--trajectory-file state/trajectory.json --skill-file state/skill.json --history-file state/history.json --mode mixed
# 3. Apply the patch, re-evaluate on validation, commit iff score >= prev score
python reflection/validate.py --workspace workspace/iter1 --skill-file state/skill.json \
--proposal-file workspace/iter1/proposal_results/p0/proposal_output.json \
--iteration 1 --mode fail --dataset-path data/spreadsheetbench_val --prev-score <prev_score> --history-out state/history.json
PASE/
├── config.example.yaml # LLM endpoint, concurrency, max_turns
├── vllm.sh / vllm_api.py # vLLM server launcher + OpenAI-compatible client
├── dataset/dataset.txt # benchmark sources
├── figs/ # figures from the paper
├── infer/ # ReAct executor: spreadsheetbench, domain_spreadsheet, wikitq, hitab
├── eval/ # official metrics per benchmark (+ LibreOffice recalc)
├── reflection/ # sample.py → proposal.py → validate.py, prompts/
└── tool/ # agent_loop, exec_bash, exec_python, finish, read_* tools
If you have questions, suggestions, and bug reports, please email:
2401906@stu.neu.edu.cn
