Knowledge base unable to query only attribute based questions

Hi all. I have a slight problem with the knowledge base. I want to query solely the attributes of object types. For example: “Please give me the contact number for the IS helpdesk?”, Bot displays “Sorry I am not sure I understand, please rephrase?

A snippet of my data.json: { “helpdesk”: [ { “id”: 50, “name”: “IS”, “number”: 6087 } , { “id”: 51, “name”: “HR”, “number”: 6097 } ]

My training data:

  1. please give me the contact [number]{“entity”: “attribute”, “value”: “number”} for [IS] (helpdesk)
  2. whats the contact [number] (attribute) for [IS] (helpdesk) give me the [number] (attribute) for [IS] (helpdesk)

lookup:helpdesk

data/lookup_tables/helpdesk.txt

helpdesk.txt contains the word ‘IS’.

slots and entities both have helpdesk and number defined in them.

this example is pretty similar to the restaurant bot example documented by rasa. My question is similar to the following question in the restaurant bot “What is the [cuisine] (attribute) of [Berlin Burrito Company] (restaurant)?” the query is based on two attributes. however all cases of these 2 attribute questions do not work for me.

the below is a snippet of the correct slots being detected, however action query is unable to return back to me the contact number image

could you please guide me on what I am doing wrong? Normal object type queries work fine. Questions with attributes and object types work fine too. Its just the double attribute questions that refuse to work.

thank you!

The object_type needs to be set in order for the query to succeed. We already have an issue to improve this: For intent `query_knowledge_base` infer object_type from the message · Issue #154 · RasaHQ/rasa-sdk · GitHub. Ideally, the object type could be inferred from the other slots, but his is not possible at the moment. If you just have one object type, you could overwrite the run method of ActionQueryKnowledgeBase and always set it to helpdesk.

Thanks!hopefully a solution can be made for this soon since double attribute questions are so common!