How can I see what an AI model is 'thinking' when it gives me a weird answer?
You can't read its mind, but you can make it show its work. The technique is called 'chain-of-thought' prompting. Instead of just asking for a final answer, you explicitly tell the model to break down its reasoning step by step. This doesn't literally trace the model's internal neurons, but it forces the system to articulate a logical path, which often reveals where a mistake happened. For example, don't ask: 'If a shirt costs $25 and is 20% off, what's the final price?' You might get a confident but wrong answer. Instead, ask: 'If a shirt costs $25 and is 20% off, what's the final price? Think through each calculation step by step and label each one.' The model will then output something like: 'Step 1: Calculate the discount. 20% of $25 is $5. Step 2: Subtract the discount from the original price. $25 - $5 = $20.' You can now see it didn't mess up the math. But if it had, you'd spot the faulty step immediately. This is incredibly useful for debugging logic problems, math questions, or planning tasks. I've used this to catch models that hallucinate facts in the middle of a long explanation. You can literally see the sentence where it invents a citation. A more advanced version of this is asking the model to 'think out loud' before giving the final answer, a pattern used by some of the newer reasoning models. Just add a line to your prompt: 'Before you answer, write out your internal monologue analyzing the question.' It feels a little silly, but it works. The insight here is that you're not just getting a better answer; you're building a habit of auditing the AI's logic. Don't trust a black box when you can ask for the blueprint.