# Genie Get Eval Result Details

Launch stage: Beta

`GET /api/2.0/genie/spaces/{space_id}/eval-runs/{eval_run_id}/results/{result_id}`

Get details for evaluation results.

API scopes: genie

## Path parameters

- `space_id` (string, optional)
  The ID associated with the Genie space where the evaluation run is located.
  Example: `e1ef34712a29169db030324fd0e1df5f`
- `eval_run_id` (string, optional)
  The unique identifier for the evaluation run.
  Example: `e1ef34712a29169db030324fd0e1df5f`
- `result_id` (string, optional)
  The unique identifier for the evaluation result.
  Example: `e1ef34712a29169db030324fd0e1df5f`

## Returns

- `result_id` (string, optional)
  The unique identifier for the evaluation result.
- `space_id` (string, optional)
  The ID of the space the evaluation result belongs to.
- `benchmark_question_id` (string, optional)
  The ID of the benchmark question that was evaluated.
- `eval_run_status` (string, optional)
  Current status of the evaluation run.
  Possible values: `EVALUATION_STATUS_TYPE_UNSPECIFIED`, `RUNNING`, `DONE`, `NOT_STARTED`, `EVALUATION_FAILED`, `EVALUATION_CANCELLED`, `EVALUATION_TIMEOUT`
- `assessment` (string, optional)
  Assessment of the evaluation result: good, bad, or needs review
  Possible values: `GENIE_EVAL_ASSESSMENT_UNSPECIFIED`, `GOOD`, `BAD`, `NEEDS_REVIEW`
- `manual_assessment` (boolean, optional)
  Whether this evaluation was manually assessed.
- `assessment_reasons` (array of string, optional)
  Reasons for the assessment score.
  
   Assessment reasons describe why a Genie response was scored as BAD.
  
   Deterministic values (compared against the ground truth result):
   - EMPTY_RESULT: Genie's generated SQL results were empty for this benchmark question.
   - RESULT_MISSING_ROWS: Genie's generated SQL response is missing rows from the provided ground truth SQL.
   - RESULT_EXTRA_ROWS: Genie's generated SQL response has more rows than the provided ground truth SQL.
   - RESULT_MISSING_COLUMNS: Genie's generated SQL response is missing columns from the provided ground truth SQL.
   - RESULT_EXTRA_COLUMNS: Genie's generated SQL response has more columns than the provided ground truth SQL.
   - SINGLE_CELL_DIFFERENCE: Single value result was produced but differs from ground truth result.
   - EMPTY_GOOD_SQL: The benchmark SQL returned an empty result.
   - COLUMN_TYPE_DIFFERENCE: The values between the results match but the column type is different.
  
   LLM judge ratings explain the factors driving BAD results:
   - LLM_JUDGE_MISSING_OR_INCORRECT_FILTER: Genie's generated SQL is missing a WHERE clause condition or has incorrect filter logic that excludes/includes wrong data.
   - LLM_JUDGE_INCOMPLETE_OR_PARTIAL_OUTPUT: Genie's generated SQL returns only some of the requested data or columns, missing parts of what the ground truth SQL returns.
   - LLM_JUDGE_MISINTERPRETATION_OF_USER_REQUEST: Genie's generated SQL fundamentally misunderstands what the user is asking for, addressing the wrong question or goal.
   - LLM_JUDGE_INSTRUCTION_COMPLIANCE_OR_MISSING_BUSINESS_LOGIC: Genie's generated SQL fails to apply specified instructions or business logic that should be followed.
   - LLM_JUDGE_INCORRECT_METRIC_CALCULATION: Genie's generated SQL uses incorrect logic or makes wrong assumptions when calculating metrics.
   - LLM_JUDGE_INCORRECT_TABLE_OR_FIELD_USAGE: Genie's generated SQL references wrong tables, columns, or uses fields that don't match the ground truth SQL's intent.
   - LLM_JUDGE_INCORRECT_FUNCTION_USAGE: Genie's generated SQL uses SQL functions incorrectly or inappropriately (wrong parameters, wrong function for the task, etc.).
   - LLM_JUDGE_MISSING_OR_INCORRECT_JOIN: Genie's generated SQL is missing necessary joins between tables or has incorrect join conditions/types that produce wrong results.
   - LLM_JUDGE_MISSING_OR_INCORRECT_AGGREGATION: Genie's generated SQL is missing GROUP BY clauses or has incorrect grouping that doesn't match the requested aggregation level.
   - LLM_JUDGE_FORMATTING_ERROR: Genie's generated SQL output has incorrect formatting, ordering (ORDER BY), or presentation issues that don't match expectations.
   - LLM_JUDGE_OTHER: LLM judge identified an error that doesn't fall into other categories.
  
   Deprecated LLM judge values (kept for backward compatibility, do not use):
   - LLM_JUDGE_MISSING_JOIN (deprecated)
   - LLM_JUDGE_WRONG_FILTER (deprecated)
   - LLM_JUDGE_WRONG_AGGREGATION (deprecated)
   - LLM_JUDGE_WRONG_COLUMNS (deprecated)
   - LLM_JUDGE_SYNTAX_ERROR (deprecated)
   - LLM_JUDGE_SEMANTIC_ERROR (deprecated)
  Possible values: `SCORE_REASON_UNSPECIFIED`, `EMPTY_RESULT`, `RESULT_MISSING_ROWS`, `RESULT_EXTRA_ROWS`, `RESULT_MISSING_COLUMNS`, `RESULT_EXTRA_COLUMNS`, `SINGLE_CELL_DIFFERENCE`, `EMPTY_GOOD_SQL`, `COLUMN_TYPE_DIFFERENCE`, `LLM_JUDGE_MISSING_JOIN`, `LLM_JUDGE_WRONG_FILTER`, `LLM_JUDGE_WRONG_AGGREGATION`, `LLM_JUDGE_WRONG_COLUMNS`, `LLM_JUDGE_SYNTAX_ERROR`, `LLM_JUDGE_SEMANTIC_ERROR`, `LLM_JUDGE_OTHER`, `LLM_JUDGE_MISSING_OR_INCORRECT_FILTER`, `LLM_JUDGE_INCOMPLETE_OR_PARTIAL_OUTPUT`, `LLM_JUDGE_MISINTERPRETATION_OF_USER_REQUEST`, `LLM_JUDGE_INSTRUCTION_COMPLIANCE_OR_MISSING_BUSINESS_LOGIC`, `LLM_JUDGE_INCORRECT_METRIC_CALCULATION`, `LLM_JUDGE_INCORRECT_TABLE_OR_FIELD_USAGE`, `LLM_JUDGE_INCORRECT_FUNCTION_USAGE`, `LLM_JUDGE_MISSING_OR_INCORRECT_JOIN`, `LLM_JUDGE_MISSING_OR_INCORRECT_AGGREGATION`, `LLM_JUDGE_FORMATTING_ERROR`
