Back to search

University of Pennsylvania

Opportunistic Evaluation for Compound AI Systems

Abstract

dc:description.abstract

AI systems have shown impressive performance across a wide range of tasks. Part of this has been driven by a shift toward compound AI systems, composed of one or more AI models and programmatic components. Latency is a key concern for these systems, and there are many opportunities to parallelize and stream model calls. However, manually doing so greatly increases code complexity, intertwining high-level algorithms with low-level performance optimizations. In this thesis, we propose providing parallelization and streaming automatically for high-level, sequential code via an approach called opportunistic evaluation. First, we develop its theory, introducing a novel calculus, λO, providing sound, out-of-order execution of general-purpose programs that make external calls, such as those to AI models. We then describe a language, Opal, which offers automatic parallelization and streaming, and we demonstrate its ability to express and optimize a wide range of compound AI systems, improving performance by up to 12.7×. Next, we build a system, PopPy, which automatically parallelizes Python programs, and we show that it can express 5 compound AI systems from the literature with minimal modifications, yielding speedups of up to 6.4×. Finally, we build an extensible language, Quasar, for code generated by AI models and show that it can provide latency, security, and reliability improvements, without accuracy degradation. Together, these show how opportunistic evaluation can provide significant benefits to compound AI systems written in general-purpose programming languages.

Degree

thesis:*
Department dc:contributor.department
Computer and Information Science
Year dc:date.issued
2026

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Mell, Stephen
Advisors dc:contributor.advisor
  • Bastani, Osbert
  • Zdancewic, Steve

Subjects

dc:subject × 1

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*
Repository record dc:identifier.uri
https://repository.upenn.edu/handle/20.500.14332/62823

Chain of custody

source
Harvested from
University of Pennsylvania
Base URL
repository.upenn.edu/server/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
related terms
citation

Mell, Stephen. Opportunistic Evaluation for Compound AI Systems. 2026. https://repository.upenn.edu/handle/20.500.14332/62823