Testing with Generative AI study guide

System Prompts vs User Prompts

In modern LLM API structures, the System Prompt provides the foundational instructions, persona, and boundary rules for the AI. The User Prompt contains the specific task or question from the end-user.

Practical example

System Prompt: "You are a helpful banking assistant. Never provide investment advice." User Prompt: "What stocks should I buy today?" The QA team must test if the model prioritizes the System Prompt's constraints over aggressive or contradictory User Prompts.

Exam scenario and common trap

Scenario: A user successfully commands the bot to output investment advice. The Trap: "The user hacked the database." The Correct Answer: The System Prompt was not robust enough to withstand a prompt override attack. QA should investigate the instruction hierarchy and add appropriate application-level controls; a system prompt alone is not a complete security boundary.

Related syllabus sections cover this topic. Reference sections: 2.1.3. See the official ISTQB syllabus for exam scope. Examples are independent; QA-ace is not affiliated with ISTQB.