Skip to main content

genie

Creates, updates, deletes, gets or lists a genie resource.

Overview

Namegenie
TypeResource
Iddatabricks_workspace.dashboards.genie

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
benchmark_question_idstringThe ID of the benchmark question that was evaluated.
result_idstringThe unique identifier for the evaluation result.
space_idstringThe ID of the space the evaluation result belongs to.
actual_responsearrayThe actual response generated by Genie.
assessmentstringAssessment of the evaluation result: good, bad, or needs review (BAD, GOOD, NEEDS_REVIEW)
assessment_reasonsarrayReasons for the assessment score.
eval_run_statusstringCurrent status of the evaluation run. (DONE, EVALUATION_CANCELLED, EVALUATION_FAILED, EVALUATION_TIMEOUT, NOT_STARTED, RUNNING)
expected_responsearrayThe expected responses from the benchmark.
manual_assessmentbooleanWhether this evaluation was manually assessed.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
genie_genie_get_eval_result_detailsselectspace_id, eval_run_id, result_id, deployment_nameGet details for evaluation results.
genie_genie_get_eval_runselectspace_id, eval_run_id, deployment_nameGet evaluation run details.
genie_genie_list_eval_resultsselectspace_id, eval_run_id, deployment_namepage_size, page_tokenList evaluation results for a specific evaluation run.
genie_genie_list_eval_runsselectspace_id, deployment_namepage_size, page_tokenLists all evaluation runs in a space.
getselectspace_id, deployment_nameinclude_serialized_spaceGet details of a Genie Space.
listselectdeployment_namepage_size, page_tokenGet list of Genie Spaces.
genie_genie_create_eval_runinsertspace_id, deployment_nameCreate and run evaluations for multiple benchmark questions in a Genie space.
createinsertdeployment_name, warehouse_id, serialized_spaceCreates a Genie space from a serialized payload.
updateupdatespace_id, deployment_nameUpdates a Genie space with a serialized payload.
deletedeletespace_id, deployment_nameMove 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.

NameDatatypeDescription
deployment_namestringThe Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc)
eval_run_idstringThe unique identifier for the evaluation run.
result_idstringThe unique identifier for the evaluation result.
space_idstringThe ID associated with the Genie space to be sent to the trash.
include_serialized_spacebooleanWhether to include the serialized space export in the response. Requires at least CAN EDIT permission on the space.
page_sizeintegerMaximum number of spaces to return per page
page_tokenstringPagination token for getting the next page of results

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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
;