RA-MoWE: Workflow-Affinity Embeddings for Query Clustering and Agentic Workflow Generation

Qi Cheng, Shengyu Chen, Wei Cheng, Yiqun Xie, Haoyu Wang +2 more
10/6/2026
cs.AI

No confident code implementation found for this paper.

Abstract

Agentic workflows enable large language models (LLMs) to solve complex tasks by coordinating reasoning, tool use, and verification. However, a workflow optimized for an entire task collection can overlook differences in the reasoning strategies that individual queries need, while searching for a new workflow for every query repeats costly optimization.

Show full abstract

To address this tradeoff, we introduce RA-MoWE, a framework that uses workflow-affinity embeddings to cluster queries and guide the generation of reusable expert workflows. Each embedding records how well a fixed set of reference workflows solves a query, revealing similarities in which reasoning strategies are effective. RA-MoWE uses each cluster's queries and average embedding to initialize and refine a specialized workflow through execution feedback. An embedding encoder predicts these embeddings from query text, allowing new queries to select a generated expert without first executing the reference workflows. On a 300-query test set drawn from four benchmarks spanning mathematics, science, and programming, RA-MoWE improves average task score by 4.04 percentage points over selecting among the reference workflows, while using 27.7% fewer language-model calls at inference.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cheng2026ramowe,
  title  = {RA-MoWE: Workflow-Affinity Embeddings for Query Clustering and Agentic Workflow Generation},
  author = {Qi Cheng and Shengyu Chen and Wei Cheng and Yiqun Xie and Haoyu Wang and Haifeng Chen and Xiaowei Jia},
  year   = {2026},
  eprint = {2610.07851},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.07851v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.07851.svg)](https://codeofpaper.com/paper/2610.07851)

Discussion