UP | HOME

Citation Rules

Citations

This document describes the implementation details of citing resources for the Northwestern University MS in Robotics program. It does not discuss when to cite works or which works to cite; citation rules can be found in the The NU MSR Honor Code.

Citation style is divided into categories, based on the work that is being done. These rules form a baseline, but may be superseded by assignment-specific requirements.

These rules must be followed strictly: even unintentional deviation from these rules may be viewed as evidence of academic integrity violations: it is your responsibility to seek clarification and understand and implement these rules.

Reports and Written Work (including Portfolios)

  1. For reports and other formal written work, the format used should follow The IEEE Reference Style Guide for Authors [1], with some additions and modifications noted below.
  2. At the end of the document, create a section called "References" and provide a list of references.
  3. Each item in the list is numbered, with the number placed in square brackets (e.g., [1], [2], etc.)
  4. To cite a reference inline, place the corresponding number near the text where it is required.
  5. To cite pages, a figure, or a section etc. within a work, do so like [1, Fig. 4], [2, pp. 45-48].
  6. The ordering of the citations in the reference list is not important for the purposes of the honor code: however, it may be important as part of proper formatting and style.
  7. When citing online resources, you should always include the date you accessed the resource.
  8. All direct quotations or text copied verbatim must be surrounded by quotation marks ("") and cited inline.
  9. When citing a git repository or a file from a git repository, the citation must include the SHA1 hash of the commit that was used.
    • If the repository is hosted on Github this requirement is satisfied by providing the permanent link to the file when browsing it.
    • Other code hosting websites have similar features.

Citing Collaborators

  1. To cite fellow students with whom you have worked, and whose contributions do not require a inline citation, use the following format:
    • [1] Worked With: Full Name 1, Full Name 2, etc.
    • This line should be the first line in your references list, and you can add names to it as needed.
    • It is sufficient to have a single line listing your general collaborators, even if you worked on different problems with different groups.
  2. If a project is specifically structured as a group project, then members of the group do not need to be cited: they shall be considered authors and acknowledged where authorship is acknowledged (e.g., in the README.md or on the portfolio post).
  3. The absence of a first reference stating who you worked with is a declaration that you did not work with anybody on the assignment.
  4. If a student or group of students makes a contribution that requires an inline citation, those students should be listed on a separate line, using the format outlined in [1, Sec. Q], which looks like Author1, Author2, private communication, Abbrev Month, year

Source Code

  1. All source code that you write should be in a git repository, and these guidelines assume that.
  2. In the base directory of the git repository, create a file called citations.txt
  3. The citations.txt contains your reference list. The format of the reference list is the same as that for a written report, with the following modifications:
    • Words that should be italicized are set between forward-slash (/) characters: (e.g., /Title/)
  4. Each repository should contain a README.md file, that (minimally) lists the authors of the code.
  5. You are responsible for understanding and being able to explain all code that you submit
    • Being unable to explain code that does not cite an external source can be used as evidence of academic dishonesty
    • Being unable to explain code that is cited properly cannot be used as evidence of academic dishonesty

General versus Inline Citations

  1. General citations are required for any outside source used
    • Include a short description regarding what the source was used for in the citations.txt
  2. Inline citations are required whenever the influence of a specific outside source is attributable to specific code. Such situations include
    1. Verbatim copying of code
    2. Direct translation of code in another language (including pseudocode)
    3. Implementation of an algorithm as described in book or tutorial
    4. Code generated by an AI

Inline Code Citations

  1. Inline citations for code have extra requirements to ensure that it is clear where your work begins and another ends.
  2. The following are the only acceptable formats for citing a portion of code inline.

    • For C++ or C:
    // BEGIN_CITATION [4, file.cpp:123-456]
    Code that was influenced by the citation here
    // END_CITATION
    
    • For Python or other languages where # is a comment:
    # BEGIN_CITATION [5]
    Code that was influenced by the citation here
    # END_CITATION
    
    • For xml and similar languages:
    <!-- BEGIN_CITATION [6] -->
    Code that was influenced by the citation here
    <!-- END_CITATION -->
    
    • Other languages, should use their comment character.
  3. The start of the citation must say BEGIN_CITATION and is case-sensitive. It must be followed by a valid reference number in square brackets
  4. The end of the citation must say END_CITATION and is case-sensitive.
  5. When the inline citation references source code that is part of a bigger project, the inline citation must include the filename and line numbers (e.g., [4, file.cpp:123-126]).
    • The citation must indicate the file and lines that were used (e.g., [4, file.cpp:123-126]).
    • If the code was copied or adapted, the reader must be able to find the source of that code based solely on the information you provide.
  6. If you look at a former solution to a problem (which is highly discouraged), it is the default assumption that there will be a direct link between what you looked at and what you are going to be coding, even if code is not copied directly.
    • The influence of that code (whether implicit or explicit) must be acknowledged with inline citations specifying specific files and line numbers.
    • The absence of specific inline citations is an assertion that there is not literal, functional, or architectural (outside of the assignment specifications) influence of that solution on your code.

Inline Comment Citations

  • Comments are treated like other written text for the purpose of inline citations.
  • It can be appropriate to provide inline citations in comments.
    • For example, if you read a blog post that said "Algorithm X is good at Y", it is appropriate to place a comment, as it helps the reader understand the theory behind the code.

AI Tools

There are additional rules for AI tools, depending on the nature of the tool.

  1. The citation format is Model Name, ver X. Company Name. Used On: Date. Transcript Available: (URL or local path to transcript)
    • Company name may be Self-Hosted if you are self-hosting the assistant.
  2. Additional Information will be on subsequent lines, depending on the nature of the AI used

Conversational AI

If your use of the AI tool is in the form of a conversation that does not directly modify your code (e.g., copying and pasting from ChatGPT):

  1. The full transcript of that conversation shall be treated as an external website and provided either as
    • A persistent and publically accessible URL
    • A full local copy of the conversation stored within a directory called ai_citations/ in the base directory of your repository
  2. Inline citation should direct the reader to the specific section (e.g., the first prompt prior to the generated content) of the cited transcript either by
    1. Specifying a line number. The inline citation is then =[4, ai_transcript:234-456]]
    2. Specifying an easily searchable text string [4, ai_transcript:"This short phrase", occurrence 3]
    3. An additional short copied excerpt of just the relevant portion, stored under ai_citations/excerpts. The inline citation is then [4, ai_citations/excerpts/name_of_excerpt]

Agentic AI

If your AI tool directly edits code and makes git commits:

  1. The transcript of your interactions with the AI agent should be included in ai_citations
    • With Claude Code, for example, such a transcript can be generated with /export
  2. Commits that were primarily written by you with AI assistance should provide inline citations that refer to locations in the transcript, as per the Conversational AI
  3. Commits where the code was primarily written by the AI have the following rules:
    • The AI is named as the author in the git commit log
    • Underneath the main citation line in citations.txt you should indicate which files were primarily written by AI and which by you as follows:
      • Files written by AI:, followed by an exhaustive list of filenames, one per line. Any file not in the list will be assumed to be written by you.
      • Files written by me:, followed by an exhaustive list of files written by you, one per line. Any file not in the list will be assumed to be written by AI.
    • Here is an example

      [4] Claude Code: Opus 5, Anthropic. Used On 5/5/2026. Transcript Available: ai_citations/agent_export.txt
      - Files written by AI:
          - file1.py
          - file2.py
      - The following files were primarily written by AI
          - file3.py
          - file 4.py
      

Code Completion AI

Some generative AI tools are built into editors (e.g., Copilot)

  1. Basic code-completion tasks that do not introduce new logic into the system are exempt from citation.
    • Judgment is required here, but to be exempt, the generated code must not:
      1. Introduce any control-flow or branching statements.
      2. Implement any arithmetic or logical expressions.
      3. Call API functions that you have never heard of before.
      4. Introduce new variables or types that you would not have introduced yourself.
      5. Roughly, if the completion available would have been available in 2015, it is exempt.
  2. Non-exempt code must be cited like any other AI generated code (including transcripts of any explicit prompts used).
  3. If there is no clear transcript/prompt (e.g., the code itself is the prompt) then you should:
    • List the name of the file in the citations.txt instead of the transcript
    • The context immediately following the auto-completed code that you feel was relevant to the generation should be marked at the start and end with BEGIN_PROMPT [Citation Number] and END_PROMPT
  4. Here is an example

    def myufunction(stuff):
        # BEGIN_PROMPT [4]
        """ Write a function that performs an important task
        It takes stuff as an argument and then does things
        """
        # END_PROMPT
        return =this_ai_code()
    

Example

Here is an example citations.txt:

Worked With: [List every person you worked with generally here.]
[1] Claude Sonnet 4. Anthropic. Used on 9/21/2025. Transcript Available: ai_citations/claude_session.txt
    - Files written by me:
       - care_alot.py
[2] ChatGpt. OpenAIUsed on 9/22/2023. Transcript is in ./chatgpt/transcript1.txt
     Used to help explain some difficult concepts
[3] https://stackoverflow.com/the/answer Accessed on 9/23/22
    Provided general information on debugging bugs
[4] John Smith [if John Smith gave you a specific idea outside of generally working with you].
     Discussed the algorithm, I used his pseudocode and implemented it in python

Group Projects

In group coding projects (and unless otherwise specified), each person should be assigned a letter (a-z) an maintain their own citation numbering:

  1. All citations are suffixed with the letter of the person who added the citation (e.g., [1a]).
  2. Citation lists can be maintained separately as citations_a.txt for each person to avoid git conflicts.
  3. The citation list should be combined into a single citations.txt at the end of the project.
    • The numbering does not need to be redone, letter suffixes can remain.

References

[1] IEEE Publication Operations. IEEE Reference Guide, V11.29.2023. 2023. Accessed: 9/5/2024 [Online]. Available https://journals.ieeeauthorcenter.ieee.org/wp-content/uploads/sites/7/IEEE_Reference_Guide.pdf

Author: Northwestern University MS in Robotics. Date: September 9, 2024.