← heapsort
RESEARCH27

SPEAR: Code-Augmented Agentic Prompt Optimization

arXiv CS.CLΒ·May 27, 2026

SPEAR introduces a free-form agentic optimizer for automatic prompt engineering, leveraging a Python sandbox for error analysis and autonomous improvement. It utilizes tools like evaluation, code execution, and auto-rollback to optimize prompts for LLM-as-judge tasks.

Read original β†—