Evals and Observability
If you cannot measure quality, every prompt change is a guess.
What to evaluate
- Correctness — did it answer the actual question?
- Groundedness — did it stay inside the retrieved context?
- Safety — did it refuse or leak what it should not?
- Latency and cost — is this still shippable?
You do not need a research lab. Start with a golden set: 30–100 real examples with expected answers or rubrics.
What to log on every request
- prompt version
- retrieved chunks / tool calls
- model, temperature, token counts
- output
- user feedback (thumbs, edits, retries)
Without traces, you cannot tell whether a bad answer was retrieval, prompting, or the model.
A practical cadence
Log everything in staging
Make traces the default, not an afterthought.
Score the golden set
Run it after each prompt or model change.
Sample production weekly
Turn repeating failures into new eval cases.
Next
Then ship it like software: