Template catalog


ChatGPT with Named Entity Recognition (NER)

Get user data decoding entities like "email" and "fullname" directly from the user text using a ChatGPT Prompt

image describing the tiledesk community chatbot

Customize this template quickly & easily with Tiledesk

Designed by

logo of the author of the chatbot published in the tiledesk community

Andrea Sponziello

Published on

4/1/2024

Last update on

6/1/2024

Share this template to:

Try the Chatbot

More about this template

This chatbot will decode entities like email and fullname directly from the user text with a simple ChatGPT prompt.

Designer ChatGPT

In this chatbot I used a special prompt to ask ChatGPT to reply me with a JSON structure with the entites I asked it to decode from the user text.

Designer ChatGPT Prompt

The used prompt:

The user provided the info in the "user reply" section below. Can you detect thei fullname and email? Once detected please reply with the following JSON structure, fufilled with the detected entities. Please when the user don't provide some of the previous info fulfill the corrispondent one with null.
{
"userName":"the detected username",
"userEmail": "the detected email"
}
User reply: {{user_reply}}

The prompt will reply with a JSON strcture fulfilled with the requested key/values. I asked to use "null" values when entities are not recognised, so the corrispondent form fields are automatically triggered. The returned JSON is automatically converted to a JSON object. The GPT Task action always checks if the returned GPT response has a JSON structure. In this case the returned payload is automatically converted to a JSON object. Decoded entities are then moved into the conversation attributes as "flat" attributes, so they can be used within a form. The form will ask the user for all the missing entities automatically.

Feel free to contact me at support@tiledesk.com

Tags

    #chatbot

    #chatgpt

    #openai

    #prompt chain

Integrations

Once designed, you can run your unlimited no-code chatbots on every communication channel of your choosing. Be it WhatsApp, Telegram or Facebook Messenger. With no further clicks or actions.