user202898
user202898

Reputation: 41

Rasa-core, Slots not getting Populated

I am trying to create simple printer support chat bot using rasa-core via nlu interpreter, bot should get the printer model, and printer type and post a issue.

I have used the printermodel and printertype variable in slot and entity, but the slots are not getting populated from the chat string.

Please help me on this.

Upvotes: 2

Views: 1324

Answers (2)

shivampip
shivampip

Reputation: 2144

For example, we have to design simple conversation

User: I am Shivam
Bot:  Hello Shivam

Here, we have to extract name and respond using it.

Step 1: In nlu.md file

## intent:told_name
- i am [shivam](name)
- my name is [shivam](name)
- hi, i am [shivam](name)

Step 2 In domain.yml file

intents:
  - told_name

actions:
  - utter_greet

entities:
 - name

slots:
  name:
    type: text

templates:
  utter_greet:
  - text: "Hello {name}"
  - text: "Hello {name}, happy to meet you."

Step 3 In stories.md file

# story_01
* told_name{"name": "Mayank"}
  - utter_greet

I think, you are missing someting in step 3

Upvotes: 2

Caleb Keller
Caleb Keller

Reputation: 2161

Not very much information to go off of, but here are several things I would check if my slots weren't being filled correctly:

  • Is NLU parsing the entities correctly? Slots are usually filled from NLU entities. Send your text direct to the NLU and see if the entities are found.
  • Entity and Slot names are not consistent? The default method of filling slots without custom programming expects the slot name to match the entity name.
  • Are the slots defined correctly in the domain information?

If you're still having trouble I encourage you to create an issue or join us on gitter.

Upvotes: 2

Related Questions