Entity resolution allows us to create synonyms for our slot values, so that we can receive consistent data in our code, but still allow a user to speak in the way that makes sense for them.

Why do we need consistency, you ask? Let’s say we are using the IMDB API to pull a list of movies based on genre. The API only accepts the genre of “action”, but your skill must work when the user asks for a synonym, like “battle”, “combat”, or “war”.

Remember that the resolved value is accessed with :


In the case of our movie skill, YOUR_SLOT_NAME would be genre, so you can access the resolved value with:




On line 17 of main.js, we need to access the resolved value for the slot genre, and save it to the constant variable, genreResolvedTo.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?