- `actual_response` (array of object, optional)
  The actual response generated by Genie.
  - `response` (string, optional)
    The response content (either text or SQL query).
  - `sql_execution_result` (object, optional)
    SQL Statement Execution response.
    - `statement_id` (string, optional)
      The statement ID is returned upon successfully submitting a SQL statement, and is a required
       reference for all subsequent calls.
    - `status` (object, optional)
      - `state` (string, optional)
        Statement execution state:
         - `PENDING`: waiting for warehouse
         - `RUNNING`: running
         - `SUCCEEDED`: execution was successful, result data available for fetch
         - `FAILED`: execution failed; reason for failure described in accompanying error message
         - `CANCELED`: user canceled; can come from explicit cancel call, or timeout with
         `on_wait_timeout=CANCEL`
         - `CLOSED`: execution successful, and statement closed; result no longer available for fetch
        Possible values: `STATE_UNSPECIFIED`, `PENDING`, `RUNNING`, `SUCCEEDED`, `FAILED`, `CANCELED`, `CLOSED`
      - `error` (object, optional)
      - `sql_state` (string, optional)
        SQLSTATE error code returned when the statement execution fails.
         Only populated when the statement status is `FAILED`.
    - `manifest` (object, optional)
      - `format` (string, optional)
        Possible values: `FORMAT_UNSPECIFIED`, `JSON_ARRAY`, `ARROW_STREAM`, `CSV`
      - `schema` (object, optional)
      - `total_chunk_count` (int32, optional)
        The total number of chunks that the result set has been divided into.
      - `chunks` (array of object, optional)
        Array of result set chunk metadata.
      - `total_row_count` (int64, optional)
        The total number of rows in the result set.
      - `total_byte_count` (int64, optional)
        The total number of bytes in the result set. This field is not available when using `INLINE`
         disposition.
      - `truncated` (boolean, optional)
        Indicates whether the result is truncated due to `row_limit` or `byte_limit`.
    - `result` (object, optional)
      - `external_links` (array of object, optional)
      - `data_array` (array of object, optional)
        The `JSON_ARRAY` format is an array of arrays of values, where each non-null value is
         formatted as a string. Null values are encoded as JSON `null`.
      - `chunk_index` (int32, optional)
        The position within the sequence of result set chunks.
      - `row_offset` (int64, optional)
        The starting row offset within the result set.
      - `row_count` (int64, optional)
        The number of rows within the result chunk.
      - `byte_count` (int64, optional)
        The number of bytes in the result chunk. This field is not available when using `INLINE`
         disposition.
      - `next_chunk_index` (int32, optional)
        When fetching, provides the `chunk_index` for the _next_ chunk. If absent, indicates there are no
         more chunks. The next chunk can be fetched with a
         :method:statementexecution/getstatementresultchunkn request.
      - `next_chunk_internal_link` (string, optional)
        When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no more
         chunks. This link is an absolute `path` to be joined with your `$DATABRICKS_HOST`, and should be
         treated as an opaque link. This is an alternative to using `next_chunk_index`.
  - `response_type` (string, optional)
    Type of response
    Possible values: `GENIE_EVAL_RESPONSE_TYPE_UNSPECIFIED`, `TEXT`, `SQL`
