Basics of Statistical Learning
  • Home
  • Weekly Lectures
    • Week 1: Introduction
    • Week 2: Training and Testing Errors
  • Exam
  • Projects
  • Syllabus
  • Canvas

Using AI Responsibly in This Course

On this page

  • 1. Overview
  • 2. AI tools you can use in this course
    • 2a. Browser chat tools
    • 2b. AI inside coding IDEs
    • 2c. More advanced systems and agent-style workflows
  • 3. What are agents and skills?
    • 3a. What is an agent?
    • 3b. What is a skill?
    • 3c. Microsoft Copilot Chat: the closest student-facing idea is usually a custom agent
    • 3d. A practical rule for students
  • Suggested reading
    • University and tool documentation
    • Optional papers
  • Final reminder
Important

Students are encouraged to use AI in this course.

The goal is to use AI to support learning, not to outsource learning. You should use AI to ask better questions, test your understanding, debug your code, improve drafts, and explore alternatives. You should not use AI as a substitute for reading, thinking, coding, or writing.

Warning

You remain responsible for everything you submit.

That includes the correctness of facts, the quality of code, the validity of citations, and compliance with course policy. Before using AI for coursework, please read the University of Illinois guidance for students:

  • Generative AI Guidance for Students (University of Illinois)
  • Illinois AI Apps and data guidance

1. Overview

AI can be genuinely useful in a course like this. It can help you:

  • explain a concept in different words,
  • generate examples,
  • suggest debugging steps,
  • summarize your own notes,
  • turn material into study aids,
  • review the clarity of your writing,
  • suggest improvements to code structure.

At the same time, the central goal of the course is still to learn the material yourself. If AI produces an answer that you cannot explain, defend, or verify, then it has not helped you learn what you need to learn.

A good rule of thumb is:

Use AI to support your thinking. Do not use AI to replace your thinking.

When using AI in this course:

  • Follow the specific rules for each assignment.
  • Disclose AI use whenever the course or assignment asks you to do so.
  • Verify every factual claim, every citation, and every line of code that matters.
  • Do not upload data or documents that you are not allowed to share.
  • Do not paste private, sensitive, or high-risk information into public AI systems.

This is especially important for course materials and data. Uploading a small excerpt that you are allowed to use can be reasonable. Uploading restricted library PDFs, answer keys, private student information, protected health information, passwords, or other sensitive material is not appropriate.

2. AI tools you can use in this course

2a. Browser chat tools

Traditional browser-based chat tools are often the easiest place to start. Examples include tools such as ChatGPT, Microsoft Copilot Chat, Gemini, Claude, and similar chat interfaces.

These tools are often useful for:

  • asking conceptual questions,
  • getting a second explanation of course material,
  • generating small code examples,
  • turning notes into flashcards or quiz questions,
  • checking the clarity of your writing,
  • brainstorming how to start a problem.

They are usually less reliable when:

  • you ask them to solve an entire assignment from scratch,
  • you provide very little context,
  • you ask for references without checking them,
  • you expect them to know the exact conventions of this course,
  • you rely on them without running or testing the output.

A simple prompt template

A good prompt usually contains four pieces:

  1. Context: what course topic, file, or problem are you working on?
  2. Task: what do you want the tool to do?
  3. Constraints: what should it avoid doing?
  4. Checks: how should it help you verify the result?

For example:

I am studying logistic regression in this course.
Explain why the logit link is used.
Start with plain language, then write the model mathematically,
and then give a small R example.
Point out any assumptions and any places where students often get confused.

Another example:

I am working on an R/Quarto assignment.
Here is the error message and the code chunk that caused it.
Do not rewrite the whole file.
First explain the most likely cause, then suggest the smallest fix,
and then tell me how I can test whether the fix worked.

How to reduce hallucination and low-quality output

To get better answers:

  • give the model the exact question you are trying to answer,
  • provide the smallest useful code example or excerpt,
  • ask it to state assumptions,
  • ask it to separate facts from guesses,
  • ask for checks, tests, or ways to validate the answer,
  • verify the result yourself.

A practical workflow is:

  1. Ask for an explanation or a first draft.
  2. Check the logic and the assumptions.
  3. Run the code or verify the mathematics yourself.
  4. Revise the work in your own words.
  5. Document the AI help if the assignment requires disclosure.

