TLDR: OPTIMAS is a novel framework designed to optimize complex AI systems composed of multiple, heterogeneous components. Its core innovation lies in using ‘Local Reward Functions’ (LRFs) for each component, which are globally aligned to ensure that local improvements contribute directly to overall system performance. This approach enables efficient, independent optimization of diverse configurations (like prompts or model parameters), leading to consistent and significant performance gains (averaging 11.92% improvement) across various real-world applications, while also being highly data-efficient.
Modern artificial intelligence is increasingly moving towards complex systems that combine multiple AI components. Imagine a sophisticated AI that uses a Large Language Model (LLM) to understand a query, then calls a specialized tool to retrieve information, and finally uses another machine learning model to process that information and provide an answer. These are known as compound AI systems, and while they are powerful, optimizing them to work together seamlessly has been a significant challenge.
The main difficulties arise because these systems often have non-differentiable structures, meaning traditional optimization methods don’t easily apply. Plus, each component might have different types of settings to optimize, such as prompts for an LLM, numerical parameters for a machine learning model, or even selecting which model to use. Optimizing these diverse settings simultaneously, while ensuring the entire system performs better, is a complex task.
Introducing OPTIMAS: A Unified Approach
A new framework called OPTIMAS (Optimizing Compound AI Systems with Globally Aligned Local Rewards) has been proposed to tackle these challenges. The core idea behind OPTIMAS is quite intuitive: it assigns a ‘Local Reward Function’ (LRF) to each individual component within the compound AI system. The crucial aspect of these LRFs is that they are designed to be ‘globally aligned.’ This means that if a component improves its local reward, it reliably contributes to the overall performance of the entire system.
OPTIMAS works iteratively. In each step, it adapts these LRFs to ensure they remain aligned with the system’s global performance, even as the system’s configurations change. Simultaneously, it optimizes each component to maximize its local reward. This clever approach allows for independent updates of different types of configurations, using the most suitable optimization method for each, while guaranteeing that local improvements consistently lead to better overall system performance.
Also Read:
- SI-Agent: Automating Clear and Effective Instructions for AI Models
- Predicting Prompt Difficulty to Accelerate Language Model Reasoning Fine-tuning
How OPTIMAS Delivers Results
One of the significant advantages of OPTIMAS is its data efficiency. Because it optimizes components locally using their LRFs, it reduces the need for extensive, costly runs of the entire compound AI system during the optimization process. This makes the optimization process much more practical and less resource-intensive.
The framework was rigorously evaluated across five diverse, real-world compound AI systems. These included a behavior-driven product recommendation system for Amazon, a medical analysis system based on PubMed data, a complex retrieval system, a multi-hop question answering system, and a self-verified code generation system. In these evaluations, OPTIMAS consistently outperformed existing strong optimization methods, achieving an average performance improvement of 11.92%.
For instance, while some baseline methods might improve performance on certain tasks, they could degrade performance on others. OPTIMAS, however, showed consistent improvement across all five tasks, demonstrating its robustness and effectiveness. The research also showed a strong positive correlation between the quality of the local-global alignment and the gains in overall system performance, highlighting the importance of the LRFs.
The insights gained from OPTIMAS are significant. It provides a general and effective method for improving complex AI systems by breaking down the optimization problem into manageable, locally-focused tasks that are globally aligned. This approach promises to make the development and refinement of multi-component AI systems more efficient and reliable across various application domains. You can read the full research paper here: RESEARCH_PAPER_URL.


