syftr: Pareto-Optimal Generative AI
Alexander Conway, Debadeepta Dey, Stefan Hackmann, Matthew Hausknecht, Michael Schmidt, Mark Steadman, Nick Volynets
TL;DR
syftr presents a scalable framework for auto-tuning Retrieval-Augmented Generation pipelines by performing multi-objective Bayesian optimization over a massive hierarchical search space that includes agentic and non-agentic flows. It introduces a Pareto-frontier search with a novel Pareto-Pruner to efficiently balance accuracy and cost, and demonstrates across diverse RAG benchmarks that near-optimal flows can be found at a fraction of the cost of the most accurate configurations. The work shows that non-agentic flows often dominate the Pareto frontier, while upgrades to larger LLMs can yield sizable accuracy gains at substantial cost, and that transfer learning can accelerate convergence. By enabling rapid, data-driven design of high-performing generative AI pipelines, syftr has practical implications for building cost-efficient, accurate RAG systems across domains.
Abstract
Retrieval-Augmented Generation (RAG) pipelines are central to applying large language models (LLMs) to proprietary or dynamic data. However, building effective RAG flows is complex, requiring careful selection among vector databases, embedding models, text splitters, retrievers, and synthesizing LLMs. The challenge deepens with the rise of agentic paradigms. Modules like verifiers, rewriters, and rerankers-each with intricate hyperparameter dependencies have to be carefully tuned. Balancing tradeoffs between latency, accuracy, and cost becomes increasingly difficult in performance-sensitive applications. We introduce syftr, a framework that performs efficient multi-objective search over a broad space of agentic and non-agentic RAG configurations. Using Bayesian Optimization, syftr discovers Pareto-optimal flows that jointly optimize task accuracy and cost. A novel early-stopping mechanism further improves efficiency by pruning clearly suboptimal candidates. Across multiple RAG benchmarks, syftr finds flows which are on average approximately 9 times cheaper while preserving most of the accuracy of the most accurate flows on the Pareto-frontier. Furthermore, syftr's ability to design and optimize allows integrating new modules, making it even easier and faster to realize high-performing generative AI pipelines.
