QuestionQ16
Prompt Engineering for Effective Software TestingYou are completing a test-automation task that generates XML-based test conditions that must conform to a strict schema. To reduce errors and preserve formatting consistency, you choose to use a Generative AI model.
Which of the following is the BEST way to prompt the model so that it produces valid XML output across multiple iterations?
- A Provide several examples of valid XML outputs and ask the model to continue the pattern.
- B Ask the model to generate XML based on a description of the XML schema.
- C Instruct the model to reason about XML generation before producing the output.
- D Chain two prompts: first to generate test ideas, then to convert them into XML.
Community Discussion