Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

A worked example

Single answer

An agent recalls long-term facts about a shopper from Azure Cosmos DB and adds them to each chat request. The facts were extracted from text that the shopper typed in earlier sessions. Application code separately prevents recalled memory from directly choosing a tool or setting a tool parameter.

The security team sets these requirements for how recalled memory reaches the model:

  • Recalled memory must not carry the same authority as the developer-written rules.
  • The model must be told that recalled text is background, not direction.

Where should the agent place the recalled facts when it builds the request?

Choose one answer
Why

Place recalled facts in a separate, labeled block within the user message, and have the system instructions identify that block as background information. This avoids granting stored user text the authority of system rules. The application must separately enforce restrictions on tool use; prompt placement alone does not provide that safeguard.

  • Correct: In the user turn, inside a fenced, labeled block identified as background by the system message. The source recommends separating recalled facts within the user message and using system instructions to identify them as contextual information rather than commands. This meets the two prompt-placement requirements.
  • Not correct: In the arguments of the tool calls that the agent makes for the current turn. The source requires recalled content to remain inert rather than directly determining tool actions or parameters. This placement also conflicts with the application's stated safeguard.
  • Not correct: In the system message, appended after the developer-written rules. The source warns that including user-authored memories in the system message elevates their authority to that of the application's rules.
  • Not correct: In the user turn, merged without a label into the text of the current question. Merging the facts into the question without identifying them as background fails the explicit labeling requirement supported by the source.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free