Rapidata leaderboard
RapidataLeaderboard #
RapidataLeaderboard(
name: str,
instruction: str,
show_prompt: bool,
show_prompt_asset: bool,
inverse_ranking: bool,
response_budget: int,
min_responses_per_matchup: int,
benchmark_id: str,
id: str,
openapi_service: OpenAPIService,
)
An instance of a Rapidata leaderboard.
Used to interact with a specific leaderboard in the Rapidata system, such as retrieving prompts and evaluating models.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name that will be used to identify the leaderboard on the overview. |
required |
instruction
|
str
|
The instruction that will determine what how the models will be evaluated. |
required |
show_prompt
|
bool
|
Whether to show the prompt to the users. |
required |
id
|
str
|
The ID of the leaderboard. |
required |
openapi_service
|
OpenAPIService
|
The OpenAPIService instance for API interaction. |
required |
Source code in src/rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py
level_of_detail
property
writable
#
Returns the level of detail of the leaderboard.
min_responses_per_matchup
property
writable
#
Returns the minimum number of responses required to be considered for the leaderboard.
show_prompt_asset
property
#
Returns whether the prompt asset is shown to the users.
get_standings #
Returns the standings of the leaderboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tags
|
Optional[list[str]]
|
The matchups with these tags should be used to create the standings. If tags are None, all matchups will be considered. If tags are empty, no matchups will be considered. |
None
|
Returns:
| Type | Description |
|---|---|
'pd.DataFrame'
|
A pandas DataFrame containing the standings of the leaderboard. |
Source code in src/rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py
get_win_loss_matrix #
get_win_loss_matrix(
tags: Optional[list[str]] = None,
use_weighted_scoring: Optional[bool] = None,
) -> DataFrame
Returns the win/loss matrix for all participants in this leaderboard.
The matrix shows pairwise comparison results where each cell [i, j] represents the number of wins participant i has against participant j.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tags
|
Optional[list[str]]
|
Filter matchups by these tags. If None, all matchups are considered. |
None
|
use_weighted_scoring
|
Optional[bool]
|
Whether to use weighted scoring for the matrix calculation. |
None
|
Returns:
| Type | Description |
|---|---|
DataFrame
|
A pandas DataFrame with participants as both index and columns, |
DataFrame
|
containing the pairwise win counts. |
Source code in src/rapidata/rapidata_client/benchmark/leaderboard/rapidata_leaderboard.py
view #
Views the leaderboard.