- `expected_response` (array of object, optional)
  The expected responses from the benchmark.
  - `response` (string, optional)
    The response content (either text or SQL query).
  - `sql_execution_result` (object, optional)
    SQL Statement Execution response.
    - `statement_id` (string, optional)
      The statement ID is returned upon successfully submitting a SQL statement, and is a required
       reference for all subsequent calls.
    - `status` (object, optional)
      - `state` (string, optional)
        Statement execution state:
         - `PENDING`: waiting for warehouse
         - `RUNNING`: running
         - `SUCCEEDED`: execution was successful, result data available for fetch
         - `FAILED`: execution failed; reason for failure described in accompanying error message
         - `CANCELED`: user canceled; can come from explicit cancel call, or timeout with
         `on_wait_timeout=CANCEL`
         - `CLOSED`: execution successful, and statement closed; result no longer available for fetch
        Possible values: `STATE_UNSPECIFIED`, `PENDING`, `RUNNING`, `SUCCEEDED`, `FAILED`, `CANCELED`, `CLOSED`
      - `error` (object, optional)
      - `sql_state` (string, optional)
        SQLSTATE error code returned when the statement execution fails.
         Only populated when the statement status is `FAILED`.
    - `manifest` (object, optional)
      - `format` (string, optional)
        Possible values: `FORMAT_UNSPECIFIED`, `JSON_ARRAY`, `ARROW_STREAM`, `CSV`
      - `schema` (object, optional)
      - `total_chunk_count` (int32, optional)
        The total number of chunks that the result set has been divided into.
      - `chunks` (array of object, optional)
        Array of result set chunk metadata.
      - `total_row_count` (int64, optional)
        The total number of rows in the result set.
      - `total_byte_count` (int64, optional)
        The total number of bytes in the result set. This field is not available when using `INLINE`
         disposition.
      - `truncated` (boolean, optional)
        Indicates whether the result is truncated due to `row_limit` or `byte_limit`.
    - `result` (object, optional)
      - `external_links` (array of object, optional)
      - `data_array` (array of object, optional)
        The `JSON_ARRAY` format is an array of arrays of values, where each non-null value is
         formatted as a string. Null values are encoded as JSON `null`.
      - `chunk_index` (int32, optional)
        The position within the sequence of result set chunks.
      - `row_offset` (int64, optional)
        The starting row offset within the result set.
      - `row_count` (int64, optional)
        The number of rows within the result chunk.
      - `byte_count` (int64, optional)
        The number of bytes in the result chunk. This field is not available when using `INLINE`
         disposition.
      - `next_chunk_index` (int32, optional)
        When fetching, provides the `chunk_index` for the _next_ chunk. If absent, indicates there are no
         more chunks. The next chunk can be fetched with a
         :method:statementexecution/getstatementresultchunkn request.
      - `next_chunk_internal_link` (string, optional)
        When fetching, provides a link to fetch the _next_ chunk. If absent, indicates there are no more
         chunks. This link is an absolute `path` to be joined with your `$DATABRICKS_HOST`, and should be
         treated as an opaque link. This is an alternative to using `next_chunk_index`.
  - `response_type` (string, optional)
    Type of response
    Possible values: `GENIE_EVAL_RESPONSE_TYPE_UNSPECIFIED`, `TEXT`, `SQL`

## Response

```json
{
  "result_id": "string",
  "space_id": "string",
  "benchmark_question_id": "string",
  "eval_run_status": "string",
  "assessment": "string",
  "manual_assessment": true,
  "assessment_reasons": [
    "string"
  ],
  "actual_response": [
    {
      "response": "string",
      "sql_execution_result": {},
      "response_type": "string"
    }
  ],
  "expected_response": [
    {
      "response": "string",
      "sql_execution_result": {},
      "response_type": "string"
    }
  ]
}
```

