Skip to main content
Tokenline

Line 2 · Station 5 of 6

AI for Research & Coding

Use AI as a starting point for research and a helper for code — while finding real sources and testing everything.

  • 8 min
  • +50 XP
  • 2 knowledge checks

By the end of this station, you can:

  • Use AI to plan research without treating it as a source
  • Use AI to explain and debug code you are responsible for
  • Explain why AI-generated code and citations must be checked

Research: a map, not the destination

AI can help you get started on research: getting a quick overview of an unfamiliar topic, suggesting search terms, or listing the main debates around a question.

But an AI chatbot is not a source you can rely on for your final work. It can mix up facts, leave out important context, and even invent sources that don't exist. Your job is to find, read and cite real sources — books, articles, databases and websites you can check.

A research workflow that uses AI safely

  1. Get oriented

    Ask for a short overview and key vocabulary so you understand what you'll be reading about.

  2. Generate search terms

    Ask for keywords and related topics to use in your library database or search engine.

  3. Find and read real sources

    Use your school library, databases and trustworthy websites. Read the sources yourself.

  4. Cite what you actually used

    Cite the real sources you read. If you used AI in a way your teacher allows, follow your class's rules for disclosing or citing it.

Knowledge check 1

+10 XP on first try
An assistant gives you a quote and a citation from a journal article that supports your argument perfectly. What should you do?

Coding: a helper that still needs a reviewer

In coding, AI can explain what a piece of code does, suggest why an error is happening, write small examples, and help you understand an unfamiliar concept like loops or functions.

AI-generated code can look right and still be wrong. It may have bugs, miss edge cases, use outdated methods, or include security problems. You're responsible for any code you submit or run, so you need to understand it and test it.

ExampleDebugging while learning

You

I'm learning Python in my intro CS class. My loop is supposed to print the numbers 1 to 5 but it prints 0 to 4. Here's my code: for i in range(5): print(i). Don't just fix it — explain why it happens.

AI assistant (sample)

range(5) starts counting at 0 and stops before 5, so it produces 0, 1, 2, 3, 4. To print 1 through 5, you can give range a start and a stop: range(1, 6). The stop value is never included, which is why it's 6 and not 5. Try changing it and run your code to confirm.

Why it matters: Asking for an explanation — not just a fix — helps you learn the rule so you won't need help with it next time. Running the code yourself is the real test.

Rules for AI-assisted code

  • Understand every line before you use it. If you can't explain it, don't submit it.
  • Test with normal inputs, unusual inputs and edge cases.
  • Never paste passwords, API keys or private data into an AI tool.
  • Follow your class's rules — some assignments require you to write code without AI.
  • Be aware that generated code may resemble existing code with its own license terms.

Key terms

Primary source
An original record or first-hand account, such as a historical document, a dataset or a research study, rather than someone's summary of it.
Debugging
The process of finding and fixing errors in computer code.
Edge case
An unusual or extreme input, like an empty list or a negative number, that can reveal bugs normal testing misses.

Knowledge check 2

+10 XP on first try
An AI writes a function for your coding project. It works on the one example you tried. What's the most responsible next step?

Finish this station

Answer every knowledge check (right or wrong) to unlock completion.

  • Knowledge check 1 — not answered yet
  • Knowledge check 2 — not answered yet

0/2 checks answered