Instruction: Outline the steps you would take to create a prompt that accurately assesses the sentiment of user reviews, including any pre-processing of data. Describe the criteria you would use to evaluate the effectiveness of the prompt.
Context: This question assesses the candidate's ability to apply Prompt Engineering techniques for sentiment analysis. It evaluates their understanding of natural language processing, data pre-processing, and their approach to validating the effectiveness of prompts in generating desired outcomes.
I would design the prompt to classify sentiment, extract rationale, and keep the output structured. For example:
You are analyzing customer reviews for a new product launch. For each review, classify sentiment as positive, negative, or mixed. Then list the top reasons in 1 to 3 short bullet points. If the review is ambiguous, say what made it uncertain. Return valid JSON with keys: sentiment, confidence, reasons, uncertainty_notes.
This works because it forces the model to separate label, reasoning, and uncertainty instead of just producing a vague summary. The JSON requirement also makes it easier to use downstream in analytics workflows.
What I always try to avoid is giving a process answer that sounds clean in theory but falls apart once the data, users, or production constraints get messy.
A weak answer says "tell me if this review is positive or negative" and ignores mixed sentiment, structured output, and ambiguity handling.