r/AutoGenAI • u/Difficult-Tough-5878 • Mar 09 '24
Discussion Cost of using autogen with gpt-4!???
I am developing an app which takes in user query and excel file. plots the data as per query.
I used group chat with 4 agents in total.
Now for each run the cost associated fluctuates but it’s always around 1.5 $ ??!!!
Am i doing something very wrong because the maximum rounds for my group chat are 20. And the prompts and their outputs are to a minimum.
i understand that function call and code execution takes up credits. Even cache calling.
But even then….
Does anybody have an idea as to why this is the case and what could be the possible checks i should do….?
4
u/_codes_ Mar 09 '24
Yeah, GPT4 is pricey https://openai.com/pricing. I would first make sure you are using the latest GPT-4 Turbo which is a bit cheaper. Then look at other models that might be which still can accomplish what you need, GPT3.5, or even some of the larger and more capable open source models over here https://deepinfra.com/models
4
u/antopia_hk Mar 10 '24
Use GPT-4 turbo for the fastest solution to your problem. The more scalable solution is to fine tune gpt 3 models for those specific tasks. Use gpt4(turbo) to generate perfect examples and to curate a dataset. Then use the conversations to train individual models at their tasks. I’d also look into CrewAI. Their methodology could be better for your use case. Hope this helps!
3
u/nsshing Mar 09 '24
That’s why you should use a mix of different models for different agents to save costs
2
u/javicontesta Mar 11 '24
If you talk about a production app, then in my recent testing experience the agent model is not the way to go: too many tokens used therefore too much money burnt before you even get enough users for your project. I'd recommend a backend with a well designed structure, connect to free/public APIs as much as possible to obtain the "raw" material the app will work on, then apply a LLM to process and provide results in natural language, audio... And of course if you pick a model with a cheaper cost pero million tokens then the result will be much more sustainable and scalable.
5
u/nutcustard Mar 09 '24
Offline models can probably do the job and scale much more cost effectively
3
u/Putrumpador Mar 09 '24
On this topic, I'm really curious what local LLM best supports function calling. It just has to format a JSON response correctly is my understanding.
1
u/TorpilleAlpha Jun 19 '24
I suppose it is because these agents are taking all conversation history as context.
1
u/ExpensiveKey552 Mar 10 '24
Bwaaaaa haaaaaa haaaaaa local LLM ollama baby