Using values in prompts
Once a value is in learner memory, any slide of the workspace can use it. This page shows the {{memory.…}} syntax, how to force a scope, how to add a fallback, and how to personalize what the learner sees. It is for course authors who write slide instructions.
Insert a memory value
Section titled “Insert a memory value”In the field, type @ and pick the variable, or click its chip. You can also type {{memory. followed by the key, then }}. For example, if an earlier slide saved the learner’s profession under the key profession:
The learner works as {{memory.profession}}.Adapt every example and every piece of feedback to that profession.When an identified learner uses the slide, SlideMind replaces the placeholder with that learner’s value before the AI receives the instructions.
You can use memory placeholders in:
- the instructions for the AI;
- the response example;
- the question of a Q&A slide;
- the opening message of a Chat slide shown in the SlideMind widget.
In these fields, type @ to search the available variables, or click a chip to insert it at the cursor. Variables defined in the Memory Hub appear in the Learner memory group under their readable Name, with their description, and the inserted placeholder shows as a pill with that name. Keys that a slide saves without a Memory Hub definition also work, but they are not suggested: type them yourself.
Which value is used
Section titled “Which value is used”A key can exist at several scopes. By default, SlideMind uses the most specific value the slide can see. To read one scope only, put the scope between memory. and the key.
| Placeholder | Reads |
|---|---|
{{memory.profession}} | The most specific value: this slide, then its module, then its course, then Global |
{{memory.global.profession}} | The Global value only |
{{memory.course.profession}} | The value saved for this slide’s course |
{{memory.module.profession}} | The value saved for this slide’s module |
{{memory.slide.profession}} | The value saved for this slide |
For example, a course can override a Global level with a Course level. A slide of that course reads the Course value with {{memory.level}}, and can still read the workspace-wide value with {{memory.global.level}}. See How learner memory works.
Add a fallback
Section titled “Add a fallback”A value can be missing (the learner is not identified, or the earlier slide was skipped) or empty. A placeholder inserted from the @ list or a chip then disappears from the text. To show a text instead, click its pill (or press Alt+Enter right after it), type the text under If empty, show, then click Apply. In the field, the fallback is written after a vertical bar:
Address the learner as {{memory.first_name|dear learner}}.The fallback is used when the value is missing or empty. An empty fallback, as in {{memory.first_name|}}, removes the placeholder.
For the general rules of placeholders, see Variables in prompts.
Personalize what the learner sees
Section titled “Personalize what the learner sees”Memory placeholders also work in learner-facing text. Use them to greet the learner by name or to recall an earlier answer.
- Chat slide in the SlideMind widget. In the Conversation step, write the Opening message, for example:
Hello {{memory.first_name|dear learner}}! You are about to practice a customer conversation.The opening message is the first message learners see; it is part of the conversation context but does not call the AI by itself. - Q&A slide. In the Question step (“What does the learner see?”), the question accepts placeholders too. The AI receives the question with the value filled in, and in the SlideMind widget the learner sees it that way.
An identified learner sees their own value. Other learners see the fallback, or the text without the placeholder.
Test your placeholders
Section titled “Test your placeholders”- Try it and the Sandbox have no identified learner. Memory placeholders show their fallback text, or disappear.
- In the Sandbox, click Preview the prompt only to see the Prompt sent to the AI without calling the AI. Its line Variables used, Variables missing and Fallbacks used shows which memory placeholders got no value and which took their fallback. See Sandbox.
- To test real values, launch the published course from your LMS as an identified learner. See Test before going live.
What reaches the AI provider
Section titled “What reaches the AI provider”Every memory value that a placeholder inserts is sent to the AI provider with the prompt. Values that the slide does not reference are not sent. Insert only the values the activity needs, and never store confidential information in memory. See Data, AI providers and your responsibilities.
Next steps
Section titled “Next steps”- Saving values: save the values you want to reuse.
- Memory Hub: define variables so they appear in the variable picker.
- Write the AI instructions: structure the instructions that use these values.