2b. AI inside coding IDEs

For coding work, an IDE-based assistant is often more useful than a browser chat box because it can work with the files, project structure, and sometimes the terminal output in your actual workspace.

Tool Best use Notes
VS Code + Copilot Chat Multi-file coding help, debugging, refactoring, test generation Strong option when you want the assistant to see your project context
RStudio + GitHub Copilot Inline suggestions for .R, .py, and .qmd files Good for smaller, well-scoped coding tasks
Posit AI R-session-aware assistance inside RStudio Useful if you already have access; not required for this course
Claude Code / Cursor / Codex Longer coding tasks across a codebase More agentic; more powerful, but also more important to review carefully

A note on access

Before relying on a specific tool, check how you access it.

At the time of writing, Illinois publicly lists Microsoft Copilot Chat as broadly available to students. The same Illinois page lists GitHub Copilot separately under advanced tools. In addition, GitHub states that verified students can get Copilot through GitHub Education. In other words, do not assume that every student has GitHub Copilot through a blanket university license; check the current access route first.

Recommended workflow for VS Code + Copilot Chat

If you use VS Code, a good workflow is:

  1. Open the whole project folder, not just one file.
  2. Use the Chat view for larger questions, multi-step tasks, and multi-file work.
  3. Use inline chat for small local edits.
  4. Add context explicitly: attach the relevant file, function, error message, or terminal output.
  5. Ask for a plan or diagnosis first, not an immediate full rewrite.
  6. Review the proposed edits carefully before accepting them.
  7. Run the code, tests, or Quarto render yourself.

Here are some prompts that tend to work well in VS Code:

Read the relevant files in this project and explain the data flow from raw input to final output.
Do not edit anything yet.
List the three places where this pipeline is most likely to fail silently.
Use the current file and the terminal error I attached.
Suggest the smallest change that is likely to fix the problem.
Explain why the bug happens and write one simple test I should run next.
Refactor this function for readability without changing behavior.
Keep the same inputs and outputs.
Show the proposed changes clearly and explain any tradeoffs.

RStudio and Quarto users

If you work in RStudio, GitHub Copilot is available as an opt-in integration and can be helpful for smaller code completions in .R, .py, and .qmd files. It is especially useful when you already know the structure of the code you want and want help filling in details.

The safest way to use it is to keep the task narrow:

  • write a comment describing the next small step,
  • let the tool suggest a short completion,
  • accept only what you understand,
  • run the code,
  • revise as needed.

This works better than asking for an entire large analysis in one shot.

What IDE assistants are good at

These tools are often good at:

  • explaining unfamiliar code,
  • writing small helper functions,
  • suggesting refactors,
  • adding comments or docstrings,
  • generating tests,
  • diagnosing common errors,
  • drafting boilerplate code.

They are less trustworthy when asked to:

  • invent references,
  • produce a full project with no review,
  • make statistical or scientific claims without sources,
  • choose methods without domain judgment,
  • guarantee correctness.

2c. More advanced systems and agent-style workflows

I interpret “open claw” here as OpenClaw, an optional advanced tool for students who want to explore more agent-style workflows.

These systems go beyond a single chat box. Instead of only answering one prompt at a time, they can combine:

  • persistent instructions,
  • access to tools,
  • reusable skills,
  • multi-step task execution,
  • connections to files, repositories, or communication channels.

Examples in this space include OpenClaw, Claude Code, Cursor, and Codex. These tools can help with longer workflows such as exploring a codebase, editing multiple files, running commands, drafting tests, or packaging repeated procedures into reusable skills.

This is powerful, but it also means you should be more careful about:

  • permissions,
  • what files or tools the agent can access,
  • whether the task is well scoped,
  • whether you can review the intermediate steps,
  • whether you can reproduce and verify the final result.

A good beginner strategy is to use advanced agents for repeated routine tasks, not for high-stakes final answers.

Examples of appropriate advanced workflows:

  • summarize the status of a project from a folder of notes,
  • draft a checklist before rendering a Quarto report,
  • run formatting and tests before a commit,
  • explain a codebase before you start editing it,
  • turn a recurring analysis pattern into a reusable workflow.

