View on GitHub

Humanities in the Age of AI

Fall 2024 - Anastasia Salter

Tutorial: Back to Bots

As we’re approaching the end of the semester, we’re going to think about how generative AI will influence complex workflows. This week, we’ll build a simple portfolio combining our experiments thus far, and in the process combine new approaches (such as music generation and code conversion) with the workflow we’ve developed over the last few weeks building interactive content for the web.

Fine-Tuning a Model

Recall the Eliza Bot we “spoke” with at the beginning of the class: Eliza’s code uses the same fundamental structures as you’ve been reading about over the last few weeks in Code to Joy. Her set of replies is thus fundamentally very limited to what is pre-scripted. We could easily build our own version of Eliza at this stage, but instead of working with an “old-school” bot, we’re going to add on by using the skills you’ve gained with scraping and preparing datasets to fine-tune our own more responsive “bot.”

Here’s the prompt I started with, using the o1-preview reasoning model to get the initial code for every part of the problem. You’ll need to work from a similar prompt iteratively, looping through each section of the task until you get results that enable you to move forward:

Here’s the steps that ChatGPT o1 suggested to me, with some notes on how you might approach them:

Austen bot output

When complete, your sample output will look something like this one from my AustenBot - you can try it for itself using the Colab notebook. This bot is still fairly limited (we gave it a small dataset using GPT2, an older model) - however, it offers some insights into how you might build on a creative dataset towards an interactive experience. You can also use this notebook to help you build and debug your own bot.

Reflecting on Chat

Compare this experience to the bot interactions we had at the start of the semester: how has your understanding of, and expectation of, these bots changes? Where do the limitations of the dataset and the model come out, and how can you understand that through the lens of the readings and experiments we’ve done across the semester?