10 Placement 5
10.1 Goal
In this assignment we will experiment with using a Large Language Model (LLM) to generate code. Specifically, we will use ChatGPT.
We have built a tool to enable this, called Porpoise. Please read this document to understand what Porpoise is and how it works. It’s important to read this document in full!
You have three tasks in this assignment.
10.2 Porpoise
Do all the problems in Porpoise.
10.3 Programming
To help you compare the manual and ChatGPT approaches for both (a) convenience and (b) correctness, we want you to also implement each of these functions manually (i.e., write the code yourself). When you do this, please use the name given in the problem selector: e.g., if the selector says “Problem 1: nna”, then name your function nna and name your file nna.rkt. Our tests are written assuming this name, so if your function doesn’t use this name, none of the tests will pass!
Please don’t do Problem 0, which is just adding two numbers.
You should submit one file per function.
You should try to use higher-order functions as much as possible, using the same ones as in Placement 4. However, in case this is too hard for some functions, you can use explicit recursion. You can, however, also define your own higher-order functions to help with individual problems! By this point in the placement you should be getting comfortable with higher-order functions, so don’t give up and switch to recursion too quickly.
Do provide a good purpose statement. You’ve had a lot of practice with this by now!
You do not need to provide an extensive test suite of your own. We’ve already given you several tests.
You must follow all the other guidelines we have stated over the course of placement. This is your last chance to demonstrate that you’ve internalized them.
10.4 Reflection
Please also turn in a text document describing your observations of how the two methods fared. Note: there are no “correct” answers! Indeed, each person’s reaction may be different depending on how well their prompts worked. We just want you to reflect on the process and what you learned from it. You can write about all the functions collectively, or about each one individually. Quite likely, though, you will find that they fall into a few groups; you can use this grouping to reduce your work.
Please write clearly, crisply, and as concisely as possible. Please avoid stream-of-consciousness prose and walls-of-text. After writing, read what you wrote for readability. Rewrite as needed. Don’t just dump text at us!
Here are some comments that may help you write this:
One seems easier; is it, actually? If you are always able to nail perfect implementations from your first prompt, then there’s just nothing quite like it; why bother doing anything more! If you are never able to get a working implementation, then Porpoise is a giant waste of time. Odds are your actual experience fell between the two. What worked and what didn’t? You can reflect on the differences between the two: length, predictability, control, surprise, etc. In future, when might you use which approach first?
A suggested template for the response: provide brief paragraphs summarizing your experiences with each of Porpoise and coding manually, followed by 1–3 paragraphs contrasting the two.
10.5 Turnin
Please submit using Gradescope. You will find a drop for your programming and one for your reflection. You do not need to “turn in” anything for Porpoise, because your work there is logged automatically.