-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Description
Type of issue
Missing information
Description
A LLM can provide invalid input when request tool calls. In this discussion with Stephen, several strategies were mentioned to deal with that.
The documentation could be improved with:
FunctionInvokingChatClient.IncludeDetailedErrorsto send serialization (and other) exceptions back to the LLMFunctionInvokingChatClient.FunctionInvokerto, for example, catch serialization exceptions. It could also be interesting to document that it can be used to implement a retry mechanism, like throwing aMyRetryExceptionfrom a tool (because of incoherent input or something), catching it in theFunctionInvokerand returning a message to make the LLM retry "invalid something, please retry". Sharing good prompts that make some models retry a tool call would be a plus.- strictJsonSchema special property for OpenAI
Page URL
https://learn.microsoft.com/en-us/dotnet/ai/quickstarts/use-function-calling
Content source URL
https://github.com/dotnet/docs/blob/main/docs/ai/quickstarts/use-function-calling.md
Document Version Independent Id
7228f348-6649-a87d-bae5-4a70817c03bb
Platform Id
5a517f05-b64b-c471-b99d-72253c213be1
Article author
Metadata
- ID: 27e2bbca-36b0-3883-11f7-321c044ee29a
- PlatformId: 5a517f05-b64b-c471-b99d-72253c213be1
- Service: dotnet
- Sub-service: intelligent-apps
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🔖 Ready