FrugalGPT: A Game Changer in AI for Small Businesses

Ronny H
4 min readJun 3, 2023

--

In the world of artificial intelligence, Large Language Models (LLMs) have been making waves with their impressive capabilities. However, their high cost of implementation¹ and maintenance has often been a stumbling block for many businesses. Enter FrugalGPT², a new development that promises to change the game.

GPT-4 to support customer service can cost a small business over $21,000 a month³

A recent research paper titled “FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance” proposes a solution to this cost problem. The paper introduces FrugalGPT, a flexible instantiation of LLM cascade that learns which combinations of LLMs to use for different queries to reduce cost and improve accuracy.

Proposed FrugalGPT Architecture

The experiments show that FrugalGPT can match the performance of the best individual LLM with up to 98% cost reduction or improve the accuracy over the best individual LLM by 4% with the same cost.

FrugalGPT experiment result on cost and performance

The paper proposes three strategies to reduce the cost of using large language models. For non-technical users, these strategies could be understood as follows:

  • Prompt Adaptation: This strategy involves identifying effective, often shorter, prompts to save cost. In practical terms, this means carefully crafting your queries to these models to be as concise as possible. For example, instead of asking a model a long-winded question, try to distill it down to its most essential parts. This can save on costs as you’re using fewer resources of the model.
Two Prompt Adaptation techniques: (i) “Prompt Selection” uses a subset of in-context examples as the prompt to reduce the size of the prompt, and (ii) “Query Concatenation” aggregates multiple queries to share prompts.
  • LLM Approximation: This aims to create simpler and cheaper large language models that can match the performance of a more powerful, yet expensive, model on specific tasks. In practical terms, this could involve choosing a less expensive model that has been shown to perform well on the type of task you’re interested in. This way, you’re not paying for extra capabilities that you don’t need.
Two LLM Approximation techniques: (i) “Completion Cache” stores and reuses an LLM API’s response when a similar query is asked, and (ii) “Model Fine-Tuning” uses expensive LLMs’ responses to fine-tune cheap LLMs.
  • LLM Cascade: This strategy focuses on adaptively choosing which large language models to use for different queries. In practical terms, this could mean using a less expensive model for simpler queries and reserving the more expensive models for more complex queries. This way, you’re only paying for the more expensive resources when you really need them.
“LLM Cascade” employs different LLM APIs for different queries

The balance between cost and accuracy is a critical factor in decision-making, especially when it comes to the adoption of new technologies. FrugalGPT, with its promise of maintaining high accuracy while significantly reducing costs, presents a compelling proposition.

Imagine being able to leverage advanced AI capabilities without straining your budget. This could drive wider adoption of AI technologies across various industries, leading to what can be termed as a democratization of AI. Even smaller businesses could afford to implement sophisticated AI models in their operations, leveling the playing field in a way that has never been seen before.

Of course, this is just one perspective, and the true impact of FrugalGPT will only be revealed with time. But the potential is certainly exciting. As we continue to explore the capabilities of AI, developments like FrugalGPT bring us one step closer to a future where AI is an integral part of every business.

What are your thoughts on this? Do you see FrugalGPT as a game changer in the AI industry? Let’s start a conversation in the comments below.

Footnotes

[1]: Monge, J. C. (2023, March 18). GPT-4 API is 60x more expensive than chatgpt. Medium. https://generativeai.pub/gpt-4-api-is-60x-more-expensive-than-chatgpt-6dcf2718712d

[2]: Chen, L., Zaharia, M., & Zou, J. (2023). FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance. arXiv preprint arXiv:2305.05176.

[3]: Kaiser, F. (2023, May 15). How much does it cost to use GPT? GPT-3 pricing explained. Neoteric. https://neoteric.eu/blog/how-much-does-it-cost-to-use-gpt-models-gpt-3-pricing-explained/

--

--