Teaching Resources · For TAs and TOs · Exams and assignments

Using Generative AI to Draft an Assignment

Can you use a generative AI tool to help build a homework assignment or problem set? Usually yes, with your instructor's OK. It is good at a first draft, at variations on a problem, at test cases and at finding unclear wording. It is not good at knowing your course, and it makes mistakes that look right, especially in solutions and proofs. You stay responsible for every word students see. This page gives you a prompt to start from, a way to judge what comes back, and how to say that AI was used. If the assignment already exists and you only need the rubric, use Using Generative AI to Draft a Rubric instead.

Four rules.

  • Ask your instructor first, and use a tool the course or the university allows.
  • Never paste student work, names, grades or anything else about a student into an AI tool. That is student data, covered by FERPA.
  • Check everything yourself: solve every problem, run every test, read every proof line by line.
  • Say that AI helped. Note it on the assignment or in the syllabus (wording below).

Saying that AI helped

If AI helped create the assignment, say so where students will see it: a line at the end of the assignment, or a sentence in the syllabus that covers all course materials. It models the honesty the course asks of students, and it keeps the course's AI policy fair in both directions. Agree on the wording with your instructor. For example:

  • On the assignment: "Course staff used [tool] to help draft this assignment and its test cases. Every problem, solution and test was checked by course staff."
  • In the syllabus: "Course staff may use generative AI tools to help draft course materials such as assignments and practice problems. Staff review and check all materials before release and are responsible for their content."

The prompt

Copy the prompt below into the tool and replace every [bracketed] part. The more you fill in, the better the draft; leave a line out rather than guess. The prompt asks the tool to list its assumptions and questions before it writes anything, so answer those first.

You are helping a teaching assistant design a homework assignment for a university computing course. Work as an experienced instructor in this subject who cares about clear, fair, well-aligned assignments.

COURSE
- Course: [course number and title, e.g. COMPSCI 250 Introduction to Computation]
- Level and students: [intro / middle / upper; majors or non-majors; about how many students]
- What students already know: [prerequisites and the topics covered so far]
- Where this falls: [week of the term; what comes right before and after]
- Course conventions to follow: [notation, definitions, coding style, terms used in lecture]

LEARNING OUTCOMES
By the end of this assignment, students should be able to:
1. [outcome, with a verb you could observe, e.g. "prove a claim by strong induction and state the inductive hypothesis"]
2. [outcome]
3. [optional third outcome]
Every part of the assignment must practice at least one of these. Do not add parts that practice none of them.

TYPE OF WORK
The assignment should include these kinds of work (keep only the ones you want):
[coding / written explanation / proofs / algorithm design and analysis / data analysis and visualization / short answer / design or user study / code review / reflection]
Mix of problem types I want: [e.g. one warm-up on small cases, one main proof, one "find the error", one design-and-analyze]

TOOLS AND FORMAT
- Languages, libraries and versions: [e.g. Python 3.12 with pandas; Java 21; C with gcc; LaTeX]
- Environment: [e.g. Jupyter notebook, VS Code, a provided repo, Gradescope autograder, PrairieLearn]
- Starter material I will provide: [starter code, template, dataset, none]
- What students hand in: [files, format, where; e.g. one PDF to Gradescope, one problem per page]

SIZE AND TIMING
- Students should spend about [N] hours on it in total.
- Released [date], due [date]. [Late policy if relevant.]

ASSESSMENT
- Total points: [N]. [How points should split across parts, if you know.]
- How it is graded: [autograder / human rubric / both; visible and hidden tests; peer review]
- Partial credit: [what deserves partial credit, e.g. a correct proof structure with a gap]
- Results students may use without proof or code they may reuse: [list]

AI POLICY FOR STUDENTS ON THIS ASSIGNMENT
[Paste the course policy, or say: not allowed / allowed for these parts only: ... / allowed with disclosure.] Design the assignment so that it fits this policy: where AI is not allowed, include parts that show a student's own reasoning (explaining a decision, tracing an example, finding an error, using their own results). Where AI is allowed, say how students should report what they used and what they changed.

COLLABORATION
[individual / pairs / groups; what discussion is allowed]

OTHER CONSTRAINTS
- Avoid problems whose solutions are easy to find online or are well-known textbook exercises; change the setting so the idea is the same and the surface is new.
- Avoid problems that depend on a single trick unless the trick is the point.
- Use examples and contexts that are inclusive and do not assume background some students may not have (sports, specific cultural references, money).
- The handout must be accessible: plain language, clear headings, no information only in color or images.
- [anything else: topics to avoid, a theme, real data to use]

WHAT TO GIVE ME
Before writing anything, list your assumptions and any questions you need answered. Wait for my answers. Then produce:
1. The student handout, in this order: purpose (why this assignment, and how it connects to the course), the tasks (numbered parts with exact instructions, examples with edge cases, what is given and what is asked), what to hand in, and how it is graded (points per part).
2. A complete solution for every part. For proofs, full proofs. For code, working code and the reasoning behind it.
3. A rubric with points and partial-credit levels for each part.
4. For coding parts: test cases, marked visible or hidden, with what each one checks.
5. A table mapping each part to the outcome it practices, its points, and the time you estimate a typical student will need.
6. The three mistakes or questions you expect most often, and how the handout could prevent them.
7. A short list of what I should check by hand, where you are least sure you are right.

Follow-up prompts

A second and third pass usually improve the draft more than a longer first prompt. Paste these one at a time:

  • Be the student: "Read the handout as a student in this course who has only the background listed. Where would you get stuck or misread the task? Quote the exact wording."
  • Check the solution: "Check your solution to part [N] step by step. For each step, say why it follows. Point out any step you are not sure about."
  • Test the AI policy: "If a student pasted this assignment into an AI tool, which parts could be answered without any understanding? Revise those parts so they show the student's own reasoning."
  • Trim: "The assignment must fit in [N] hours. Cut or shorten parts, keeping every outcome covered. Show what you removed."
  • Vary: "Write two more versions of part [N] with the same idea and different surface, for a makeup or next term."

Is it a good assignment? How to judge the draft

Check the draft against the same standard you would use for one you wrote yourself. A polished-looking draft is not the same as a good one.

  • Aligned: every part practices a stated outcome, and every outcome is practiced. Use the mapping table, and cut what does not fit.
  • Correct: you solved every problem yourself. Code runs and passes its own tests from a clean copy. Every proof holds line by line. AI tools often write proofs that look complete and have a false step.
  • Clear: another TA can do it cold without asking you what anything means.
  • The right size: your own time, multiplied by three or more, fits the hours students should spend.
  • Fits the course: notation, definitions, terms and tools match lecture, not the tool's defaults.
  • Gradeable: the rubric gives the same score whichever TA grades, and partial credit rewards the reasoning you care about.
  • Fits the AI policy: paste it into an AI tool yourself. If the tool answers every part well and the policy says no AI, revise the parts that need a student's own reasoning.
  • Fair and accessible: no context that assumes a background some students lack; readable with a screen reader; nothing only in color.
  • Not copied: search a distinctive sentence or the core problem. If it matches a published assignment closely, change it or credit the source.
  • Approved: your instructor has read the final version.

After it runs, judge it the same way as any assignment: the questions students asked, where most of them lost points, and how long it took. The homework and problem sets page has more on that.

Further reading

Related pages: Using Generative AI to Draft a Rubric, Writing Homework and Problem Sets That Work and Writing Exam Questions That Test What You Mean.