Table of Contents
Fetching ...

A Framework for Effective Invocation Methods of Various LLM Services

Can Wang, Dianbo Sui, Bolin Zhang, Xiaoyu Liu, Jiabao Kang, Zhidong Qiao, Zhiying Tu

TL;DR

The paper tackles the challenge of cost-efficient, low-latency, high-performance invocation of diverse LLM services by formulating a multi-objective optimization problem over latency $f_l$, performance $f_p$, and cost $f_c$, and proposing a unified invocation framework. It introduces a four-category taxonomy—input abstraction, semantic cache, solution design, and output enhancement—organized around a three-phase lifecycle (before, during, after) to flexibly compose methods. Key contributions include formal problem definition with an objective $\ extbf{F}(s)= f_l(M_i,q_j)-f_p(M_i,q_j) f_c(M_i,q_j)$, and a practical framework clustering methods into modular components (e.g., sentence simplification, prompt optimization, traditional and neural caches, scoring functions, LLM routers, thought reasoning, and ensemble strategies). The framework supports plug-and-play integration of methods to tailor invocation strategies to task requirements, provider pricing, and latency constraints, offering guidance for researchers and practitioners while highlighting open challenges in multimodal inputs, caching efficiency, evaluation baselines, and ethics. The work aims to enable more predictable, scalable, and cost-effective use of LMaaS in real-world applications.

Abstract

Large Language Models (LLMs) have shown impressive abilities in solving various natural language processing tasks and are now widely offered as services. LLM services enable users to accomplish tasks without requiring specialized knowledge, simply by paying service providers. However, numerous providers offer various LLM services with variations in pricing, latency, and performance. These factors are also affected by different invocation methods, such as the choice of context and the use of cache, which lead to unpredictable and uncontrollable service cost and quality. Consequently, utilizing various LLM services invocation methods to construct an effective (cost-saving, low-latency and high-performance) invocation strategy that best meets task demands becomes a pressing challenge. This paper provides a comprehensive overview of methods help LLM services to be invoked efficiently. Technically, we define the problem of constructing an effective LLM services invocation strategy, and based on this, propose a unified LLM service invocation framework. The framework classifies existing methods into four categories: input abstraction, semantic cache, solution design, and output enhancement, which can be used separately or jointly during the invocation life cycle. We discuss the methods in each category and compare them to provide valuable guidance for researchers. Finally, we emphasize the open challenges in this domain and shed light on future research.

A Framework for Effective Invocation Methods of Various LLM Services

TL;DR

The paper tackles the challenge of cost-efficient, low-latency, high-performance invocation of diverse LLM services by formulating a multi-objective optimization problem over latency , performance , and cost , and proposing a unified invocation framework. It introduces a four-category taxonomy—input abstraction, semantic cache, solution design, and output enhancement—organized around a three-phase lifecycle (before, during, after) to flexibly compose methods. Key contributions include formal problem definition with an objective , and a practical framework clustering methods into modular components (e.g., sentence simplification, prompt optimization, traditional and neural caches, scoring functions, LLM routers, thought reasoning, and ensemble strategies). The framework supports plug-and-play integration of methods to tailor invocation strategies to task requirements, provider pricing, and latency constraints, offering guidance for researchers and practitioners while highlighting open challenges in multimodal inputs, caching efficiency, evaluation baselines, and ethics. The work aims to enable more predictable, scalable, and cost-effective use of LMaaS in real-world applications.

Abstract

Large Language Models (LLMs) have shown impressive abilities in solving various natural language processing tasks and are now widely offered as services. LLM services enable users to accomplish tasks without requiring specialized knowledge, simply by paying service providers. However, numerous providers offer various LLM services with variations in pricing, latency, and performance. These factors are also affected by different invocation methods, such as the choice of context and the use of cache, which lead to unpredictable and uncontrollable service cost and quality. Consequently, utilizing various LLM services invocation methods to construct an effective (cost-saving, low-latency and high-performance) invocation strategy that best meets task demands becomes a pressing challenge. This paper provides a comprehensive overview of methods help LLM services to be invoked efficiently. Technically, we define the problem of constructing an effective LLM services invocation strategy, and based on this, propose a unified LLM service invocation framework. The framework classifies existing methods into four categories: input abstraction, semantic cache, solution design, and output enhancement, which can be used separately or jointly during the invocation life cycle. We discuss the methods in each category and compare them to provide valuable guidance for researchers. Finally, we emphasize the open challenges in this domain and shed light on future research.
Paper Structure (17 sections, 3 equations, 4 figures, 1 table)

This paper contains 17 sections, 3 equations, 4 figures, 1 table.

Figures (4)

  • Figure 1: Vision of effective invocation strategy construction for various LLM services.
  • Figure 2: Taxonomy of effective invocation methods of LMaaS
  • Figure 3: LLM services invocation framework, shown by the phase of invocation.
  • Figure 4: A simple invocation strategy composed of existing methods, using Prompt Reducer in input abstraction, Zep in semantic cache, FrugalGPT in solution design, and nothing in output enhancement.