🔥 3-day streak
GitHub Copilot151 / 190
Question 151 of 190
A developer is using Copilot Chat to generate validation functions. They want every generated function to return a structured result object like { valid: boolean, errors: string[] } rather than throwing exceptions, which is the pattern Copilot keeps defaulting to. They decide to use few-shot prompting. Which addition to the prompt is MOST likely to reliably steer Copilot away from the throwing pattern toward the desired return-object style?
Reviewed for accuracy · Report an issueNext question