Usage of tools fails - RAG chatbot example #4226
-
Hi all, I just tried the https://sdk.vercel.ai/docs/guides/rag-chatbot example and I realized that the models have issues calling the right tools even in this very simple example. I implemented the whole code using the documentation and I wasn't able to get the model to answer using the retrieved information from DB. I tried switching different models and I found out that only Models which failed
The only way I got Do you have similar experience? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Funnily enough, it works much better today after upgrading to
Additional important note When using |
Beta Was this translation helpful? Give feedback.
Funnily enough, it works much better today after upgrading to
"ai": "^4.0.22",
Additional important note
When using
streamText()
one has to setmaxSteps: <int>
inuseChat()
call which sends the tool results back to API.When using
generateText({ maxSteps: <int> })
on server, this acts as agent and it loops the tool results directly on server.