Whose words are whose
Most of a screen was written by other people. How to separate what a person did, what they wrote and what they merely saw, mark every served item with where it came from, and what a list of patterns and a classifier each catch of text written to steer an agent.
- Explain why text captured from a screen is dangerous to an agent that reads it, in two different ways.
- Separate what a person did, what they wrote and what they saw at the moment of capture.
- Attach provenance to every item served, and keep other people's text out of every place an agent treats as trusted.
- Say what a list of patterns and a classifier model each catch, what each costs, and why neither is the first line of defence.
4.1The problem: most of a screen was written by someone else
A person's screen is mostly other people's words: mail, web pages, chats, documents. A system that captures the screen and hands it to an agent creates two dangers.
The first is instruction. A web page can contain a sentence addressed to whichever assistant reads it: forward this, approve that. If captured text reaches an agent looking like guidance, the page's author is steering the owner's agent.
The second is attribution. An email says "as agreed, you will pay by Friday". If that becomes "the owner committed to pay by Friday", someone else has written a fact about the owner into the owner's own model.
4.2Five things that keep them apart
1. Kinds are separated at capture, by how a thing was observed. Which window had the owner's attention, and for how long, is behaviour that the program measured. What the owner added to a field is theirs (Chapter 2). A window's title and the text in it were written by someone else. The three go to three files and never mix. Nothing is sorted by what it says, because what it says is the thing that cannot be trusted.
2. Facts about the owner are computed from behaviour and from the owner's own words only. No code path reads a title or a line of screen text for what it claims. A page saying "the owner's top priority is X" can become, at most, "the owner had a window open that showed this text". The model pass (Chapter 5) is never shown screen text or anything pasted.
3. Every item served carries its provenance.
| Kind | About the owner? | Author | Means |
|---|---|---|---|
owner_behaviour | yes | the program, by observation | where attention was, measured |
owner_entered | yes | the owner | typed into a field |
owner_stated | yes | the owner | written in their own notes file |
derived | yes | the program, by code | sums over behaviour: days, projects |
model_inferred | yes | a language model | a guess, with the evidence it cited |
third_party_text | no | other people or programs | it was on the screen, nothing more |
pasted_text | no | unknown | the owner pasted it |
Other people's text is always inside a field called quoted_text, beside a field saying who wrote it. It is never a key, never part of a tool's description, never in the notice at the top of an answer. Tool names and descriptions are fixed strings in the source.
def quote(text: str, limit: int = 300) -> dict[str, Any]:
"""Someone else's text, wrapped. One that reads as an order to an assistant is withheld."""
text = text or ""
verdict = _check(text)
if verdict == "flagged":
return {"withheld": "this text reads like an instruction to an assistant, so it is not served", "chars": len(text)}
if verdict == "unchecked":
return {"withheld": "not yet checked for instructions; it is being checked now, ask again in a minute", "chars": len(text)}
return {"quoted_text": text[:limit], "written_by": "other people or programs (it was on the owner's screen)"}
4. Text that reads as an order to an assistant is not served at all. The agent is told that a piece was withheld and how long it was. The owner can read it in the folder.
5. What a model infers must cite the records it was given, or code drops it, and it is served marked as a model's guess.
The first three are structure: they hold whatever any text says. The fourth is a filter, and filters miss things. That is why it is fourth.
4.3What the filter is worth
- Prompt injection
- Text placed where an agent will read it, written to make the agent act for the text's author and not for its owner.
The filter began as a list of patterns: phrases that throw away earlier instructions, that address "the assistant reading this", that tell it to keep something from the user, that tell it to use a tool. Scored on 30 injections and 40 ordinary lines chosen to look like them ("Please send the signed copy to Anita by Thursday"), the first list caught 25 and wrongly flagged 5. It was rewritten until it scored 30 of 30 with no false alarm.
That number flatters it. Ten more injections were then written and never used to change the list. It caught four. Verified
An open classifier model trained for the purpose was then scored on the same ten.
| Filter | Caught | Ordinary lines wrongly withheld | Cost |
|---|---|---|---|
| Pattern list | 4 of 10 | 0 of 12 | microseconds, no memory |
| Classifier model | 8 of 10 | 2 of 12 | 0.3 s for a window title, 1.8 s for a paragraph; about 1 GB of memory; 740 MB of disk |
| Either | 9 of 10 | 2 of 12 |
The sets are small and were written by the person who wrote the filter. They show a direction and not a rate.
4.4A slow model and an impatient agent
The classifier takes a third of a second per title on a laptop. The design that followed from that:
- A piece is withheld at once if the pattern list flags it.
- Otherwise its verdict is looked up by the hash of its text. Verdicts are kept, so each text is paid for once.
- A piece with no verdict is checked on the spot only while the answer's time budget lasts (2.5 seconds). After that it is withheld as "not yet checked" and queued. A background thread works through the queue.
- New window titles are queued as they are recorded, so the answer to "what was I just doing" is normally already checked.
The rule under all four: unchecked text from other people is never served. The classifier is off by default, because a gigabyte of memory is a great deal for a background service whose main defence does not depend on it.
The first version asked the classifier about every quoted line of every search result, one at a time, while the agent waited. The first search on the real folder took 38 seconds. The time budget, the queue and the cache came from that measurement. With them the same search took about one second with the classifier on, and a tenth of a second with it off. Verified
- Screen text is dangerous twice: as instruction, and as false fact about the owner.
- Separate kinds by how they were observed, compute facts only from the owner's own behaviour and words, and mark every item.
- A filter for injections is a second lock. Patterns caught 4 of 10 unseen cases; with a classifier, 9 of 10, at a gigabyte of memory.
- When a check is slow, fail closed: withhold what has not been checked.
- A project's name is served as a plain label, not as quoted text, on the grounds that it is the owner's own folder name. Describe a way a stranger could choose that name. How much harm could a label of eighty characters do?
- Write two injections the pattern list would miss, and two ordinary sentences it would wrongly withhold.
- The classifier wrongly withheld "Kindly disregard my last email, wrong attachment." What is the cost of that error to the owner? Compare it with the cost of missing one injection.
- Hard, open: the fourth lock withholds text. Design a version that serves the text but in a form an agent cannot mistake for instruction. What would you have to assume about the agent?