Introduction:
In this homework you will be required to think about the computations that AI systems engage in when performing complex tasks such as question answering, inference, grammar check, code explanation etc. You will think about the computations required for some task you choose by reasoning about what a function that solves the task would look like. You will write function headers and docstring which describe what is the input to the function and what is the output.
You will write descriptions that articulate what are some of the sub-tasks involved in this function, and what kinds of helper functions might help solve these sub-tasks. Finally, you will generate hypotheses about the conditions under which this function might most times, but fail occasionally – i.e., what kinds of “semantic errors” might occur in this function. You will express these hypotheses as doctests, and test these hypotheses on existing AI models.
Selecting tasks:
You can select tasks from one of two “playgrounds”
OpenAI Playground:
● Link: https://beta.openai.com/examples
● Advantage: Has a wide range of tasks. Models are state-of-the-art. Nice UI.
● Disadvantage: Requires you to create an account, which needs to be validated with a real phone number (and not something like Google Voice).
● Note, when you are creating an account, specify that it is for personal use. Once you create the account you get $18 worth of credits, which should be more than sufficient for the purposes of this assignment.
AllenNLP:
● Link: https://demo.allennlp.org/
● Advantage: It is completely free (i.e. no concept of “credits” like in OpenAI) and does not require you to create an account.
● Disadvantage: Smaller range of tasks. Models are a bit outdated (i.e., are not state of the art – but this also means you might be more successful in finding semantic errors!). The UI is less nice.
Required components:
For this homework you are required to submit a single pdf file. You can generate pdf files by writing text in some word processor (word, pages, google doc etc) and then exporting that to pdf. The pdf file should contain the following information:
1. A description of the task you chose, and why you chose it.
2. A function header and a docstring for the task which specifies the input(s) and output(s). Be sure to describe what is the type of input and output.
3. A description of at least two sub-tasks involved in this task, and a high level description of the helper functions you might write for those sub-tasks.
4. At least five doctests, of which at least three should be targeting some edge cases for the task (i.e., semantic errors that can arise from the model learning an incorrect function that works most times, but not always). See slides 11 and 12 from this slide deck for inspiration.
5. A description of why you chose the doctests you did. For the edge cases, describe why these are edge cases.
6. Screenshots that demonstrate what output is generated when you test at least two
different AI models on the inputs in your doctest.
7. A description of what you observed when you tested the two models. Did both the models generate the same outputs? Did the outputs match your expectations?
For steps 2 and 4, you can either type the function header, docstrings and doctests in IDLE/ Replit etc and include a screenshot. Or you can directly type in the function header in your word processor (but make sure to have indentation). For step 5, include screenshots from OpenAI or AllenNLP.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme