question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic configuration of NLU endpoint (Tracker Aware Interpreter)

See original GitHub issue

Enhancement proposal: The interpreter invokes the NLU service to parse each message. The service endpoint URL is configurable via a configuration file and cannot be dynamically changed at runtime. The NLU endpoint receives the text of the message but doesn’t receive the representation of the conversation.

The proposal is to allow the support of the following conceptual use cases:

  1. Greeting in the right language
  • The user signs up to a chat app, specifies their communication preferences (eg. English or French)
  • Rasa utters the message “Hello!” or “Bonjour!” depending on the communication preference
  1. Language-specific NLU parsing
  • The user signs up to a chat app, specifies their communication preferences (eg. English or French)
  • The user starts the chat by sending a message in a language of their choice
  • Rasa utters the response in the same language
  1. Multi-language interaction
  • The user starts the chat in French
  • Responses are in French
  • The user sends a message in English
  • Rasa sends the response to English
  1. Co-reference resolution Restaurant reservation chatbot Rasa: How many people joining you for dinner? User: Just one Rasa: Ok, what is your meal preference? User: Vegetarian Rasa: Great choice, what about the other party? User: Same as me Rasa: Ok, confirmed. Party 1: vegetarian; Party 2: vegetarian

The task here is to determine that the message “Same as me” refers to the previous message.

Proposed solution

  • Enhance the interpreter to have access to the tracker.
  • Enhance the NLU configuration to specify the slot name that will contain the URL of the NLU service endpoint
  • Enhance parse API of the NLU service to accept tracker state as input

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:19 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
alexissmirnovcommented, Mar 1, 2019

Exactly, @amn41

If the tracker is passed into the interpreter, it would open all this logic/flexibility

1reaction
amn41commented, Mar 1, 2019

If I’ve understood correctly, @alexissmirnov - the problem is that in processor.py only the message text is passed to the interpreter class, correct? because otherwise you could create an interpreter subclass which does all of this custom logic (e.g. language detection, looking at a slot, using different NLU models per language, etc)

https://github.com/RasaHQ/rasa_core/blob/978c76a253e5d5a8e8dc61521b5589dc94f28b08/rasa_core/processor.py#L263

Read more comments on GitHub >

github_iconTop Results From Across the Web

Providing conversation context to the NLU using microservices - #21 ...
I've logged Dynamic configuration of NLU endpoint (Tracker Aware Interpreter) · Issue #1764 · RasaHQ/rasa_core · GitHub, will submit a PR, and would...
Read more >
Implement NLU in Virtual Agent - ServiceNow Docs
Create and maintain NLU model groups and intents that map to your conversation topics in Virtual Agent. You can create and edit model...
Read more >
Chatbots Using Python and Rasa - GeeksforGeeks
Rasa is a tool to build custom AI chatbots using Python and natural language understanding (NLU). Rasa provides a framework for developing ...
Read more >
Word list | Google developer documentation style guide
Note: This document includes references to terms that Google considers disrespectful or offensive. The terms are listed here to provide usage guidance and ......
Read more >
Cisco Packaged Contact Center Enterprise Administration and ...
Configure Packaged CCEUnified CVP to connect to Cisco SSM On-Prem. For more information, see Smart License Deployments. If you are moving to Smart...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found