Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slot parsing for specified intents not possible for short entity strings #847

Closed
felixvor opened this issue Aug 30, 2019 · 1 comment
Closed
Assignees

Comments

@felixvor
Copy link

felixvor commented Aug 30, 2019

Hello,

I am new to snips-nlu and I got the following problem.

I want to create a chatbot that is able to fill missing slots if they are required.
As an example, I got an intent that is called tellJoke, which requires a topic to be set. If the intent "tellJoke" is detected, but the topic slot is empty, I want to be able to extract the topic out of any string the user types in afterwards.

Example Dataset:

# tellJoke Intent
---
type: intent
name: tellJoke
slots:
  - name: topic
    entity: topic
utterances:
  - Tell me a joke about a [topic](fish)
  - ...

# joke topic entities
---
type: entity
name: topic
automatically_extensible: yes
values:
- [knock knock, door, knock]
- [dad, father, dads, fathers]
- [cat, kitten, kitty, cats]
- ...

Detecting the intent works great. It is also perfectly detecting slots if the initial queries contains them. However, I want to be able to handle missing information interactivley. If the user does not specify a topic, but just asks for a general joke, the bot asks about the topic that the user wants. For example:

{
  "input": "i want to hear a joke",
  "intent": {
    "intentName": "tellJoke",
    "probability": 0.79340987912516253
  },
  "slots": []
}

Now the chatbot could aks: "What should the joke be about" to start the slot filling.
The problem: The user now answers with a singe word string that describes the topic of the joke.
This single word might resemble a correct entity value like "knock knock" or "cat", however I am unable to parse it correctly with the parse_slot function.

parsing = engine.get_slots("Knock Knock", "tellJoke")
print(parsing)
>>>[ ]

The parse_slot function depends on the query parameter to resemble the correct intent so the slot can be parsed. How can I parse the "topic" entity out of strings that are a None intent or any other intent? The parse_slot function should be able to do that if the intent is manually defined.

@felixvor felixvor changed the title Parse_slot function should not depend on the input string to Parse_slot function should not depend on the input string to be a specific intent Aug 30, 2019
@felixvor felixvor changed the title Parse_slot function should not depend on the input string to be a specific intent Slot parsing for specified intents not possible for short entity strings Aug 30, 2019
@adrienball adrienball self-assigned this Sep 2, 2019
@adrienball
Copy link
Contributor

@DieseKartoffel
What you want to do in that case is create a specific elicitation intent (on top of the main intent) which would cover formulations used by the user to specify a missing slot.
This is discussed more thoroughly in #849 .
Let me know if you are still stuck.
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants