Description
Use relevance or 2^relevance - 1 for gain according to exponentialGain.
Search metrics and positional checks depend on rank origins, token positions, relevance definitions, and tie or gap conventions. One term is not a complete query or retrieval evaluation.
Use relevance or 2^relevance - 1 for gain according to exponentialGain.
When to use this tool
Use Information Retrieval Dcg One Rank Term when you need one rank contribution or token-position diagnostic.
How to use the tool and how it works
- Enter relevance, rank, exponentialGain. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read gain, discount, contribution. Use the output convention below.
Use relevance or 2^relevance - 1 for gain according to exponentialGain. Discount by 1/log2(rank + 1), with one-based rank, and return their product.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| relevance | Relevance | Required. Finite number; minimum 0. |
| rank | One-based rank position. | Required. Safe integer; minimum 1. |
| exponentialGain | Exponential Gain | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| gain | Gain | Required. Finite number. |
| discount | Discount | Required. Finite number. |
| contribution | Single contribution under the stated weighting and unit convention. | Required. Finite number. |
{
"input": {
"relevance": 3,
"rank": 3,
"exponentialGain": true
},
"output": {
"gain": 7,
"discount": 0.5,
"contribution": 3.5
}
} Limitations and assumptions
- This is one DCG term, not normalized DCG, an ideal ranking, or a whole-query score.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Evaluate complete queries and result sets under a documented tokenization, relevance, and aggregation policy.
References
Similar or alternative tools
- Search Result Reciprocal Rank Term
For relevant true return 1/rank and 1/(rank × queryCount); otherwise return zero for both.
- Indexing Stopword Position Increment
Retain unflagged tokens with zero-based originalPositions and increments from the prior retained position, beginning from -1.