API reference · Kjarni 0.2.7
Struct RerankResult
Namespace: Kjarni
Assembly: Kjarni.dll
Single rerank result
public readonly struct RerankResult
Properties
Document
The document text.
public string Document { get; }
Property Value
Index
The document's position in the list passed to the reranker.
public int Index { get; }
Property Value
Probability
public float Probability { get; }
Property Value
Score
The cross-encoder's raw logit, matching what PyTorch returns. Roughly
-11 to +11. See
public float Score { get; }
Property Value
Methods
Sigmoid(float)
Logistic squash, for putting a logit on a 0..1 scale.
Calls into the engine rather than reimplementing it. The formula is one line, but it needs a branch: the naive form overflows to NaN for large negative inputs, and five bindings each writing their own is five chances to omit it.
public static float Sigmoid(float x)
Parameters
x float
Returns
Kjarni runs the same engine on every platform: