Skip to content

Prompt Template Variable Workbench

Run the Prompt Template Variable Workbench MicroSim Fullscreen

Edit in the p5.js Editor

About This MicroSim

Implement a reusable prompt template by defining variables, validating inputs, locking stable instructions, and specifying missing-value behavior.

How to Use

Explore the visual elements and use the controls to compare states, reveal guidance, and explain how the displayed evidence supports or limits a decision. Values shown are instructional examples unless the chapter identifies an empirical source.

Iframe Embed Code

<iframe src="https://dmccreary.github.io/ai-persona-testing/sims/prompt-template-workbench/main.html" height="702" width="100%" scrolling="no"></iframe>

Lesson Plan

Learning Objective

Implement a reusable prompt template by defining variables, validating inputs, locking stable instructions, and specifying missing-value behavior.

Activity

  1. Predict what the first interaction will reveal.
  2. Explore each state and cite visible evidence.
  3. Apply the model to a new marketing scenario and identify its limits.

Assessment

Learners should perform the Create task in the objective and distinguish synthetic output from externally validated evidence.

References

  1. Chapter source - Full instructional context and specification.
  2. p5.js documentation - Rendering-library reference.