genie
Creates, updates, deletes, gets or lists a genie resource.
Overview
| Name | genie |
| Type | Resource |
| Id | databricks_workspace.dashboards.genie |
Fields
The following fields are returned by SELECT queries:
- genie_genie_get_eval_result_details
- genie_genie_get_eval_run
- genie_genie_list_eval_results
- genie_genie_list_eval_runs
- get
- list
| Name | Datatype | Description |
|---|---|---|
benchmark_question_id | string | The ID of the benchmark question that was evaluated. |
result_id | string | The unique identifier for the evaluation result. |
space_id | string | The ID of the space the evaluation result belongs to. |
actual_response | array | The actual response generated by Genie. |
assessment | string | Assessment of the evaluation result: good, bad, or needs review (BAD, GOOD, NEEDS_REVIEW) |
assessment_reasons | array | Reasons for the assessment score. |
eval_run_status | string | Current status of the evaluation run. (DONE, EVALUATION_CANCELLED, EVALUATION_FAILED, EVALUATION_TIMEOUT, NOT_STARTED, RUNNING) |
expected_response | array | The expected responses from the benchmark. |
manual_assessment | boolean | Whether this evaluation was manually assessed. |
| Name | Datatype | Description |
|---|---|---|
eval_run_id | string | |
created_timestamp | integer | Timestamp when the evaluation run was created (milliseconds since epoch). |
eval_run_status | string | Current status of the evaluation run. (DONE, EVALUATION_CANCELLED, EVALUATION_FAILED, EVALUATION_TIMEOUT, NOT_STARTED, RUNNING) |
last_updated_timestamp | integer | Timestamp when the evaluation run was last updated (milliseconds since epoch). |
num_correct | integer | Number of questions answered correctly. |
num_done | integer | Number of questions that have been completed. |
num_needs_review | integer | Number of questions that need manual review. |
num_questions | integer | Total number of questions in the evaluation run. |
run_by_user | integer | User ID who initiated the evaluation run. |
| Name | Datatype | Description |
|---|---|---|
eval_results | array | |
next_page_token | string | The token to use for retrieving the next page of results. |
| Name | Datatype | Description |
|---|---|---|
eval_runs | array | |
next_page_token | string | The token to use for retrieving the next page of results. |
| Name | Datatype | Description |
|---|---|---|
space_id | string | |
warehouse_id | string | Warehouse associated with the Genie Space |
description | string | Description of the Genie Space |
parent_path | string | Parent folder path of the Genie Space |
serialized_space | string | The contents of the Genie Space in serialized string form. This field is excluded in List Genie spaces responses. Use the [Get Genie Space](:method:genie/getspace) API to retrieve an example response, which includes the `serialized_space` field. This field provides the structure of the JSON string that represents the space's layout and components. |
title | string | Title of the Genie Space |
| Name | Datatype | Description |
|---|---|---|
next_page_token | string | |
spaces | array | List of Genie spaces |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
genie_genie_get_eval_result_details | select | space_id, eval_run_id, result_id, deployment_name | Get details for evaluation results. | |
genie_genie_get_eval_run | select | space_id, eval_run_id, deployment_name | Get evaluation run details. | |
genie_genie_list_eval_results | select | space_id, eval_run_id, deployment_name | page_size, page_token | List evaluation results for a specific evaluation run. |
genie_genie_list_eval_runs | select | space_id, deployment_name | page_size, page_token | Lists all evaluation runs in a space. |
get | select | space_id, deployment_name | include_serialized_space | Get details of a Genie Space. |
list | select | deployment_name | page_size, page_token | Get list of Genie Spaces. |
genie_genie_create_eval_run | insert | space_id, deployment_name | Create and run evaluations for multiple benchmark questions in a Genie space. | |
create | insert | deployment_name, warehouse_id, serialized_space | Creates a Genie space from a serialized payload. | |
update | update | space_id, deployment_name | Updates a Genie space with a serialized payload. | |
delete | delete | space_id, deployment_name | Move a Genie Space to the trash. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
eval_run_id | string | The unique identifier for the evaluation run. |
result_id | string | The unique identifier for the evaluation result. |
space_id | string | The ID associated with the Genie space to be sent to the trash. |
include_serialized_space | boolean | Whether to include the serialized space export in the response. Requires at least CAN EDIT permission on the space. |
page_size | integer | Maximum number of spaces to return per page |
page_token | string | Pagination token for getting the next page of results |
SELECT examples
- genie_genie_get_eval_result_details
- genie_genie_get_eval_run
- genie_genie_list_eval_results
- genie_genie_list_eval_runs
- get
- list
Get details for evaluation results.
SELECT
benchmark_question_id,
result_id,
space_id,
actual_response,
assessment,
assessment_reasons,
eval_run_status,
expected_response,
manual_assessment
FROM databricks_workspace.dashboards.genie
WHERE space_id = '{{ space_id }}' -- required
AND eval_run_id = '{{ eval_run_id }}' -- required
AND result_id = '{{ result_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
Get evaluation run details.
SELECT
eval_run_id,
created_timestamp,
eval_run_status,
last_updated_timestamp,
num_correct,
num_done,
num_needs_review,
num_questions,
run_by_user
FROM databricks_workspace.dashboards.genie
WHERE space_id = '{{ space_id }}' -- required
AND eval_run_id = '{{ eval_run_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;
List evaluation results for a specific evaluation run.
SELECT
eval_results,
next_page_token
FROM databricks_workspace.dashboards.genie
WHERE space_id = '{{ space_id }}' -- required
AND eval_run_id = '{{ eval_run_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
Lists all evaluation runs in a space.
SELECT
eval_runs,
next_page_token
FROM databricks_workspace.dashboards.genie
WHERE space_id = '{{ space_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
Get details of a Genie Space.
SELECT
space_id,
warehouse_id,
description,
parent_path,
serialized_space,
title
FROM databricks_workspace.dashboards.genie
WHERE space_id = '{{ space_id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
AND include_serialized_space = '{{ include_serialized_space }}'
;
Get list of Genie Spaces.
SELECT
next_page_token,
spaces
FROM databricks_workspace.dashboards.genie
WHERE deployment_name = '{{ deployment_name }}' -- required
AND page_size = '{{ page_size }}'
AND page_token = '{{ page_token }}'
;
INSERT examples
- genie_genie_create_eval_run
- create
- Manifest
Create and run evaluations for multiple benchmark questions in a Genie space.
INSERT INTO databricks_workspace.dashboards.genie (
benchmark_question_ids,
space_id,
deployment_name
)
SELECT
'{{ benchmark_question_ids }}',
'{{ space_id }}',
'{{ deployment_name }}'
RETURNING
eval_run_id,
created_timestamp,
eval_run_status,
last_updated_timestamp,
num_correct,
num_done,
num_needs_review,
num_questions,
run_by_user
;
Creates a Genie space from a serialized payload.
INSERT INTO databricks_workspace.dashboards.genie (
warehouse_id,
serialized_space,
description,
parent_path,
title,
deployment_name
)
SELECT
'{{ warehouse_id }}' /* required */,
'{{ serialized_space }}' /* required */,
'{{ description }}',
'{{ parent_path }}',
'{{ title }}',
'{{ deployment_name }}'
RETURNING
space_id,
warehouse_id,
description,
parent_path,
serialized_space,
title
;
# Description fields are for documentation purposes
- name: genie
props:
- name: space_id
value: "{{ space_id }}"
description: Required parameter for the genie resource.
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the genie resource.
- name: benchmark_question_ids
value:
- "{{ benchmark_question_ids }}"
description: |
List of benchmark question IDs to evaluate. These questions must exist in the specified Genie space. If none are specified, then all benchmark questions are evaluated.
- name: warehouse_id
value: "{{ warehouse_id }}"
description: |
Warehouse to associate with the new space
- name: serialized_space
value: "{{ serialized_space }}"
description: |
The contents of the Genie Space in serialized string form. Use the [Get Genie Space](:method:genie/getspace) API to retrieve an example response, which includes the `serialized_space` field. This field provides the structure of the JSON string that represents the space's layout and components.
- name: description
value: "{{ description }}"
description: |
Optional description
- name: parent_path
value: "{{ parent_path }}"
description: |
Parent folder path where the space will be registered
- name: title
value: "{{ title }}"
description: |
Optional title override
UPDATE examples
- update
Updates a Genie space with a serialized payload.
UPDATE databricks_workspace.dashboards.genie
SET
description = '{{ description }}',
serialized_space = '{{ serialized_space }}',
title = '{{ title }}',
warehouse_id = '{{ warehouse_id }}'
WHERE
space_id = '{{ space_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
RETURNING
space_id,
warehouse_id,
description,
parent_path,
serialized_space,
title;
DELETE examples
- delete
Move a Genie Space to the trash.
DELETE FROM databricks_workspace.dashboards.genie
WHERE space_id = '{{ space_id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;