If you are interested in learning more, useful ideas to look into are:

  • project instructions (persistent guidance for the tool),
  • skills (reusable procedures or specialized knowledge),
  • tool integrations (browser, terminal, git, external services),
  • human-in-the-loop review (the agent proposes; you verify).

3. What are agents and skills?

Students will increasingly hear words like agent, agent mode, custom GPT, custom agent, and skill. These words are related, but they do not all mean the same thing.

A useful distinction is:

  • a chat assistant mainly answers the prompt in front of it;
  • an agent can often plan, use tools, inspect files, take actions, and iterate across multiple steps;
  • a skill is a reusable task-specific capability or workflow that helps an agent perform a specialized job more reliably.

3a. What is an agent?

An agent is an AI system that can do more than produce one answer. It can often:

  • break a goal into steps,
  • look at relevant context,
  • use tools,
  • make or propose edits,
  • run checks,
  • revise its work after seeing errors or new information.

In other words, an agent is usually more action-oriented than a standard chat box.

Examples of agent-like behavior

In VS Code, an agent can work on a coding task across multiple files. Depending on the mode and permissions, it may inspect your project, propose or apply edits, run terminal commands, and respond to test or lint output. VS Code also distinguishes different roles such as:

  • Ask: explain or answer without changing files,
  • Plan: create an implementation plan before coding,
  • Agent: carry out a multi-step coding task.

On the ChatGPT website, not every interaction is equally agentic. A normal chat is often just a conversational assistant. More agent-like features include tools that can work across multiple steps, such as browsing, file analysis, or a purpose-built GPT configured for a specific task. In particular:

  • ChatGPT agent is designed to reason, research, and take actions using tools;
  • custom GPTs are versions of ChatGPT configured for a specific purpose using instructions, knowledge, and selected capabilities.

A simple way to explain this to students is:

The more the system can plan, use tools, and act across several steps, the more “agent-like” it is.

When students might use an agent

Examples:

  • “Read this Quarto project, identify why rendering fails, and suggest the smallest fix.”
  • “Look across these files and explain the analysis pipeline before changing anything.”
  • “Use these reading notes to produce a study guide organized by concept, formula, assumptions, and common mistakes.”

These are all more structured than a simple “What does this mean?” question.

3b. What is a skill?

A skill is a reusable procedure, checklist, or capability that helps an agent do one type of task well.

You can think of a skill as a repeatable recipe. Instead of re-explaining the same workflow every time, you package the workflow so the AI can reuse it.

For example, a skill might say:

  • how to debug a Quarto rendering error,
  • how to create a minimal reproducible example,
  • how to review code for readability without changing behavior,
  • how to summarize lecture notes into a fixed study template.

Skills in GitHub Copilot / VS Code

In GitHub Copilot / VS Code, Agent Skills are a real product feature. They are stored in folders with a SKILL.md file and can also include scripts, templates, examples, or other resources. A skill is intended for a specialized workflow and can be loaded when relevant. This is different from custom instructions, which are more like always-on rules or preferences.

This distinction is useful:

  • custom instructions = general guidance that should apply broadly;
  • skills = task-specific capabilities that should be used only when relevant.

Examples of course-related skills:

  • Quarto-debugging skill
    Check YAML, code chunks, file paths, package loading, and render commands. Prefer the smallest fix and always suggest one validation step.

  • R-reproducibility skill
    Ask for a minimal example, confirm package versions, identify randomness or seed issues, and suggest how to verify the result.

  • Code-review skill
    Focus on readability, comments, naming, and simple testing. Do not rewrite everything unless asked.

3c. Microsoft Copilot Chat: the closest student-facing idea is usually a custom agent

For Microsoft 365 Copilot Chat, the more accurate student-facing term is usually agent, not a standalone artifact called a “skill.”

In Microsoft’s documentation, agents combine instructions, knowledge, and in more advanced settings actions/connectors. So for teaching purposes, it is usually clearer to say:

In Microsoft Copilot Chat, students usually build a reusable helper as an agent.
In GitHub Copilot / VS Code, reusable helper workflows can also be packaged as skills.

What students can build in Microsoft Copilot Chat

