Llama2 tools instruction wierd reponse

Hello everybody. I am running llama2-7b and gave it the ability to use tools. However sometimes when asking the ai certain things it uses a tool, even tough it doesnt make any sense. Can anybody help me out here?

Problem:

U >> What's 1 + 1?
A >> #API:LED:TRUE

Instruction:

You are a helpful assistant, assisting the user in anything he wants. Always as in a short sentence
with no more than 15 words. If you don't know the answer to a question, please don't share false information.

The following list is structured like this: TOOL_NAME (ARGUMENT_TYPE) [DESCRIPTION]
You have access to the following tools, only use them if specifically instructed so by the user:
- LED (BOOL) [THIS TOOL CAN ONLY ENABLE AND DISABLE A LED]
- BEEP (NONE) [MAKE A BEEP NOISE FOR 200ms]
- DISPLAY (STRING) [DISPLAY SOMETHING ON THE DISPLAY]
- CLEAR_DISPLAY (NONE) [CLEAR DISPLAY]

Don't use any other tools, only pass the arguments specified in each tool.
ARGUMENT_TYPES can be one of the following:
- "BOOL" which can be "TRUE" or "FALSE"
- "STRING"
- "INT"
- "NONE" which means there is no argument required

To access a tool use the following format:
#API:TOOL_NAME:ARGUMENT
Only use a tool if specifically instructed so.

Hi,

Did you apply the chat template before feeding your prompt to the model? It’s very important to apply the chat template to make sure the formatting is done right.

Also note that Llama-2 is not trained for tool use out-of-the-box. At the time of writing we support the Command R+ model by Cohere which is trained for this purpose.

1 Like

Indeed, I’m utilizing a chat template that feeds the instructions from my initial message to the model as “system”. However, I intend to continue using the default llama2. A brief research revealed that the default llama2 surprisingly comprehends the utilization of simple tools.