Two Slots in one Intent

Hello,

I am programming a chatbot for the student advisory service at my university. The task of the bot is to be able to answer questions about different courses of study. The user should be able to enter his question, which contains the course of study and the question content and get an answer from a database (postgresql).

A short example: -User: “[How many semesters] does the course of study [architecture] go?” -Bot: “The course of study Architecktur goes 7 semesters.”

It is possible to wrap the question in two different intents and thus generate two slots. But what happens if the user types the complete question in one and doesn’t want to be asked for the degree program again?

How can I get the bot to set 2 slots in 1 intent to get the corresponding information from the database?

I could write every possible question for every possible degree program as a single intent but that’s too much effort and I don’t want to hardcode it to the bot.

Maybe someone has ideas how I can solve this problem.

Thanks a lot!

You can set multiple slots per intent. If you’re using a form and an entity is detected & fills a slot in any turn then it should be set and the form won’t ask for it again. (There’s some more details in this forum thread: Filling multiple slots at the same time with FormAction and dynamic buttons in template? - #3 by argideritzalpea)

In this particular examples, I would probably structure this as:

  • How many semesters as an intent OR semesters as an entity
  • The course of study as an entity
1 Like