Back to the lesson

Prompt workbench

Score a prompt you already use, build one from parts, compare weak and strong versions, and see how hidden instructions in a document can hijack a prompt. Everything is checked in your browser and none of your text is sent anywhere, unless you choose to send a prompt to a model running on your own computer. Like every page on this site, it counts page views with the Foundation's self-hosted metrics, which use no cookies.

1. Score a prompt you already use

Do not paste secrets or private data. The checker runs locally, but habits matter.

2. Build a prompt from parts

How the checker works

  • For a built prompt, it reads your fields, so the six parts are exact.
  • For a pasted prompt, it looks for common patterns such as "you are", numbers, "return", and "for example". These are rough heuristics, not understanding.
  • Tokens are estimated as characters divided by 4, a common rule of thumb for English. Real tokenizers differ.
  • The checker cannot tell you whether the model's answer is correct. Test with real inputs.

What the checker found

    The assembled prompt

    
            

    4. Injection lab

    The task: summarize a customer email. The email contains a hidden instruction. Switch the defenses on and off and watch the prompt change.

    Exposure (a teaching rating, not a measurement)

    
            

    Outside the prompt

    • Give the model no tools, files or secrets it does not need (least privilege).
    • Treat the output as untrusted. Validate it before acting on it.
    • Keep a human in the loop for anything that matters.

    5. Try it on your own local model (optional)

    Sends one prompt to a model on your own computer, such as one run with Ollama. Nothing goes to any other server. Results vary from run to run and from model to model, which is the point.

    
            

    If the browser blocks the request, Ollama may need to allow this page's address. Set the OLLAMA_ORIGINS environment variable to and restart Ollama. Some browsers also ask permission before a page may reach your local network, or block it from secure pages.

    This is a teaching tool. The checks catch common mistakes, not every mistake. Dedicated to the public domain under CC0 1.0.