To disclose AI use in a programming assignment, describe the tool, the work it helped with, and what you changed or verified yourself.

A clear note can help an instructor understand your process, but the right format depends on your course policy.

What should an AI-use disclosure include?

A useful disclosure is specific enough to explain the role AI played without suggesting that the tool produced work it did not.

Identify the application or model if known, state the task you used it for, and summarize how you evaluated its output.

Include whether you copied, adapted, or rejected suggestions.

  • Tool: Name the AI assistant or service, and include a model or version only if it is readily available or requested.
  • Purpose: Explain whether you used it to discuss an algorithm, clarify an error message, generate test cases, review code, or draft a function.
  • Extent: Identify the files, functions, or parts of the assignment it affected, where practical.
  • Your work: Describe how you checked, revised, tested, or independently reimplemented suggestions.
  • References: Follow any course requirement to submit prompts, outputs, links, or a separate usage log.

Keep the note factual. “I used an AI assistant to explain a Python exception and then changed the input validation in my own code” is more informative than “AI helped.” If you pasted generated code into your submission, say so accurately and explain what you modified and tested.

Check the assignment rules before using or disclosing AI

Disclosure does not automatically make every use permitted.

Instructors and institutions set their own rules, and requirements can differ between courses, assignments, and types of assistance.

A policy may allow brainstorming but prohibit generated code, or permit code suggestions when they are cited.

Read the assignment brief, syllabus, academic-integrity guidance, and any instructions in the learning platform.

If the rules are unclear, ask the instructor what kinds of assistance are allowed and how to report them.

Do this before relying on AI for work that will be graded.

Save the relevant guidance and your notes, particularly when the assignment specifies a particular citation style or disclosure form.

Do not assume a general AI citation guide overrides course instructions.

Where a required format exists, use it.

If no format is specified, a short statement in a comment, README, appendix, or submission note can work, provided it is visible and the instructor can identify which work it describes.

Examples of clear disclosure statements

Adapt these examples to match what actually happened and the format your course requires:

  • Concept explanation: “I used ChatGPT to explain how a binary search handles its midpoint.

    I wrote the submitted implementation and checked it against the assignment examples.”
  • Debugging: “I asked GitHub Copilot to suggest causes for a null-reference error in Parser.java.

    I used the suggestion to investigate the input check and verified the fix with my own tests.”
  • Generated code adapted: “I used an AI assistant to draft a helper function for parsing dates.

    I revised the function for the assignment’s required format and tested the behavior on valid and invalid inputs.”
  • No generated code retained: “I used an AI assistant to brainstorm possible test cases.

    I wrote the submitted code independently and did not copy generated code into the submission.”

These statements are examples, not a universal citation style.

Include prompts or full outputs only if your instructor asks for them or the applicable rules require them.

Never claim independent authorship of code that was generated or substantially shaped by an AI assistant.

Keep a simple record of AI assistance

It is easier to write an accurate disclosure when you record assistance as you work.

Keep a brief log with the date, tool, task, relevant file or function, and what you did with the response.

Save prompts and outputs when required, but avoid collecting unrelated personal or confidential information in a prompt.

A compact record might look like this:

  • Date: October 12
  • Tool: AI coding assistant
  • Task: Asked for an explanation of a failing boundary condition
  • Result: Reviewed the explanation, changed the loop condition, and wrote tests for empty and single-item inputs

This record can help you distinguish between asking for an explanation, using a suggestion, and incorporating generated code.

It also makes it easier to respond if an instructor asks how you developed a particular section.

Disclosure is different from citation and code attribution

A disclosure explains how AI contributed to your process.

A citation or attribution points readers to a source or acknowledges material incorporated into the work.

A course may require one, both, or another form of documentation.

Follow its directions, and do not treat a general disclosure as a substitute for citing human-authored code, libraries, documentation, or other sources you used.

For code adapted from a website, package, textbook, or classmate, follow the rules that apply to that source as well.

AI-generated explanations can also contain errors or repeat material from elsewhere, so verify important technical claims using reliable documentation and the assignment requirements.

AI detection and code similarity answer different questions

AI authorship classification attempts to estimate whether content may have been generated by AI.

Code similarity or plagiarism checking compares submitted source code with other code to identify overlap.

These are distinct processes: similar code does not by itself establish AI use, and an AI classifier does not determine whether code was copied from another source.

Detection scores are not proof of who wrote code or whether a student broke a rule.

They may be one part of a review, but an instructor should consider the assignment, the student’s work process, and other relevant evidence.

A disclosure can make your process more transparent; it cannot guarantee how a submission will be evaluated.

Turnitin states that its AI writing model does not reliably detect code.

Its AI writing report should not be confused with source-code similarity tools, which compare code for overlap.

For a source-code detector, Codespy is a relevant external service to research, but this article does not report a test of its performance or endorse it.

Check a provider’s current documentation and data-handling terms before submitting student work.

Common disclosure mistakes to avoid

  • Being vague: “Used AI” does not explain what the tool did or which work it affected.
  • Omitting generated code: If you incorporated generated code, describe that accurately, even if you later edited it.
  • Assuming disclosure overrides policy: Follow the rules on permitted assistance, citations, and submission format.
  • Presenting a score as proof: A classifier’s output cannot establish authorship or misconduct on its own.
  • Overstating verification: Mention tests you actually ran; do not say code was tested or validated if it was not.

A clear, brief account of the tool, its role, and your own review gives an instructor useful context.

Match the detail to the assignment requirements and describe your process truthfully.