Q123 [Scenario]: A developer wants Copilot Chat to parse a messy text file into a JSON array. Asking 'Convert this to JSON' returns inconsistent schemas. How can Few-Shot prompting fix this?
The developer should supply 1 or 2 concrete examples inside the prompt showing exact input text samples alongside the desired target JSON structure before providing the full text file.
Key Takeaways
Few-Shot prompting uses concrete input/output pairs to enforce output formatting.
Drastically reduces structural formatting errors.
Knowledge Check
What prompting technique resolves inconsistent JSON formatting by providing sample input/output pairs?