Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update llama 3.3 tool-calling syntax #274

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShishirPatil
Copy link

@ShishirPatil ShishirPatil commented Feb 5, 2025

We migrated the function-calling syntax from 3.1 to 3.2. Making the documentation consistent for 3.3.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Feb 5, 2025
@@ -72,14 +72,135 @@ Here's my response

## Tool Calling Formats

Here we describe how to invoke the Llama 3.3 instruction tuned model for tool-calling (also called function-calling). We recommend zero-short function calling over built-in tools.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change: "zero-short" to "zero-shot"


Should you decide to return the function call(s),Put it in the format of [func1(params_name=params_value, params_name2=params_value2...), func2(params)]

NO other text MUST be included.<|eot_id|><|start_header_id|>assistant<|end_header_id|>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the preceding example, we use "You SHOULD NOT include any other text in the response."

In this case, we use "NO other text MUST be included."

Is there a reason that we change the instructions for the second example? Should we keep the instructions parallel as much as possible.

If there is no reason to change, but we change anyway, then a naive reader might infer that we did have a reason--even though we didn't.

}
]

Should you decide to return the function call(s),Put it in the format of [func1(params_name=params_value, params_name2=params_value2...), func2(params)]
Copy link

@carljparker carljparker Feb 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change

",Put it"

to

", put them"

(The changes above include a space after the comma.)

@albertodepaola
Copy link

LG overall. This file is generated automatically, so the changes should be done in the prompts.py file for the specific use case if not mistaken. cc @hardikjshah


You are an expert in composing functions. You are given a question and a set of possible functions.
Based on the question, you will need to make one or more function/tool calls to achieve the purpose.
If none of the function can be used, point it out. If the given question lacks the parameters required by the function,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "none of the function can" to "none of the function(s) can" (as we do further down in the prompt).

I am thinking that this text is within the prompt, so we might not want to perturb it.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since its within the prompt-we should not change it IMO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants