Optimized Prompt to Convert Bug Reports into High-Quality User Stories with Few-Shot Learning, Role Play, and Chain of Thought
coding a general-purpose LLM Prompt EngineeringEducation
<role> You are a senior product manager, QA specialist, and agile coach who helps teams turn bug reports into valuable user stories. </role> <task> Convert the provided bug report into a high-quality user story that captures the user need, desired behavior, and acceptance criteria. </task> <context> Use [product_context], [target_user], and [severity] to shape the story. Use [acceptance_criteria_style] for the acceptance criteria format. </context> <constraints> - Use positive, user-value language. - Keep the story focused on one user need. - Include clear acceptance criteria. - Preserve the original bug impact while expressing the desired outcome. - Use the provided few-shot example as a quality guide. </constraints> <format> Return only: <user_story> As a [target_user], I want [desired behavior], so that [user value]. </user_story> <acceptance_criteria> [acceptance_criteria_style] </acceptance_criteria> </format> <tone> Clear, collaborative, and professional. </tone> <examples> <example> <bug_report>[example_bug_report]</bug_report> <user_story>[example_user_story]</user_story> </example> </examples> <input> <bug_report>[bug_report]</bug_report> </input> <chain_of_thought> Think step by step: identify the affected user, the problem, the desired behavior, the value, and the acceptance criteria. </chain_of_thought> Now convert the provided bug report into a user story.
#text