This is the in-class activity for Thursday January 20.
The materials that you will need for this in-class activity are:
In Class Activity: Create Data for Intent Determination
Today in class you will create a set of data for intent determination for text adventure games. In our first version of the Text Adventure Game, we had a simple keyword-based method of handling the player’s intent. The parser implemented a function called get_player_intent
that took in a player’s command and then decided which of the following actions a player was trying to accomplish:
- Move to a new location
- Examine an object
- Get an object
- Drop an object
- Perform a special action using an object
- Check the player’s inventory
- Redescribe the scene
- Perform a sequence of actions
The Colab Notebook will guide you through creating some data that we’ll use to train a model to perform intent detection, instead of using keywords.
It’ll take about 20 minutes to complete this annotation. We’ll do this as an in-class activity. If you’re watching the video remotely, you can upload your annotations to gradescope anytime before Monday, January 24, 2022 by 11:59PM.
The results will be saved into your Google drive as a JSON file.
What to do
- Open the Colab Notebok for Collecting Intent Detection Data.
- Choose
Runtime > Run all
.
- The Colab Notebook will ask “Permit this notebook to access your Google Drive files?”.
- Scroll down to the “START HERE: Annotate Data” section of the notebook
- Complete the interactive annotation activity. It will save a JSON file to your Google drive.
- Please submit your JSON to Gradescope by Monday, January 24, 2022 before 11:59PM.
- Time permitting you can go on to the next section, “Use OpenAI For Intent Detection”, which will show you how to use your intent detection data to create a prompt and how to predict the intents for previously unseen user input.