Learn more about one of the key concepts of Jovo: The RIDR (Request - Interpretation - Dialogue & Logic - Response) Lifecycle.
The RIDR Lifecycle is an essential process of a Jovo app. Each user request flows through the lifecycle that integrates with various services. At the end, RIDR returns a response back to the user.
RIDR includes four key elements:
- Request: Collecting raw data and native platform requests
- Interpretation: Turing raw data into structured input
- Dialogue & Logic: Mapping structured input to structured output
- Response: Turning structured output into native platform responses
You can find a long-form introduction to RIDR on Context-First: An Introduction to Voice and Multimodal Interactions.
The Request step starts the interaction and captures necessary data.
This step includes a few things, depending on the platform you're building for:
- Platforms like Alexa and Google Assistant do a lot of the grunt work (capturing input, doing speech recognition and natural language understanding) for you and already come with fully populated JSON requests that include a user ID, data about the user inquiry (sometimes even
entities) and more
- For custom interfaces (for example web, mobile, or custom hardware), you need to take care of the user input recording yourself. Jovo helps with this process. Take a look at our clients for more information.
This step populates the Jovo
The Interpretation step tries to make sense of the data gathered from the Request.
Some platforms (like Alexa and Google Assistant) already come with structured data like
entities. For others, there is the need to integrate with additional services.
Here are some of the things that might happen in this step:
- ASR: If the
$requestcontains raw audio, a speech recognition service could be used to turn it into raw text
- NLU: A natural language understanding service turns raw text into structured input (
- Potentially, you can plug in any other service, e.g. emotion detection, sentiment analysis, and more
This step populates the Jovo
Dialogue & Logic
In the Dialogue & Logic step it is determined how and what should be responded to the user.
This step consists of both dialogue management and domain/business logic. You can find a long-form introduction to dialogue management on Context-First.
Here are some of the things that happen in this step:
- Routing: Determines the component and handler that should fulfill the request
- Components: The key elements that structure the dialogue into reusable elements
- Handlers: Functions that fulfill a specific request
- Services: Utility classes that keep business logic separated dialogue (handlers)
- Output: The result of a handler is to return an appropriate output
The Dialogue & Logic step usually ends with a populated Jovo
In the final Response step, the
$output array from the previous step is translated into a native platform
$response. Learn more about the Jovo
$response object here.
This response is then returned back to the platform.
For a detailed look into all the RIDR middlewares that are executed as part of the RIDR Lifecycle, take a look at table below.
request middleware group
|Turns the raw JSON request into a
request middleware group with propagated
interpretation middleware group
|ASR/SLU integrations turn speech audio into raw text
|NLU integrations turn raw text into structured input
interpretation middleware group with propagated
dialogue middleware group
|Uses information from the
interpretation steps to find the right component and handler
|Executes the component and handler logic
dialogue middleware group with propagated
response middleware group
$output into a raw JSON response
|TTS integrations turn text into speech output
response middleware group with propagated