Accelerating Language Model Workflows with Prompt Choreography

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Bai, TJ, Eisner, Jason
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918265196904448
author Bai, TJ
Eisner, Jason
author_facet Bai, TJ
Eisner, Jason
contents Large language models are increasingly deployed in multi-agent workflows. We introduce Prompt Choreography, a framework that efficiently executes LLM workflows by maintaining a dynamic, global KV cache. Each LLM call can attend to an arbitrary, reordered subset of previously encoded messages. Parallel calls are supported. Though caching messages' encodings sometimes gives different results from re-encoding them in a new context, we show in diverse settings that fine-tuning the LLM to work with the cache can help it mimic the original results. Prompt Choreography significantly reduces per-message latency (2.0--6.2$\times$ faster time-to-first-token) and achieves substantial end-to-end speedups ($>$2.2$\times$) in some workflows dominated by redundant computation.
format Preprint
id arxiv_https___arxiv_org_abs_2512_23049
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Accelerating Language Model Workflows with Prompt Choreography
Bai, TJ
Eisner, Jason
Computation and Language
I.2.7; I.5.1; I.5.5; C.1.4
Large language models are increasingly deployed in multi-agent workflows. We introduce Prompt Choreography, a framework that efficiently executes LLM workflows by maintaining a dynamic, global KV cache. Each LLM call can attend to an arbitrary, reordered subset of previously encoded messages. Parallel calls are supported. Though caching messages' encodings sometimes gives different results from re-encoding them in a new context, we show in diverse settings that fine-tuning the LLM to work with the cache can help it mimic the original results. Prompt Choreography significantly reduces per-message latency (2.0--6.2$\times$ faster time-to-first-token) and achieves substantial end-to-end speedups ($>$2.2$\times$) in some workflows dominated by redundant computation.
title Accelerating Language Model Workflows with Prompt Choreography
topic Computation and Language
I.2.7; I.5.1; I.5.5; C.1.4
url https://arxiv.org/abs/2512.23049