Researchers from Microsoft and Stanford propose a new framework called Trace to automate the design and updating of complex computational workflows for AI applications like chatbots and coding assistants. The approach treats workflows as graphs, optimizing heterogeneous parameters using Optimization with Trace Oracle (OPTO). This method enhances optimization efficiency across various domains, outperforming traditional techniques in tasks like prompt optimization and hyper-parameter tuning.
Existing frameworks mainly use scalar feedback and black-box search techniques for workflow composition and optimization. However, Trace uses execution tracing for automatic optimization and generalizes the computational graph to suit diverse workflows. Trace’s OPTO framework supports joint optimization of prompts, hyperparameters, and codes with rich feedback and adapts to changes in workflow structures.
OptoPrime, a new LLM-based optimization algorithm designed for OPTO problems, leverages LLMs’ coding and debugging capabilities to handle execution trace subgraphs. Trace feedback acts as a pseudo-algorithm, allowing the LLM to suggest parameter updates, and OptoPrime includes a memory module for tracking past parameter-feedback pairs, increasing robustness.
Experiments show OptoPrime’s effectiveness in numerical optimization, traffic control, prompt optimization, and long-horizon robot control tasks, outperforming other optimizers when utilizing execution trace information and memory. Future enhancements to Trace could include improvements in LLM reasoning or a hybrid workflow combining LLMs and search algorithms with specialized tools.
Source: https://www.marktechpost.com/2024/07/28/microsoft-and-stanford-university-researchers-introduce-trace-a-groundbreaking-python-framework-poised-to-revolutionize-the-automatic-optimization-of-ai-systems/