Knowledge Skill Case Study: University

The following is a fictional case study on how a university created a knowledge skill so that students can stay up to date on activities at the dorms as well as the dining hall menus and hours.

Problem

The dining hall menus change every day and the timings are different on the weekend versus weekdays. Dorm events, such as movie night, rotate between dorm buildings.

The following list shows examples of questions that the skill should be able to answer:

  • "When is the next movie night?"
  • "Where is movie night?"
  • "What's for lunch today?"
  • "When does dinner end?"

Getting the data

The university staff went to work collecting data to answer these types of questions. The team sorted the data into two categories:

  • Dorm activities – When and where dorm activities, such as movie night, take place
  • Dining hall menus and hours – Dining hall menus and hours

Mapping the data to templates

Based on the previous categories of data and question types, the university then determined which knowledge skill templates to use. They mapped their data to the following templates.

Data category Template Why Sample questions

Dorm activities

Events

This template provides time, location, and other information about events. This data helps users find information about activities in the dorms.

"When is the next movie night?"

"Where is movie night?"

Dining hall menus and hours

Menus

This template helps users answer questions about dining hall menus and hours.

"What's for lunch today?"

"When does dinner end?"

Example data

After the university determined which templates to use, they downloaded the templates from the Alexa Skills Kit developer console and began to fill in the rows using their data.

They structured their data in the following format to reflect different menus, dining hall hours, and locations for different activities.

Events

Click the following figure to see data that the university added to the Events template.

Knowledge skill events data example.

Click the following figure to see data that the university added to the Menus template.

Knowledge skill menu data example.

Example questions

Shared invocation names or phrases (such as "lunch" and "movie night") are stored in event_type or menu_type columns rather than name or menu_name columns, which must be unique. As a result, the knowledge skill can select the appropriate row and use the name_for_answer, which is not unique, to give a conversational answer.

The following example questions demonstrate this behavior.

  • "When is the next movie night?"
    If the question is asked before 6/7/22 at 5 PM, the answer will be about June's movie night. If the question is asked between 6/7/22 at 5 PM and 7/5/22 at 5 PM, the answer will be about July's movie night, and so on.

  • "Where is movie night?"
    If the question is asked before 6/7/22 at 5 PM, the answer will be about June's movie night ("The June Movie Night will be in the Building A common room"). If the question is asked between 6/7/22 at 7PM and 7/5/22 at 5 PM, the answer will be about July's movie night ("The July Movie Night will be in the Building B common room"). If an event is going on, the answer will be about the in-progress events.

  • "What's for lunch today?"
    The skill will use the menu_items column to generate the answer. The skill will select the appropriate row to use depending on the day the user asks the question.

  • "When does dinner end?"
    The skill will use the end_time column to generate the answer. The skill will look for a row with a menu_type of dinner that is ongoing, or it will answer with the upcoming dinner menu.