bmel:softmax¶
Category: LLM & AI Observability · Returns: bmel:array<number>
bmel:softmax(logits: bmel:array<number>)
Description¶
Applies the softmax function to an array of numeric logits, returning a probability distribution where all values are in (0, 1) and sum to exactly 1.0. Formula: softmax(x_i) = exp(x_i) / sum(exp(x_j)). Used in Transformer attention scoring and for converting raw model logits into interpretable confidence scores.
Arguments¶
| Parameter | Type | Required | Description |
|---|---|---|---|
logits | bmel:array<number> | ✅ | Array of raw logit values (unnormalized log-probabilities) to convert into a probability distribution. |
Example¶
bmel:softmax({model:Response Payload}.$.logits)