Comments (5)
@agusmoles it's a wild guess, but one thing that could throw off the LLM is the mix of english and french. i often got better results by going all in for a given language. This unfortunately means that you property names, e.g.tnaInDecimals
might need to be french, or you could at least add a French description to the variable in the schema. Maybe that helps.
from ai.
@agusmoles Thanks for reporting!
This seems like it's an issue with the generation where the model's output is wrong. Were you expecting it to call a tool but instead it printed out the python code to perform the calculation?
from ai.
@jeremyphilemon yes I know there is too little to do since its pretty difficult to replicate and/or report since the whole context is given from an AI model, so feel free to close if you think there is nothing vercel could do to avoid this kind of "leaks".
Regarding the prompts, the questions you can see in the chat are pretty straightforward, the first asks for an economic TNA (APR in US) which returns a tool call, the second one is a question about the capitalization of the interests earned from the investment (which is given in the system
attribute of the model for context) and the third one was intended to also execute another tool function which aims to convert the TNA
to a TEA
(Effective Annual Rate), but it threw that python code.
It didnt happen before with the same tool or others, it was just that unique time, thats why also the probability of replicating is pretty low but I wanted to report just in case. 😄
Thanks!
from ai.
@jeremyphilemon exactly that, yes
from ai.
@agusmoles Thanks for clarifying!
It seems like it's an issue with the system prompt, schema annotation, or the language model itself, so there's very little we can do as an sdk to prevent this since it's application specific. Any chance you can share more details on the prompt you used that could've led the model to generate a python code instead of calling a tool?
from ai.
Related Issues (20)
- streamUI overwrites rather than appends when text-deltas change to tool-call-deltas in same stream.
- SvelteKit: support onToolCall / maxToolRoundtrips / tool invocations HOT 4
- Google Gemini System instructions HOT 3
- How to use streamObject with NextJs API Routes HOT 2
- Chunk size increases for long streams
- `generateObject` returns empty object when it fails, we need a way to debug it HOT 6
- SolidJS: Use a solid store for the messages array for better referential differentiation in `<For/>` HOT 3
- All non OpenAI providers giving errors like Type 'GoogleGenerativeAILanguageModel' is not assignable to type 'LanguageModelV1'. HOT 5
- reload should cancel previous request HOT 1
- bug(@ai-sdk/azure): `log_probs` is not be supported for calls to `gpt-4-vision-preview`, causing calls for that deployment to fail entirely
- feat(@ai-sdk/google-vertex): Add Grounding Support
- Export types of AIProvider, MutableState, etc for better IDE integration and TypeScript linting
- Getting Not Found error for Google provider integration HOT 2
- Anthrophic SDK still doesn't support JSON mode HOT 1
- Support streaming partial object chunks HOT 13
- Extend Vue Library with `useAssistant` support HOT 1
- InvalidToolArgumentsError unhandled by useChat, leading to infinite loop HOT 6
- Anthropic user content inside tool result HOT 9
- Bedrock Provider using profile HOT 11
- Provider registry doesn't work with model IDs that have a colon HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai.