Skip to main content

HMSC-LLMs: A Hierarchical Multi-agent Service Composition Method Based on Large Language Models

  • Conference paper
  • First Online:
Web Information Systems Engineering – WISE 2024 (WISE 2024)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 15440))

Included in the following conference series:

  • 339 Accesses

Abstract

The rapid progress of large language models (LLMs) has been applied successfully in service composition and scheduling. However, LLMs will exhibit poor performance when dealing with massive service and complex tasks. To address this challenge, this paper proposes the HMSC-LLMs method, a novel hierarchical multi-agent service composition algorithm based on LLMs, to better interact with users through prompts. Firstly, HMSC-LLMs refers to five roles during service composition, namely, Planner, Manager, Provider, Executor, and Critic. Here each role is based on an LLM agent and responsible for its own domain task. Specifically, the Planner is responsible for decomposing the complex needs into subtasks. The Manager coordinates the activities of various roles and the Provider filters out service. Then the Executor generates service parameters and schedules this service. Furthermore, the Critic supervises the entire service execution workflow to ensure that each role works normally. In our work, the HMSC-LLMs method classified 17000 services and assigned them to multiple agents. Finally, a series of experiments on ToolBench and RapidAPI data sets show that the HMSC-LLMs outperforms traditional single-agent and multi-agent methods in terms of plan accuracy, parameter Accuracy, and hallucination rate.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://rapidapi.com/hub.

