If you’ve deployed your own NLU engine built on the Rasa open source NLU framework, you can use it for Natural Language Understanding intelligence within LivePerson’s Conversational Cloud. Importantly, this lets you keep the investment that you’ve made in your own NLU solution.
When you integrate a Rasa-based NLU engine, training data and other model-related data is completely encapsulated within your solution. For its part, Conversation Cloud uses three of the engine’s exposed endpoints:
- Training: This endpoint is used to train models.
- Activation: This endpoint is used to load the model when you activate a model version.
- Prediction: This endpoint is used to get the intents and entities in a message, so they can be saved and used elsewhere within Conversational Cloud. For example, this endpoint is used to associate the intents with the dialog starters in bots.
Your Rasa implementation must conform to the schemas at the links above.
Additionally, after the domain is trained, your Rasa server returns the trained model to LivePerson’s Rasa adapter. This requires that HTTPS communication is available between the two services.
Connect the NLU engine
- Access Intent Manager.
Add a domain. When you do this, you need to provide some information specifically about your Rasa solution:
- NLU Provider: Select “Brand's Rasa,” to indicate that you’re using a custom solution that you deployed.
- Rasa Host URL: Enter the base URL for your Rasa training and prediction endpoints.
Authorization: Select the type of authentication to use when making API calls to the Rasa engine: TokenAuth, JWT, or Custom. (TokenAuth and JWT are supported natively by Rasa.) Then enter the permanent token to use. For security reasons, unauthenticated connections aren’t supported.
Select “Custom” if you’re using an authentication type other than TokenAuth or JWT. When you select “Custom,” you can enter the authentication type (e.g., “Bearer”) in the field below, although this isn’t required.
In the Authorization header of a request, the custom authentication type that you entered is used as the prefix denoting the token type (e.g., if the type is “Bearer,” the header’s value is “Bearer <tokenValue>”). If you don’t enter a custom authentication type, the token alone is sent (e.g., the header’s value is simply “<tokenValue>”).
Credential: This is optional. If you’d like to add an extra layer of security when transferring data, select the Mutual Authentication credential to use along with the token. If you have the proper permissions, you can create one on the Credentials page in Bot Accounts, and you can also create one on-the-fly here.
Request Headers: Add any custom HTTP headers required by the web service.
- Request Parameters: Add any custom request parameters required by the web service.
You don't need to define the language of your domain.
At this point, you can import the intents and entities, or you can add them manually after the domain is created. Do one or the other before proceeding to the next step.
- Train the domain. This is discussed below.
Train a domain
You must train the domain after every update to the training data therein if you want the update to be reflected in subsequent testing/debugging and usage. Training creates a new model version that incorporates the changes. Once the domain is trained, you can release it and then use the testing tools to test. Please see the testing constraints discussed farther below.
- Typically, training takes anywhere between 2 to 10 minutes depending on how big the domain is. Larger domains can take longer.
- You can train the domain and create as many model versions as you want. There isn't a limit on this. However, only the latest 100 versions are stored and shown.
- The model that’s received from your Rasa server is stored by LivePerson. When you release the model, your brand’s Rasa server will request the model from LivePerson’s Rasa adapter.
To train a domain
- Access Intent Manager.
- Locate the domain list in the Intent Manager dashboard.
- Select the name of the relevant domain, and then select Build from the menu that appears.
- On the Intents page, choose "Work in progress" from the selector in the upper-right corner, and make any necessary changes to the intents. Do likewise for entities.
When you're done making changes, click Train & Create Version in the upper-right corner.
(If you haven't updated the training data in the domain, i.e., made changes to the intents, their training phrases, or the entities, the Train & Create Version button is disabled.)
In the pop-up window, review the guidance and click Train and create version.
Once training is completed, you can start testing with the model version. Learn more below.
A Rasa-based NLU engine can only run predictions on the model that's currently "Live," so your testing workflow must be:
- Make changes to your domain.
- Train the domain.
- Release the model version, i.e., make it "Live."
The issue with this workflow is that you can't test a model version before you release it. And once you release it, it's used everywhere: Both within Intent Manager and outside of Intent Manager, e.g., in Conversation Builder, in API calls to the NLU engine, and so on.
Therefore, LivePerson recommends that you incorporate two domains into your workflow:
- A Development domain - Use this for development and testing purposes. In this domain, you can safely release and test model versions without impacting upstream resources.
- A Production domain - Use this exclusively to support your Production resources. In this domain, you only release a model version once it's ready for Production usage.
You can test using both the Test User Input tool and the Model Tester. However, since a Rasa-based NLU engine can only run predictions on the model that's currently "Live," you cannot select a trained model version to use. The "Live" version is always used.
Process flow diagrams
Training a Rasa domain
Releasing a Rasa model version
Making intent predictions