Do we need still need intent classification for LLM-based chatbot

I am currently building a travel chatbot, but I am facing many gaps in my knowledge and responses because there are a lot of topics related to travel planning that I do not have information about yet.
I’m building a travel chatbot that will call an API (like OpenAI) to generate responses, in addition to pulling data from my own backend database.

My question is, should I classify user intents for my chatbot even though it will be using an external API for response generation? The main functions of my chatbot will be:

  • Providing booking assistance
  • Answering frequently asked questions (FAQs)
  • Suggesting destinations and itineraries
    Thank you so much for your help

hey there and welcome to the community!

So to start, what exactly have you tried out so far? what do you have, and what do you need?

User intent is a very intriguing subject matter to bring up. Language models are actually extremely adept at interpreting user intent, however, the problem often lies at the user providing ambiguous language that makes interpreting user intent difficult. However, this can be a human issue as much as it can be an AI one. Sometimes, you might think you’re confident you expressed what you intended, but you actually didn’t express what you thought you did.

Therefore, it’s tough for me to say one way or the other. Tbh in circumstances like these, it can often be easier to try a build out, then come back with questions like “why did it do this?”. If you could provide a touch more detail, we’d be happy to help!

1 Like

You can just define functions for all of these then use either the travel API or your database backend to provide response. Then write your system prompt to tell the AI what to do for each function.

  • suggest_destination_and_itineraries: when the user wants travel suggestion and sample itinerary given a destination.
  • get_frequently_asked_questions: when the user submits query not related to the other functions.
  • create_booking: when user wants to create of new bookings.
  • get_booking: when the user wants to view booking details based on given booking id.
  • update_booking: when the user wants to edit their existing booking.
  • delete_booking: when you need to delete existing booking.

Try it on the Playground using the Assistants API and you’ll see how much the AI can detect user intent when it invokes the appropriate function.

1 Like