References

  1. Aiello, M.: A challenge for the next 50 years of automated service composition. In: International Conference on Service-Oriented Computing, pp. 635–643. Springer, Cham (2022)

    Google Scholar 

  2. Levene, M., Poulovassilis, A., Abiteboul, S., et al.: Active XML: a data-centric perspective on web services. In: Web Dynamics: Adapting to Change in Content, Size, Topology and Use, pp. 275–299 (2004)

    Google Scholar 

  3. Milanovic, N., Malek, M.: Current solutions for web service composition. IEEE Internet Comput. 8(6), 51–59 (2004)

    Article  Google Scholar 

  4. Ardagna, D., Pernici, B.: Adaptive service composition in flexible processes. IEEE Trans. Software Eng. 33(6), 369–384 (2007)

    Article  Google Scholar 

  5. Rao, J., Su, X.: A survey of automated web service composition methods. In: International Workshop on Semantic Web Services and Web Process Composition, pp. 43–54. Springer, Heidelberg (2004)

    Google Scholar 

  6. Kona, S., Bansal, A., Blake, M.B., et al.: Generalized semantics-based service composition. In: 2008 IEEE International Conference on Web Services, pp. 219–227. IEEE (2008)

    Google Scholar 

  7. Weise, T., Blake, M.B., Bleul, S.: Semantic web service composition: the web service challenge perspective. In: Web Services Foundations, pp. 161–187 (2014)

    Google Scholar 

  8. Weise, T., Bleul, S., Geihs, K.: Web service composition systems for the web service challenge-a detailed review (2007)

    Google Scholar 

  9. Zhang, B., Wen, K., Lu, J., et al.: A top-K QoS-optimal service composition approach based on service dependency graph. J. Organiz. End User Comput. 33(3), 50–68 (2021)

    Google Scholar 

  10. Shanahan, M.: Talking about large language models. Commun. ACM 67(2), 68–79 (2024)

    Article  Google Scholar 

  11. Chowdhery, A.: Scaling language modeling with pathways (2022)

    Google Scholar 

  12. Creswell, A., Shanahan, M., Higgins, I.: Selection-inference: exploiting large language models for interpretable logical reasoning. arXiv preprint arXiv:2205.09712 (2022)

  13. Jula, A., Sundararajan, E., Othman, Z.: Cloud computing service composition: a systematic literature review. Expert Syst. Appl. 41(8), 3809–3824 (2014)

    Article  Google Scholar 

  14. Glaese, A., McAleese, N., Trȩbacz, M., et al.: Improving alignment of dialogue agents via targeted human judgements. arXiv preprint arXiv:2209.14375 (2022)

  15. Masdari, M., Nozad Bonab, M., Ozdemir, S.: QoS-driven metaheuristic service composition schemes: a comprehensive overview. Artif. Intell. Rev. 54, 3749–3816 (2021)

    Article  Google Scholar 

  16. Hu, C., Wu, X., Li, B.: A framework for trustworthy web service composition and optimization. IEEE Access 8, 73508–73522 (2020)

    Article  Google Scholar 

  17. Nikoo, M.S., Babur Ö, V.D.B.M.: A survey on service composition languages. In: Proceedings of the 23rd ACM/IEEE International Conference on Model Driven Engineering Languages and Systems: Companion Proceedings, pp. 1–5 (2020)

    Google Scholar 

  18. Shen, W., Li, C., Chen, H., et al.: Small LLMs are weak tool learners: a multi-LLM agent. arxiv preprint arxiv:2401.07324 (2024)

  19. Botvinick, M.M.: Hierarchical reinforcement learning and decision making. Curr. Opin. Neurobiol. 22(6), 956–962 (2012)

    Article  Google Scholar 

  20. Aiello, M., Georgievski, I.: Service composition in the ChatGPT era. SOCA 17(4), 233–238 (2023)

    Article  Google Scholar 

  21. Yang, L., Chen, H., Li, Z., et al.: Give us the facts: enhancing large language models with knowledge graphs for fact-aware language modeling. IEEE Trans. Knowl. Data Eng. (2024)

    Google Scholar 

  22. Yang, R., Song, L., Li, Y., et al.: Gpt4tools: teaching large language model to use tools via self-instruction. Adv. Neural Inf. Process. Syst. 36 (2024)

    Google Scholar 

  23. Shen, Y., Song, K., Tan, X., et al.: Hugginggpt: solving AI tasks with chatgpt and its friends in hugging face. Adv. Neural Inf. Process. Syst. 36 (2024)

    Google Scholar 

  24. Patil, S.G., Zhang, T., Wang, X., et al.: Gorilla: large language model connected with massive apis. arXiv preprint arXiv:2305.15334 (2023)

  25. Schick, T., Dwivedi-Yu, J., Dessì, R., et al.: Toolformer: language models can teach themselves to use tools. Adv. Neural Inf. Process. Syst. 36 (2024)

    Google Scholar 

  26. Qin, Y., Liang, S., Ye, Y., et al.: Toolllm: facilitating large language models to master 16000+ real-world APIS. arXiv preprint arXiv:2307.16789 (2023)

  27. Wu, Q., Bansal, G., Zhang, J., et al.: Autogen: enabling next-gen LLM applications via multi-agent conversation framework. arXiv preprint arXiv:2308.08155 (2023)

  28. Chan, C.M., Chen, W., Su, Y., et al.: Chateval: towards better LLM-based evaluators through multi-agent debate. arXiv preprint arXiv:2308.07201 (2023)

  29. Hong, S., Zheng, X., Chen, J., et al.: Metagpt: meta programming for multi-agent collaborative framework. arXiv preprint arXiv:2308.00352 (2023)

  30. Li, C., Chen, H., Yan, M., et al.: Modelscope-agent: building your customizable agent system with open-source large language models. arxiv preprint arxiv:2309.00986 (2023)

  31. Lemos, A.L., Daniel, F., Benatallah, B.: Web service composition: a survey of techniques and tools. ACM Comput. Surv. 48(3), 1–41 (2015)

    Article  Google Scholar 

Download references

Acknowledgements

This work is supported by the State Grid Corporation of China (grant number 5108-202218280A-2-402-XG).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xiaoming Yu .

Editor information

Editors and Affiliations

Ethics declarations

Disclosure of Interests

The authors declare that they have no competing interests.

Rights and permissions

Reprints and permissions

Copyright information

© 2025 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Liao, X., Wu, W., Yu, X., Ji, X., Chen, Y., Li, J. (2025). HMSC-LLMs: A Hierarchical Multi-agent Service Composition Method Based on Large Language Models. In: Barhamgi, M., Wang, H., Wang, X. (eds) Web Information Systems Engineering – WISE 2024. WISE 2024. Lecture Notes in Computer Science, vol 15440. Springer, Singapore. https://doi.org/10.1007/978-981-96-0576-7_34

Download citation

  • DOI: https://doi.org/10.1007/978-981-96-0576-7_34

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-96-0575-0

  • Online ISBN: 978-981-96-0576-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics