AgentRec: Agent Recommendation Using Sentence Embeddings Aligned to Human Feedback

Joshua Park, Yongfeng Zhang
1/23/2025
cs.LGcs.AIcs.CL

Official code: joshprk/agentrec (10 stars, MIT, last commit 2025-02-02).

Abstract

Multi-agent systems must decide which agent is the most appropriate for a given task. We propose a novel architecture for recommending which LLM agent out of many should perform a task given a natural language prompt by extending the Sentence-BERT (SBERT) encoder model. On test data, we are able to achieve a top-1 accuracy of 92.2% with each classification taking less than 300 milliseconds. In contrast to traditional classification methods, our architecture is computationally cheap, adaptive to new classes, interpretable, and controllable with arbitrary metrics through reinforcement learning. By encoding natural language prompts into sentence embeddings, our model captures the semantic content relevant to recommending an agent. The distance between sentence embeddings that belong to the same agent is then minimized through fine-tuning and aligned to human values through reinforcement learning from human feedback. This allows the classification of natural language prompts based on their nearest neighbors by measuring the cosine similarity between embeddings. This work is made possible through the generation of a synthetic dataset for agent recommendation, which we have open-sourced to the public along with the code for AgentRec recommendation system at https://github.com/joshprk/agentrec.

View on arXivView PDF

Code Implementations(1)

joshprk/agentrecOfficial100%
MIT

End-to-end training methodology for agent recommendation system

102Nix, PythonDec 29, 20241 years agoMIT
agentic-aiartificial-intelligencemachine-learningmultiagent-systemsnatural-language-processing

Similar Papers

Cite this paper

@article{park2025agentrec,
  title  = {AgentRec: Agent Recommendation Using Sentence Embeddings Aligned to Human Feedback},
  author = {Joshua Park and Yongfeng Zhang},
  year   = {2025},
  eprint = {2501.13333},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.13333v1}
}

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/2501.13333.svg)](https://codeofpaper.com/paper/2501.13333)

Discussion