Using Agent Builder, a student or instructor can describe an agent in natural language, give it instructions, add knowledge sources, test it, and then use it again later. Knowledge sources can include public websites, SharePoint content, Teams chats, uploaded files, and (if enabled) Microsoft 365 Copilot connectors.

For more advanced integrations with outside services or custom actions, Microsoft points users to Copilot Studio rather than basic Agent Builder.

“Skill-like” examples students could build with Microsoft Copilot Chat

Even if the UI calls the result an agent, the following are good examples of reusable, skill-like helpers:

Example 1: Course policy helper
  • Knowledge: syllabus, assignment instructions, FAQ, grading policy
  • Instructions:
    • answer only from the provided materials,
    • quote or cite the relevant section when possible,
    • if the answer is not in the source, say so rather than guessing.

This can help students learn the policy without inventing rules.

Example 2: Quarto / R debugging helper
  • Knowledge: course template files, troubleshooting notes, example .qmd files
  • Instructions:
    • ask for the exact error message first,
    • inspect YAML, code chunk options, package loading, file paths, and render commands,
    • propose the smallest likely fix,
    • tell the student how to test whether the fix worked.
Example 3: Reading-note organizer
  • Knowledge: uploaded lecture notes or reading notes
  • Instructions:
    • summarize by concept, definition, formula, assumptions, and common misunderstandings,
    • do not invent references or page numbers,
    • flag places where the notes are ambiguous or incomplete.
Example 4: Coding style coach
  • Knowledge: starter code, style guide, or example solutions that students are allowed to use
  • Instructions:
    • prefer small local edits,
    • explain why the change improves readability or structure,
    • preserve the original behavior,
    • suggest one simple test after each proposed change.

3d. A practical rule for students

When deciding whether to use a chat assistant, an agent, or a reusable skill, ask:

  1. Is this a one-off question?
    Use a normal chat assistant.

  2. Is this a multi-step task with files, tools, or repeated checking?
    An agent may be more useful.

  3. Is this something I do again and again in the same way?
    That is a good candidate for a reusable skill or a specialized agent.

No matter which tool you use, the rule stays the same:

You are responsible for the final work.
Use AI to support understanding, verification, and revision—not to avoid thinking.

Suggested reading

University and tool documentation

  • VS Code: Using agents
  • VS Code: Custom agents
  • VS Code: Agent Skills
  • ChatGPT agent
  • GPTs in ChatGPT
  • Microsoft 365 Copilot: Agents
  • Microsoft 365 Copilot: Agent Builder
  • Microsoft 365 Copilot: Add knowledge sources to your declarative agent
  • Generative AI Guidance for Students (University of Illinois)
  • Illinois AI Apps and data guidance
  • VS Code: Chat overview
  • VS Code: Add context to chat
  • GitHub: Copilot access for students
  • RStudio: GitHub Copilot guide
  • Posit AI user guide
  • Claude Code overview
  • Claude Code skills
  • Cursor docs
  • Cursor rules
  • Cursor agent skills
  • OpenAI Codex
  • Codex CLI
  • Codex agent skills
  • OpenClaw docs
  • OpenClaw skills

Optional papers

  • Pearce, H., Ahmad, B., Tan, B., Dolan-Gavitt, B., & Karri, R. (2022). Asleep at the Keyboard? Assessing the Security of GitHub Copilot’s Code Contributions. 2022 IEEE Symposium on Security and Privacy. DOI: 10.1109/SP46214.2022.9833571.
  • Ziegler, A., Kalliamvakou, E., Li, X. A., Rice, A., Rifkin, D., Simister, S., Sittampalam, G., & Aftandilian, E. (2024). Measuring GitHub Copilot’s Impact on Productivity. Communications of the ACM, 67(3), 54–63. DOI: 10.1145/3633453.
  • Zhang, B., Liang, P., Zhou, X., Ahmad, A., & Waseem, M. (2023). Practices and Challenges of Using GitHub Copilot: An Empirical Study. CoRR abs/2303.08733. DOI: 10.48550/arXiv.2303.08733.

Final reminder

AI can save time, but saved time only becomes learning if you use it to understand more deeply, check more carefully, and think more clearly.

Use the tools. Stay curious. But stay responsible.