Skip to main content

databricks.labs.dqx.llm.utils

get_check_function_definition

def get_check_function_definition(
custom_check_functions: dict[str, Callable] | None = None
) -> list[dict[str, str]]

A utility function to get the definition of all check functions. This function is primarily used to generate a prompt for the LLM to generate check functions.

If provided, the function will use the custom check functions to resolve the check function. If not provided, the function will use only the built-in check functions.

Arguments:

  • custom_check_functions - A dictionary of custom check functions.

Returns:

  • list[dict] - A list of dictionaries, each containing the definition of a check function.

load_yaml_checks_examples

def load_yaml_checks_examples() -> str

Load yaml_checks_examples.yml file from the llm/resources folder.

Returns:

checks examples as yaml string.