Evaluating answers
Test claims, open sources, probe edge cases and compare two answers before you accept or reject output.
- Run code and test the edge cases the model ignored.
- Open and verify every source instead of trusting citations.
- Compare two answers with the same tests before choosing.
- Reject output you cannot explain or verify.
In plain English
Evaluating an answer means checking whether it is true, not whether it sounds good. For code, run it and add an edge case the happy path would miss, such as an empty input or an error response. For factual claims, open the source yourself rather than trusting the citation, because a hallucination can include a made-up reference. When you have two candidate answers, compare them against the same tests and pick the one you can explain, not the longer or more confident one. Reject output whenever you cannot verify it, when it invents an API or function, or when it changes requirements you did not state.
Step by step
- 1Ask the model for the assumptions and edge cases it considered.
- 2Run the generated code with one input it never mentioned.
- 3Open any cited source and confirm it exists and says what was claimed.
- 4Generate a second answer to the same prompt and compare both.
- 5Write down the one reason you accepted or rejected the output.
BEFORE YOU ACCEPT AN ANSWER
1. Run the code and add one edge case it never mentioned.
2. Open every cited source and confirm it says what was claimed.
3. Get a second answer to the same prompt and compare both.
4. Ask: can I explain this line by line?
REJECT WHEN
- it invents an API, function or flag that does not exist
- it changes a requirement you never stated
- you cannot reproduce or verify the resultCommon mistakes
- Accepting code because it compiles is wrong, since syntax can be valid while the logic is broken.
- Trusting a citation without opening it lets a hallucinated reference slip through.
- Choosing the longer answer as the better one is a bad rule, because extra text can hide errors.
- Keeping output you cannot explain means you now own code you cannot fix when it fails.
Write an edge-case test
Given a function that joins name parts into a full name, describe one test for an empty list and one for a single name.
function fullName(parts) { return parts.join(" ") }What is the strongest way to judge two competing answers?
Make it yours.
Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.
Lock in what you just learned.
Mark this lesson complete to save your place and move one step closer to the certificate.