prePaste

For teachers

A teacher's guide to hidden prompts in assignments

The short answer

You can put a line in an assignment that students do not see and an AI does. If a student gives the whole file to an AI, the answer shows it. The answer contains a certain word, or it answers a question that is not on the page. People call this a Trojan horse prompt, and it takes two minutes to set up.

Before you use one, work out who else reads the line, what a hit shows, and what you have told the class.

How does a hidden prompt work?

An AI assistant reads the text of a file and ignores how it looks. Colour, size and position do not change what it reads. If you set a sentence in white two-point type under question 2, the assistant reads it as the next sentence of the assignment.

A student who reads the page never sees that sentence. A student who selects the whole assignment and pastes it into a chat, or uploads the file, sends the sentence too. This is prompt injection, done on purpose by the document's author.

What should the hidden line say?

  • An extra question. This is the strongest choice. It reads as part of the assignment, so an assistant answers it without comment. A submission that answers part (c) has answered a question that is not on the printed page.
  • A marker word or reference. Ask for a named event, an unusual word or a particular source. A marker is easy to search for, but it is the weakest evidence. A student can use the word by chance, and an assistant may tell the student that the document asked for it.
  • A wrong method or value. Ask for a wrong method or a wrong value. The signal is clear, but a student whom your policy allows to use AI learns something false. We advise against it.

(c) Find the same limit as n → −∞.

An extra question written like the rest of the assignment. It does not address an AI, so an assistant has nothing to refuse or point out.

Keep the line short and write it as part of the task. An assistant is most likely to warn the student about lines that address it directly, such as "if you are an AI" or "ignore your previous instructions".

What are the ways to hide it?

  • Page-coloured text. Type the line and set its colour to the page's colour. The line survives a copy and paste with formatting, and an upload of the document or its PDF. Students see it when they select all, use dark mode or paste as plain text.
  • Tiny text. Set the line in one- or two-point type, usually in the page's colour too, so it looks like a gap between paragraphs. Students find it the same ways, and also by zooming in.
  • Off the page or behind a picture. Put the line in a text box and move it behind an image or past the margin. An uploaded file carries it. A student who copies only the visible question does not.
  • Outside the body. Picture descriptions, comments and document properties can each hold a sentence. This is the least reliable place. An export to PDF often drops these fields, and some assistants do not read them.
  • Invisible characters. You can spell a sentence in characters that draw nothing on screen. It survives a plain-text paste, and selecting the text does not show it. You need a tool to write it, you cannot proofread it, and some assistants and learning platforms strip it.
  • The PDF's text layer. A PDF can show one page and carry different text underneath. You need PDF software to make one, and it does nothing when a student sends a screenshot.

Whichever you choose, export the file the way students will receive it and test that copy. Converting to PDF, uploading to a learning platform or pasting into a quiz editor can strip colour, drop tiny text or turn the page into a picture.

Where does it fail, and what does it cost?

  • Screen readers read it aloud. Hidden text is hidden only from sight. A student who uses a screen reader hears your extra line as part of the assignment and may answer it in good faith. Talk to your accessibility office before you use a hidden line, and tell those students what to expect.
  • Careful students find it. Select-all, dark mode or a paste into a notes app shows the line. A student who sees an extra question may answer it by hand or ask you about it. Neither student used an AI.
  • Some students who used an AI do not carry it. They retyped the question, sent a screenshot, or checked the file first. Tools such as prePaste show hidden text and give back a clean copy.
  • Assistants are inconsistent. The same file can produce the marker in one assistant and not in another, or on Monday and not on Thursday.
  • A hit is not proof. A hit shows that the assignment text went through an AI. It does not show how much of the work is the student's, or what they meant to do.
  • Students may feel tricked. Students who learn about a hidden line afterwards tend to read it as a trick. If you announce it beforehand, they read it as a rule.

What is a fair way to use it?

  1. Write your AI policy down first. Say what is allowed, assignment by assignment. A hit on a hidden line shows nothing if you never stated the rule.
  2. Say that assignments may contain hidden checks. You lose little by saying so. Most of the value is deterrence, and students who were told cannot feel tricked later.
  3. Use an extra question, not a wrong answer. It gives the clearest signal and teaches no student anything false.
  4. Plan for assistive technology. Agree a plan with your accessibility office before you send the file out.
  5. Test the exact file, and keep it. Try it in more than one assistant. Keep a dated copy of what students received.
  6. Treat a hit as a reason to talk. Ask the student to walk you through the work, and follow your institution's process. The marker is a reason to ask questions. It does not settle anything by itself.

How do I see what an AI will read in my file?

Drop the file you plan to hand out at prepaste.com. prePaste shows each line that is in the file but hidden on the page. That includes the line you added and any you did not, such as leftover comments, a template's hidden fields and text copied in from a web page.

An AI gets that copy, and a student who checks the file sees the same list. prePaste finds a line by how it is hidden, so check the exported file, not the draft.

What else works?

A hidden prompt is one signal, and an unreliable one. Use it with evidence of how the work was done, such as drafts and version history, a short conversation about the submitted work, writing done in class, and questions about what was said in class.

Questions

Does hidden white text work on ChatGPT?
Often, but not always. Hidden text in an uploaded file does reach the assistant. The assistant may act on it, ignore it or tell the student about it, and that changes between assistants and over time. Test the exact file you will hand out.
Can students see a hidden prompt?
Yes, if they look. Select-all, dark mode, a plain-text paste or a checker such as prePaste will show it.
Will a screen reader read hidden text?
In most cases, yes. White or tiny text is still text, and a screen reader reads text. Students who use one will hear the line you hid.
Is a marker word proof that a student used AI?
No. It is a reason to ask. Students can use a word by chance, and a marker says nothing about how much of the work the student did.
Do I have to tell students about hidden prompts?
Rules differ between institutions, so ask yours. We think you should. A check that students know about deters more than one they learn about later, and it does not disadvantage students who use assistive technology.
Why does prePaste, which removes hidden text, explain how to hide it?
Because students and teachers should both know how hidden prompts work. prePaste shows what is in a document and leaves the judgement to the reader. That applies to a student who opens an assignment and to an instructor who checks one before handing it out. There is a guide for students too.