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

Wildcard intents in stories #1800

Closed
tmbo opened this issue Sep 22, 2017 · 13 comments
Closed

Wildcard intents in stories #1800

tmbo opened this issue Sep 22, 2017 · 13 comments

Comments

@tmbo
Copy link
Member

tmbo commented Sep 22, 2017

I was thinking it might be useful to support having "any" intent in a story.

For example, if we're asking for more information:

"what kind of cuisine would you like?"

Chinese please

we could write this in a story as:

_*[cuisine=Chinese]
  - action_search_restaurants
  - action_suggest_restaurant

When we create possible stories for this, we can put a few different intents in there to make sure the model learns to ignore that feature in this case.

@aaldaber
Copy link

aaldaber commented Aug 15, 2018

Hi @tmbo,

Are there any plans to implement this in the future? I also sometimes need to ignore the intents and entities, and just parse the text. Here is an example:

* generate_meeting_link
   - utter_please_enter_date
* slot{"date": "any date here"}
   - slot{"date": "any date here"}
   - validate_date
   - slot{"date": "any date here"}
   - slot{"extracted_date": "any date here"}
   - slot{"date_correct": "true"}
   - utter_enter_meeting_topic
* _any intent_
   - finish_generating_link

Because the meeting topic can consist of several words, it can be classified as different intents, and in case it gets classified as "greet" intent, RASA will launch utter_greet action, breaking the flow of the story. I know that for now I can make changes to stories file by adding all the possible intents in the place of any intent, but having the option of wildcard intents would be really nice.

@tmbo
Copy link
Member Author

tmbo commented Aug 16, 2018

The question is how we'd approach this.

Because I think the ideal outcome would be, to patt the text through NLU, but omit the resulting intent from the featurization used for the ML models to predict the next action. For this to work, we would need to know when we should ignore the intent.

One idea could be:
Instead of just predicting action_listen before your _any intent_ we would predict something like action_listen_and_ignore_intent - so the model needs to learn when to ignore the intent. Is that feasible @amn41 @Ghostvv ?

@Ghostvv
Copy link
Contributor

Ghostvv commented Aug 16, 2018

I think predicting action_listen_and_ignore_intent is possible, though I would prefer smith like

- action_listen
- ignore_intent

It is a bit more complicated to implement but I think it'll worth it

@tmbo
Copy link
Member Author

tmbo commented Aug 16, 2018

Well, this is tricky as we implicitly rely on action_listen always being followed by a user utterance. What's the benefit?

@Ghostvv
Copy link
Contributor

Ghostvv commented Aug 16, 2018

yes, vice versa

- ignore_intent
- action_listen

the benefit is that we still have only one action_listen, as technical action followed by user utterance, but I'm not sure if it is important. I'm afraid of creating many different action_listens and treat them differently in rasa_core. I think that if we create separate ignore_intent action, we can do the logic inside the featurizer without too much changes to rasa_core code

@tmbo
Copy link
Member Author

tmbo commented Aug 16, 2018

Yes, we'd probably need an IgnoreIntent Event for the tracker, which that ignore_intent action logs. But from a users perspective, something like

* greet
   - utter_greet
   - utter_ask_name
   - action_listen
* _
    - action_store_name

would probably make more sense.

@Ghostvv
Copy link
Contributor

Ghostvv commented Aug 16, 2018

totally agree, and then during reading of story file, we would add ignore_intent action before action_listen to be predicted by the policy, and featurizer will look for prev_ignore_intent before prev_action_listento actually ignore intent during prediction

@aliyss
Copy link

aliyss commented Aug 24, 2018

According to http://rasa.com/docs/core/slotfilling/#form-fields-and-free-text-input

Wildcards are not yet supported. Do you plan on releasing this feature in the close future or do i have to adjust my stories so random characters get accepted?

@amn41
Copy link
Contributor

amn41 commented Aug 24, 2018

I think the new forms implementation will cover this use case RasaHQ/rasa_core#878

@CryptoTr4der
Copy link

i need this feature too 👍

akelad referenced this issue in RasaHQ/rasa_core Oct 17, 2018
@akelad
Copy link
Contributor

akelad commented Nov 9, 2018

The merge of this PR allows this RasaHQ/rasa_core#1013

@akelad akelad closed this as completed Nov 9, 2018
@grzegorznowak
Copy link
Contributor

hey @akelad , sorry is there a chance for a sample implementation within the use case of wildcard intent in stories ? Those PR's commit history is massive so not quite sure what to be looking at .
In particular does this allow having stories written as per (or similar functionality):

* specific_intent
    - action_instruct_user_to_input_free_text_now
* [a_wildcard_intent_that_doesnt_actually_care_about_real_intent_send]
    - action_that_takes_the_user_input_and_actions_on_it
    - restart

a background: this is to provide a sort of free-text input scenario for users, that then gets send to backend for further non-rasa processing and analysing.

@akelad
Copy link
Contributor

akelad commented Dec 2, 2018

Please take a look at the documentation for forms: https://rasa.com/docs/core/slotfilling/

tmbo referenced this issue in RasaHQ/rasa_core Mar 13, 2019
@tmbo tmbo transferred this issue from RasaHQ/rasa_core Mar 21, 2019
taytzehao pushed a commit to taytzehao/rasa that referenced this issue Jul 14, 2023
…saHQ#1800)

Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.1.0 to 1.3.3.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](cloudflare/circl@v1.1.0...v1.3.3)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

8 participants