Function calling in different language than english

HI!
I’m trying to implement a chatbot in french.
The prompts are all in french but I’m not sure how should I use the functions.
Here’s one of my function:
{
“name”: “get_invoice_id”,
“description”: “Get the invoice id from text”,
“parameters”: {
“type”: ‘object’,
“properties”: {
“invoiceId”: {
“type”: “string”,
“description”: “The invoice id”,

            },
        },
        "required": ["invoiceId"],
    },
}

Should I translate this into french? I mean just the values not the keys. Or should I translate keys and values as well into french?
What is the best practice in this case.
Thank you in advance!

Interesting question! Will follow up on this to see what you come out with (or what people recommend).

I would assume each of the options you mentioned would work to some extent, did you try simply testing to see which option works best? I can recommend Promptotype as a tool to easily test different prompts on whole collections of expected queries (full disclosure: I built it). Lmk if you need help with this.

On the GPT-4 model, I can confirm that a function definition (JSON schema) can be in English or in your native language, regardless of the language used in the prompt. But I end up using a function definition in the same language as used in a prompt (local) - I feel it’s more consistent and it works great

3 Likes