Few-shot and function calling - API - OpenAI Developer Forum #129
Labels
AI-Agents
Autonomous AI agents using LLMs
in-context-learning
Examples of few-shot prompts for in-context learning.
llm
Large Language Models
llm-function-calling
Function Calling with Large Language Models
openai
OpenAI APIs, LLMs, Recipes and Evals
prompt
Collection of llm prompts and notes
The thing to understand here is that function calling introduced a new role for the chat prompt messages ("role": "function"). To use few-shot examples with chat model prompts you provide a series of alternating (possibly 'fake') messages that show how the
assistant
did / should respond to a givenuser
input. With function calling the principle is the same but rather than providing a series of alternatinguser
-assistant
example messages, you provide alternatinguser
-function
messages.e.g.
The text was updated successfully, but these errors were encountered: