|
| 1 | +# Guidelines for Declaring the Use of Large Language Models in Project Reports |
| 2 | + |
| 3 | +**Course:** Advanced Machine Learning (FYS-STK / IN-STK course, University of Oslo)** |
| 4 | +**Applies to:** All written project reports and submitted code |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## 1. Preamble |
| 9 | + |
| 10 | +Large language models (LLMs) such as ChatGPT, Claude, GitHub Copilot, Gemini, and similar tools are |
| 11 | +permitted and even encouraged in this course. They are powerful aids for writing code, exploring |
| 12 | +unfamiliar concepts, drafting text, and correcting language. |
| 13 | + |
| 14 | +However, **using an LLM does not reduce your intellectual responsibility for what you submit.** |
| 15 | +Every result, derivation, code block, and argument in your report must be something you understand, |
| 16 | +can defend, and have verified. An LLM can hallucinate plausible-sounding but wrong equations, |
| 17 | +incorrect references, and subtly broken code. Catching and correcting such errors is itself part |
| 18 | +of the learning process and is your responsibility. |
| 19 | + |
| 20 | +The declaration requirements below are designed to be: |
| 21 | + |
| 22 | +- **lightweight** — a short, structured appendix, not an essay, |
| 23 | +- **specific** — tied to concrete tasks, not vague, |
| 24 | +- **honest** — a genuine record of how the tool shaped the work. |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## 2. General Principles |
| 29 | + |
| 30 | +**Principle 1 — Transparency.** |
| 31 | +Any significant use of an LLM must be declared. "Significant" means the LLM contributed content, |
| 32 | +logic, or structure that appears in the final submission, not merely that you consulted it for |
| 33 | +background reading you then independently summarised. |
| 34 | + |
| 35 | +**Principle 2 — Ownership.** |
| 36 | +You are the author of your report. LLMs are tools, like a compiler, a spell-checker, or a |
| 37 | +textbook. Declaring their use is analogous to citing a reference — it does not diminish your |
| 38 | +authorship; concealing it does. |
| 39 | + |
| 40 | +**Principle 3 — Verifiability.** |
| 41 | +Any code generated or substantially assisted by an LLM must be tested, understood, and commented |
| 42 | +by you. Any text written or heavily revised by an LLM must be read, understood, and endorsed by |
| 43 | +you. If you cannot explain a piece of code or a paragraph in your own words during a potential |
| 44 | +oral follow-up, it should not be in the report. |
| 45 | + |
| 46 | +**Principle 4 — Scientific integrity.** |
| 47 | +Do not ask an LLM to fabricate results, invent references, or make up numerical values. If you |
| 48 | +use an LLM to help find references, verify every citation against the actual source before |
| 49 | +including it. |
| 50 | + |
| 51 | +--- |
| 52 | + |
| 53 | +## 3. What Must Be Declared |
| 54 | + |
| 55 | +The table below maps task types to the required level of declaration. |
| 56 | + |
| 57 | +| Task | Declaration required? | Where to declare | |
| 58 | +|---|---|---| |
| 59 | +| Spell-checking / grammar correction | Yes (brief) | Appendix, one line | |
| 60 | +| Rephrasing for clarity (minor) | Yes (brief) | Appendix, one line | |
| 61 | +| Structural editing (reorganising sections, rewriting paragraphs) | Yes (detailed) | Appendix, per section | |
| 62 | +| Drafting an entire section from a prompt | Yes (detailed) | Appendix + inline note | |
| 63 | +| Generating a code skeleton or template | Yes | Code comment + Appendix | |
| 64 | +| Debugging code (LLM identified the bug) | Yes | Code comment | |
| 65 | +| Generating a complete function or class | Yes | Docstring + Appendix | |
| 66 | +| Explaining a concept you then summarised in your own words | No | — | |
| 67 | +| Literature search (you verified all citations) | No | — | |
| 68 | +| Brainstorming project ideas (you chose and developed them) | No | — | |
| 69 | + |
| 70 | +--- |
| 71 | + |
| 72 | +## 4. How to Declare: The LLM Appendix |
| 73 | + |
| 74 | +Add a dedicated appendix section titled **"Appendix: Use of AI/LLM Tools"** at the end of your |
| 75 | +report (before the reference list, or after — be consistent). The appendix must contain the |
| 76 | +following subsections where applicable. |
| 77 | + |
| 78 | +### 4.1 Tools Used |
| 79 | + |
| 80 | +List every LLM tool used in the project. |
| 81 | + |
| 82 | +**Template:** |
| 83 | + |
| 84 | +``` |
| 85 | +Tools used: [Tool name, version or access date, access method] |
| 86 | +
|
| 87 | +Example: |
| 88 | +- ChatGPT (GPT-4o, accessed via chat.openai.com, January–May 2026) |
| 89 | +- Claude (Claude Sonnet, accessed via claude.ai, February 2026) |
| 90 | +- GitHub Copilot (integrated in VS Code, throughout the project) |
| 91 | +``` |
| 92 | + |
| 93 | +### 4.2 Text Writing and Editing |
| 94 | + |
| 95 | +For each section of the report, state the role the LLM played using one of the four |
| 96 | +**contribution levels** defined below. |
| 97 | + |
| 98 | +**Contribution levels:** |
| 99 | + |
| 100 | +| Level | Label | Meaning | |
| 101 | +|---|---|---| |
| 102 | +| 0 | None | No LLM assistance | |
| 103 | +| 1 | Language only | Spell-check, grammar, minor phrasing | |
| 104 | +| 2 | Editorial | LLM rewrote or restructured sentences/paragraphs; you supplied all ideas and checked the result | |
| 105 | +| 3 | Generative | LLM drafted substantial text from your prompts; you revised, verified, and took ownership | |
| 106 | + |
| 107 | +**Template:** |
| 108 | + |
| 109 | +``` |
| 110 | +Section | LLM contribution level | Notes |
| 111 | +---------------------|------------------------|------------------------------ |
| 112 | +Abstract | 1 | Grammar check only |
| 113 | +Introduction | 2 | Rephrased two paragraphs for clarity |
| 114 | +Theory / Methods | 0 | Written independently |
| 115 | +Results | 0 | Written independently |
| 116 | +Discussion | 2 | LLM suggested reorganisation of Sec. 4.2 |
| 117 | +Conclusion | 1 | Minor language corrections |
| 118 | +``` |
| 119 | + |
| 120 | +If any section is Level 3, add a sentence describing what prompt(s) you used and what changes |
| 121 | +you made to the LLM output. |
| 122 | + |
| 123 | +**Example (Level 3 note):** |
| 124 | + |
| 125 | +> *Section 2.3 (Variational Autoencoder loss derivation):* I prompted Claude with "Explain the |
| 126 | +> ELBO derivation for a VAE at graduate level, assuming the reader knows KL divergence." The |
| 127 | +> output was used as a starting point; I rewrote the notation to match the rest of the report, |
| 128 | +> corrected a sign error in equation (7), and added the connection to our specific encoder |
| 129 | +> architecture. |
| 130 | +
|
| 131 | +### 4.3 Code Generation and Assistance |
| 132 | + |
| 133 | +For each code file or notebook submitted, state the LLM's role using the levels below. |
| 134 | + |
| 135 | +**Code contribution levels:** |
| 136 | + |
| 137 | +| Level | Label | Meaning | |
| 138 | +|---|---|---| |
| 139 | +| 0 | None | No LLM assistance | |
| 140 | +| 1 | Debugging | LLM helped identify a bug; fix implemented by you | |
| 141 | +| 2 | Snippet | LLM provided a function, loop, or short block; you integrated and tested it | |
| 142 | +| 3 | Skeleton | LLM generated the overall structure of a script/class; you filled in domain-specific logic | |
| 143 | +| 4 | Substantial | LLM wrote the majority of a file; you adapted, tested, and commented it | |
| 144 | + |
| 145 | +**Template:** |
| 146 | + |
| 147 | +``` |
| 148 | +File / notebook | LLM level | Description |
| 149 | +--------------------------|-----------|---------------------------------------------- |
| 150 | +train.py | 2 | LLM provided the learning rate scheduler loop; |
| 151 | + | | tested and adapted for our NTK experiment |
| 152 | +autoencoder.ipynb | 3 | LLM generated class skeleton for ConvAE; |
| 153 | + | | encoder/decoder architecture designed by us |
| 154 | +utils/ntk_compute.py | 0 | Written independently |
| 155 | +results/plot_figures.py | 1 | LLM debugged an indexing error in the |
| 156 | + | | eigenvalue sorting routine |
| 157 | +``` |
| 158 | + |
| 159 | +Additionally, **every LLM-generated or LLM-assisted function must carry an inline comment** in |
| 160 | +the source code itself (see Section 5). |
| 161 | + |
| 162 | +--- |
| 163 | + |
| 164 | +## 5. In-Code Documentation Standards |
| 165 | + |
| 166 | +### 5.1 Function-level docstring tag |
| 167 | + |
| 168 | +For any function where the LLM contributed at Level 2 or above, add a `LLM-assisted` tag to |
| 169 | +the docstring, stating the tool and a brief description of what it did. |
| 170 | + |
| 171 | +**Python example:** |
| 172 | + |
| 173 | +```python |
| 174 | +def compute_ntk_gram(model, X, device="cpu"): |
| 175 | + """ |
| 176 | + Compute the empirical Neural Tangent Kernel (NTK) Gram matrix |
| 177 | + for a given model and input data X. |
| 178 | +
|
| 179 | + Parameters |
| 180 | + ---------- |
| 181 | + model : torch.nn.Module |
| 182 | + The neural network (should be in eval mode). |
| 183 | + X : torch.Tensor, shape (N, d) |
| 184 | + Input data matrix. |
| 185 | + device : str |
| 186 | + Torch device string. |
| 187 | +
|
| 188 | + Returns |
| 189 | + ------- |
| 190 | + K : torch.Tensor, shape (N, N) |
| 191 | + NTK Gram matrix. |
| 192 | +
|
| 193 | + LLM-assisted |
| 194 | + ------------ |
| 195 | + Tool: GitHub Copilot (March 2026) |
| 196 | + Role: Generated the Jacobian accumulation loop using torch.autograd.functional.jacobian. |
| 197 | + Modifications: Added batching over inputs to avoid OOM on GPU; verified output against |
| 198 | + finite-difference approximation on a two-layer network. |
| 199 | + """ |
| 200 | + ... |
| 201 | +``` |
| 202 | + |
| 203 | +**Fortran example:** |
| 204 | + |
| 205 | +```fortran |
| 206 | +! LLM-assisted: Claude (Feb 2026) suggested the recursive NTK kernel |
| 207 | +! evaluation structure. Loop bounds and array indexing corrected by author. |
| 208 | +! Verified against Python reference implementation. |
| 209 | +SUBROUTINE compute_ntk_kernel(X1, X2, depth, sigma_w, sigma_b, K_out) |
| 210 | + ... |
| 211 | +END SUBROUTINE |
| 212 | +``` |
| 213 | + |
| 214 | +**C++ example:** |
| 215 | + |
| 216 | +```cpp |
| 217 | +/** |
| 218 | + * Computes the NTK covariance kernel Sigma^{(L)} recursively. |
| 219 | + * |
| 220 | + * LLM-assisted: ChatGPT (GPT-4o, April 2026) generated the base |
| 221 | + * template for the recursive lambda evaluation. The Gaussian quadrature |
| 222 | + * integration was replaced by the author with a Gauss-Hermite scheme |
| 223 | + * appropriate for the activation function used. |
| 224 | + */ |
| 225 | +double compute_sigma(double x, double xp, int depth, |
| 226 | + double sigma_w, double sigma_b); |
| 227 | +``` |
| 228 | +
|
| 229 | +### 5.2 Inline comments for specific LLM-generated blocks |
| 230 | +
|
| 231 | +For blocks shorter than a full function (e.g., a data-loading one-liner, a regex, a plotting |
| 232 | +snippet), add a short inline comment: |
| 233 | +
|
| 234 | +```python |
| 235 | +# LLM (Copilot): suggested this vectorised einsum formulation; verified correctness. |
| 236 | +K = torch.einsum('ij,kj->ik', J, J) |
| 237 | +``` |
| 238 | + |
| 239 | +### 5.3 Jupyter notebook cells |
| 240 | + |
| 241 | +In Jupyter notebooks, add a Markdown cell immediately above any LLM-assisted code cell with a |
| 242 | +brief declaration: |
| 243 | + |
| 244 | +```markdown |
| 245 | +> **LLM note:** The following cell was generated with Claude assistance (Level 3 skeleton). |
| 246 | +> The diffusion forward process loop was written by the LLM; the noise schedule and the |
| 247 | +> DDPM sampling loop were implemented independently. |
| 248 | +``` |
| 249 | + |
| 250 | +--- |
| 251 | + |
| 252 | +## 6. A Minimal Complete Example |
| 253 | + |
| 254 | +Below is a self-contained example of how the LLM appendix might look in a real report. |
| 255 | + |
| 256 | +--- |
| 257 | + |
| 258 | +### Appendix A: Use of AI/LLM Tools |
| 259 | + |
| 260 | +**A.1 Tools used** |
| 261 | + |
| 262 | +- Claude Sonnet (claude.ai, accessed February–May 2026) |
| 263 | +- GitHub Copilot (VS Code extension, throughout the project) |
| 264 | + |
| 265 | +**A.2 Text contributions** |
| 266 | + |
| 267 | +| Section | Level | Notes | |
| 268 | +|---|---|---| |
| 269 | +| Abstract | 1 | Grammar check | |
| 270 | +| 1. Introduction | 0 | — | |
| 271 | +| 2. Theory | 2 | Section 2.4 (NTK recursion): LLM reformatted equations for readability | |
| 272 | +| 3. Methods | 0 | — | |
| 273 | +| 4. Results | 0 | — | |
| 274 | +| 5. Discussion | 2 | LLM suggested restructuring paragraph order in Sec. 5.2 | |
| 275 | +| 6. Conclusion | 1 | Minor grammar corrections | |
| 276 | + |
| 277 | +*Level 2 note, Section 2.4:* I gave Claude the recursion from Jacot et al. (2018) and asked it |
| 278 | +to rewrite it in notation consistent with Section 2.1 of this report. I checked every equation |
| 279 | +against the original paper. |
| 280 | + |
| 281 | +**A.3 Code contributions** |
| 282 | + |
| 283 | +| File | Level | Description | |
| 284 | +|---|---|---| |
| 285 | +| `src/ntk.py` | 3 | Copilot generated Jacobian loop; NTK recursion and verification code written independently | |
| 286 | +| `src/train_vae.py` | 2 | Copilot autocompleted the KL annealing scheduler; adapted to our $\beta$-schedule | |
| 287 | +| `notebooks/results.ipynb` | 1 | Copilot debugged a matplotlib axis-label bug | |
| 288 | +| `src/utils.py` | 0 | Fully independent | |
| 289 | + |
| 290 | +--- |
| 291 | + |
| 292 | +## 7. Frequently Asked Questions |
| 293 | + |
| 294 | +**Q: I used an LLM to explain a concept in a textbook, then wrote the theory section myself. Do I need to declare this?** |
| 295 | +No. Using an LLM as an interactive textbook or tutor, when the final writing is entirely your |
| 296 | +own, is not different from reading Wikipedia or a review article. No declaration needed. |
| 297 | + |
| 298 | +**Q: Copilot autocompletes almost everything I type. Must I declare every autocomplete?** |
| 299 | +No — single-line autocompletes of boilerplate (import statements, obvious variable names) need |
| 300 | +not be declared individually. Declare at Level 1 ("Copilot used throughout for autocompletion") |
| 301 | +in Section A.1. Any multi-line or logically non-trivial suggestion you accepted should be noted |
| 302 | +at the file level in the code table. |
| 303 | + |
| 304 | +**Q: What if I used the LLM heavily and the contribution is genuinely hard to separate?** |
| 305 | +Be honest and say so. Write something like: "Substantial LLM assistance throughout; all code |
| 306 | +was tested, all derivations verified, all text read and understood by the author." This is |
| 307 | +acceptable — concealment is not. |
| 308 | + |
| 309 | +**Q: Can I paste in LLM-generated code if I do not understand it?** |
| 310 | +No. Understanding what you submit is a core requirement. If you cannot explain a piece of code, |
| 311 | +do not submit it. Use the LLM output as a learning resource, then rewrite it yourself. |
| 312 | + |
| 313 | +**Q: What happens if I do not declare LLM use?** |
| 314 | +Undeclared LLM use that is later identified will be treated as a violation of the University |
| 315 | +of Oslo's academic integrity policy, in the same way as plagiarism from any other source. |
| 316 | + |
| 317 | +**Q: Does heavy LLM use lower my grade?** |
| 318 | +No, provided you demonstrate understanding. The grade reflects the quality of the science, |
| 319 | +the correctness of the implementation, the clarity of the analysis, and your ability to |
| 320 | +discuss the work. How you produced it matters less than what you produced and what you |
| 321 | +understand. |
| 322 | + |
| 323 | +--- |
| 324 | + |
| 325 | +## 8. Summary Checklist |
| 326 | + |
| 327 | +Before submitting your report, verify the following: |
| 328 | + |
| 329 | +- [ ] Appendix section "Use of AI/LLM Tools" is present |
| 330 | +- [ ] All LLM tools used are listed with name and approximate dates |
| 331 | +- [ ] Every section of the report has a declared contribution level (0–3) |
| 332 | +- [ ] Level 3 sections have a brief prompt/modification note |
| 333 | +- [ ] All LLM-assisted functions have a `LLM-assisted` tag in their docstring |
| 334 | +- [ ] LLM-generated code blocks have inline comments |
| 335 | +- [ ] Jupyter notebooks have Markdown declaration cells above assisted code cells |
| 336 | +- [ ] All cited references have been verified against the actual source |
| 337 | +- [ ] You can explain every equation, result, and code block in your own words |
| 338 | + |
| 339 | +--- |
| 340 | + |
0 commit comments