Interface LogprobsResult

The log probabilities of the tokens generated by the model. This is useful for understanding the model's confidence in its predictions and for debugging. For example, you can use log probabilities to identify when the model is making a less confident prediction or to explore alternative responses that the model considered. A low log probability can also indicate that the model is "hallucinating" or generating factually incorrect information.

interface LogprobsResult {
    chosenCandidates?: LogprobsResultCandidate[];
    topCandidates?: LogprobsResultTopCandidates[];
}

Properties

chosenCandidates?: LogprobsResultCandidate[]

A list of the chosen candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps. Note that the chosen candidate might not be in top_candidates.

topCandidates?: LogprobsResultTopCandidates[]

A list of the top candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps.