AI engineering glossary · Prompt context engineering
What is logprobs?
Logprobs (also called Log probabilities): The logarithms of the probabilities a model assigns to the tokens it generates, and sometimes to the top alternatives at each position. They let you measure confidence, rank choices and build classifiers from a single-token answer.
Logprobs: an example
A yes/no prompt returns logprob -0.05 for 'Yes' (about 95% probability) and -3.0 for 'No', suggesting high confidence.
Related terms
More Prompt context engineering terms
- Long-context prompting
- Lost in the middle
- Maieutic prompting
- Majority label bias
- Map-reduce summarisation
- Markdown formatting in prompts
- Max tokens
- Message roles
Where you learn it
Logprobs is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.