jayeshdesai4520 / chatbot-ng-internal

MIT License
3 stars 0 forks source link

extend the Dialogflow intents #3

Closed anbo-de closed 3 years ago

anbo-de commented 3 years ago

Context

We need to provide to the users 3 classes of interactions / intents:

@jayeshdesai4520 @Perevalov @RicardoUsbeck @ram-g-athreya @anbo-de add here the intents you would like to implement. Please use the following template:

Definition of Done (DoD)

collected intents

jayeshdesai4520 commented 3 years ago

[Component Information Intent] Gives information about component

example commands/questions:

what is Name Entity Recognition ?

expected outcome:

It uses rule base grammar to extract entities in a text.

What do you guys think about this?

RicardoUsbeck commented 3 years ago

I suggest a modification: [Component Information Intent] Gives information about all available and currently configured components

example commands/questions -> expected outcome:

Which modules are there? -> Lists all available QANARY components What can I configure -> Lists all module types What NER system is currently used? -> Gives the current system, e.g. DBpedia Spotlight Use TagMe2 for NER -> Configures QANARY and ends with a status message.

[Component Use Intent] Uses a specific component over a certain input.

example commands/questions -> expected outcome:

Use NER on "Who is the president of France?" -> The output of NER is: "France" mapped to "dbr:France"

jayeshdesai4520 commented 3 years ago

I suggest a modification: [Component Information Intent] Gives information about all available and currently configured components

example commands/questions -> expected outcome:

Which modules are there? -> Lists all available QANARY components What can I configure -> Lists all module types What NER system is currently used? -> Gives the current system, e.g. DBpedia Spotlight Use TagMe2 for NER -> Configures QANARY and ends with a status message.

[Component Use Intent] Uses a specific component over a certain input.

example commands/questions -> expected outcome:

Use NER on "Who is the president of France?" -> The output of NER is: "France" mapped to "dbr:France"

@RicardoUsbeck I have a doubt in [Component Use Intent] how can I do this? Do I have to use any api to do this?

RicardoUsbeck commented 3 years ago

Well, that is something we need to discuss with @anbo-de and Aleksander but I think you would need to implement this API in QANARY and then talk to it.

jayeshdesai4520 commented 3 years ago

Well, that is something we need to discuss with @anbo-de and Aleksander but I think you would need to implement this API in QANARY and then talk to it.

oh ok yes but I think https://www.dbpedia-spotlight.org/api also do the same screenshot

RicardoUsbeck commented 3 years ago

There is a misunderstanding. In QANARY, there are more than 5 modules to do entity linking (like spotlight does) https://github.com/WDAqua/Qanary-question-answering-components The idea is that you can tell the chatbot to use a certain module (can be anything from entity linking to query building) on a particular input, depending on which one is configured. There are 10 or so different module types that can be configured to a QANARY pipeline of length 1 to 10. And this intent should then use one particular module (type) on a user given input.

jayeshdesai4520 commented 3 years ago

There is a misunderstanding. In QANARY, there are more than 5 modules to do entity linking (like spotlight does) https://github.com/WDAqua/Qanary-question-answering-components The idea is that you can tell the chatbot to use a certain module (can be anything from entity linking to query building) on a particular input, depending on which one is configured. There are 10 or so different module types that can be configured to a QANARY pipeline of length 1 to 10. And this intent should then use one particular module (type) on a user given input.

so basically when I ask "Use SimpleRealNameOfSuperHero query builder on "What is the real name of spider man?" now the chatbot will order the components and send "listofcomponents" and "question" to QANARY to get the answer and then we show to user right? same for each modules

RicardoUsbeck commented 3 years ago

Yes, I imagine that behaviour

jayeshdesai4520 commented 3 years ago

Yes, I imagine that behaviour

ok I need to wait till I get QANARY API detail to make this intent work.

jayeshdesai4520 commented 3 years ago

Hi, here is the list of intents I have created till now

template - example command intent name outcome

We need to provide to the users 3 classes of interactions / intents:

basic information:

hello: [Default Welcome Intent] Greetings! I am the DBpedia bot, How can I assist?

what can I do: [Help_Intent] Currently, You can ask me about what is DBpedia? or how to contribute to DBpedia?

what is DBpedia: [DBpedia_Info] DBpedia is a crowd-sourced community effort to extract structured information from Wikipedia and make this information available on the Web.

how to contribute: [DBpedia_Contribute] There are multiple ways to contribute to DBpedia You can: 1 - Look at open issues if you want to contribute to the codebase 2 - Improve Documentation 3 - Join the discussion on upcoming features, releases, and issues

configuration and internal information:

(de-)activate components (this status needs to be stored):

Add sparql executer: [Activate_component_intent] succesfully Added SparqlExecuter you can add more components by saying Add and then name of the component.

Remove sparql executer: [Deactivate_component_intent] succesfully removed SparqlExecuter from components list

get information about the current Qanary pipeline configuration:

tell me an order of components list: [show_component_list] currently, active components are SparqlExecuter,QueryBuilder

ask a KB-related question (handed via Webhook to the Qanary backend) - not done

additional intent added

remove all the components from list: [reset_list_of_components] Components list are now empty

Perevalov commented 3 years ago

@jayeshdesai4520 @RicardoUsbeck [configuration and internal information] I suggest to start with the following right now:

  1. Getting the list of all available components
  2. Setting/getting the components order for Qanary QA pipeline

for the 1st, I'd like @anbo-de to comment if we can ask Qanary for the available components. for the 2nd, we just need to store a list of strings component_list = ['Component1', 'Component2', 'Component3'] somewhere in the current session with the chatbot, it can and should be done independently.

anbo-de commented 3 years ago

@jayeshdesai4520 @RicardoUsbeck [configuration and internal information] I suggest to start with the following right now:

  1. Getting the list of all available components

There is currently just an API available of the used Spring Boot Admin Server:

However, I think that given our vision of completely controlling everything via direct Qanary API calls, I would wrap this API now within a Qanary Webservice interface. --> TODO for myself.

  1. Setting/getting the components order for Qanary QA pipeline for the 2nd, we just need to store a list of strings component_list = ['Component1', 'Component2', 'Component3'] somewhere in the current session with the chatbot, it can and should be done independently.

True. In particular, the automatic selection of a number of components is not possible (so, https://github.com/jayeshdesai4520/chatbot-ng-internal/issues/3#issuecomment-861346263 was not true) you need to define them by yourself. Here are two basic configurations we used many times in tutorials:

They are also used in the chatbot UI at https://webengineering.ins.hs-anhalt.de:43712/.

However, you can always add more components (even in one call).

In the close future, we should also define profiles (like the Maven profiles) that provide users easy access to predefined configurations (s.t., no one needs to know the internal names).

Perevalov commented 3 years ago

@jayeshdesai4520 are all the intents listed by Andreas in the description working?

jayeshdesai4520 commented 3 years ago

@Perevalov Yes it is working but I am fixing a bug related to race conditions

Perevalov commented 3 years ago

21