> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pandaprobe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Session Score Comparison

> Leaderboard: latest score per session for a metric, sorted by value.

Shows each session's most recent score for the requested metric,
ranked by value. Use ``sort_order=asc`` to surface the worst-performing
sessions first (e.g. "Bottom 10 by agent_reliability").

Auth: ``Bearer`` + ``X-Project-ID`` | ``X-API-Key`` + ``X-Project-Name``



## OpenAPI

````yaml /openapi.json get /evaluations/analytics/session-scores/comparison
openapi: 3.1.0
info:
  title: PandaProbe API
  description: >-
    Open-source agent engineering platform — trace LLM calls, evaluate agent
    performance, and monitor AI pipelines.
  version: 0.1.0
  contact:
    name: PandaProbe
    url: https://www.pandaprobe.com
    email: support@pandaprobe.com
servers:
  - url: https://api.pandaprobe.com
    description: Production
security: []
tags:
  - name: health
    description: Service health and readiness probes.
  - name: user
    description: Authenticated user profile.
  - name: traces
    description: Trace ingestion, querying, updating, and analytics.
  - name: sessions
    description: Session-based trace aggregation and analytics.
  - name: evaluations
    description: Evaluation runs, scores, analytics, and monitoring.
  - name: organizations
    description: Organization management and membership.
  - name: projects
    description: Project CRUD within organizations.
  - name: api-keys
    description: API key lifecycle management.
paths:
  /evaluations/analytics/session-scores/comparison:
    get:
      tags:
        - evaluations
      summary: Get Session Score Comparison
      description: |-
        Leaderboard: latest score per session for a metric, sorted by value.

        Shows each session's most recent score for the requested metric,
        ranked by value. Use ``sort_order=asc`` to surface the worst-performing
        sessions first (e.g. "Bottom 10 by agent_reliability").

        Auth: ``Bearer`` + ``X-Project-ID`` | ``X-API-Key`` + ``X-Project-Name``
      operationId: >-
        get_session_score_comparison_evaluations_analytics_session_scores_comparison_get
      parameters:
        - name: metric_name
          in: query
          required: true
          schema:
            type: string
            description: Metric name to rank sessions by.
            title: Metric Name
          description: Metric name to rank sessions by.
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            description: >-
              Sort order: 'asc' (worst first, good for finding problems) or
              'desc' (best first).
            default: asc
            title: Sort Order
          description: >-
            Sort order: 'asc' (worst first, good for finding problems) or 'desc'
            (best first).
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Page size.
            default: 20
            title: Limit
          description: Page size.
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of items to skip.
            default: 0
            title: Offset
          description: Number of items to skip.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_SessionComparisonItem_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
        - ApiKey: []
        - ProjectID: []
        - ProjectName: []
components:
  schemas:
    PaginatedResponse_SessionComparisonItem_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/SessionComparisonItem'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
        - items
        - total
        - limit
        - offset
      title: PaginatedResponse[SessionComparisonItem]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SessionComparisonItem:
      properties:
        session_id:
          type: string
          title: Session Id
        score:
          anyOf:
            - type: number
            - type: 'null'
          title: Score
        evaluated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Evaluated At
        eval_run_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Eval Run Id
      type: object
      required:
        - session_id
        - score
        - evaluated_at
        - eval_run_id
      title: SessionComparisonItem
      description: >-
        A session's latest score for a metric, used in leaderboard/ranking
        views.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
    ProjectID:
      type: apiKey
      in: header
      name: X-Project-ID
    ProjectName:
      type: apiKey
      in: header
      name: X-Project-Name

````