Skip to main content
This is the in-class activity for Tuesday January 25.
The materials that you will need for this in-class activity are:

In Class Activity: Intent Determination with GPT-3

Today in class you will use the data you created for intent determination in text adventure games to train a GPT-3 model to perform the intent determination.

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 how to train a model to perform intent detection using the data we collected

What to do

  1. Open the GPT3 for Intent Determination.ipynb.
  2. Choose Runtime > Run all.
  3. The Colab Notebook will ask “Permit this notebook to access your Google Drive files?”. You should grant it permission.
  4. You may have to get your Intent annotation data from last time from Gradescope
  5. Scroll down to the “START HERE: Create a Prompt for Intent Detection” section of the notebook
  6. Complete the interactive annotation activity. It will save a JSON file to your Google drive.
  7. Please submit your work to Gradescope by Monday, January 31, 2022 before 11:59PM.