#Assistant API - Function getting triggered too early

1 messages · Page 1 of 1 (latest)

full dust
#

Hello to everyone - I am currently using the Assistant API and having some troubles with the custom Tools Prompting.
I attached my prompt (it's in german, use GPT to translate it to your language).
In the backend it is triggering a Zendesk API which creates tickets. Unfortunately the Assistant often triggers this function and is not asking every property and just making things like the email up (for example John Doe).

  1. My Assistant is in 100% in german - should I still do the instructions and prompting in English?
  2. How can I fix this that he won't trigger the function unless he has really EVERYTHING required and is not making those informations up.
#

German:

  "name": "contact_support",
  "description": "Die Funktion wird in vier Fällen ausgelöst: 1) Als Fallback-Option, wenn der Assistent bei einer Anfrage unsicher ist; 2) Bei eskalierten Gesprächen mit Anzeichen von Aggression oder Unzufriedenheit; 3) Auf explizite Anfrage des Nutzers, mit einem Menschen zu sprechen; 4) Wenn ein Artikel in einer Lieferung fehlt.",
  "parameters": {
    "type": "object",
    "properties": {
      "order_number": {
        "type": "string",
        "description": "Optional: Die eindeutige Nummer der zu verfolgenden Bestellung. Nicht zwingend erforderlich, aber hilfreich, wenn verfügbar."
      },
      "ticket_email": {
        "type": "string",
        "description": "Die E-Mail-Adresse, unter der der Benutzer kontaktiert werden möchte. Du musst den Nutzer **immer** explizit nach seiner E-Mail fragen."
      },
      "description": {
        "type": "string",
        "description": "Eine detaillierte Beschreibung des Anliegens, inklusive spezifischer Details darüber, welcher Artikel fehlt, falsch ist oder sonstige Probleme vorliegen. Du musst den Nutzer **immer** explizit nach einer Beschreibung des Anliegens fragen."
      },
      "ticket_name": {
        "type": "string",
        "description": "Der volle Name der Person, die den Support kontaktieren möchte. Du musst den Nutzer **immer** explizit nach seinem vollen Namen fragen."
      },
      "subject": {
        "type": "string",
        "description": "Eine kurze Betreffzeile, die das Thema der Anfrage zusammenfasst. Diese wird vom Assistenten basierend auf dem Kontext der Anfrage generiert."
      }
    },
    "required": [
      "ticket_name",
      "ticket_email",
      "description",
      "subject"
    ]
  }
}```
#

English:

  "name": "contact_support",
  "description": "The function is triggered in four cases: 1) As a fallback option when the assistant is unsure about a request; 2) In escalated conversations with signs of aggression or dissatisfaction; 3) Upon the explicit request of the user to speak with a human; 4) If an item is missing in a delivery.",
  "parameters": {
    "type": "object",
    "properties": {
      "order_number": {
        "type": "string",
        "description": "Optional: The unique number of the order to be tracked. Not mandatory, but helpful if available."
      },
      "ticket_email": {
        "type": "string",
        "description": "The email address at which the user wishes to be contacted. You must **always** explicitly ask the user for their email."
      },
      "description": {
        "type": "string",
        "description": "A detailed description of the issue, including specific details about which item is missing, incorrect, or other problems present. You must **always** explicitly ask the user for a description of the issue."
      },
      "ticket_name": {
        "type": "string",
        "description": "The full name of the person who wishes to contact support. You must **always** explicitly ask the user for their full name."
      },
      "subject": {
        "type": "string",
        "description": "A brief subject line summarizing the topic of the request. This is generated by the assistant based on the context of the request."
      }
    },
    "required": [
      "ticket_name",
      "ticket_email",
      "description",
      "subject"
    ]
  }
}```
#

Assistant API - Function getting triggered too early

#

Example of my error:

Input: my order is not complete
contact_support({"description":"Der Nutzer berichtet, dass seine Bestellung unvollständig ist.","ticket_email":"user@example.com","ticket_name":"Max Mustermann","order_number":"123456"})