Dataset
Object-centric interface for Splunk AO datasets. This class provides an intuitive way to work with Splunk AO datasets, encapsulating dataset management operations and providing seamless integration with dataset content management. ExamplesCreate a new dataset locally, then persist
dataset = Dataset( name=“ml-knowledge-evaluation_3”, content=[ {“input”: “What is machine learning?”, “output”: “Machine learning …”}, {“input”: “How does deep learning work?”, “output”: “Deep learning uses …”} ] ).create()Get an existing dataset
dataset = Dataset.get(name=“geography-questions”)List all datasets
datasets = Dataset.list(limit=50)Get dataset content
content = dataset.get_content()Add rows to dataset
dataset.add_rows([ {“input”: “Australia”, “output”: “Oceania”}, {“input”: “Egypt”, “output”: “Africa”}, ])Get dataset versions
versions = dataset.get_versions()Delete dataset
dataset.delete()add_rows
rows(list[dict[str, Any]]): The rows to add to the dataset.
create
delete
extend
prompt(Optional[str]): A description of the assistant’s role.instructions(Optional[str]): Instructions for the assistant.examples(Optional[list[str]]): Examples of user prompts.count(int): The number of synthetic examples to generate.data_types(Optional[list[str]]): The types of data to generate.prompt_settings(Optional[dict[str, Any]]): Settings for the prompt generation.
generate
prompt(Optional[str]): A description of the assistant’s role.instructions(Optional[str]): Instructions for the assistant.examples(Optional[list[str]]): Examples of user prompts.count(int): The number of synthetic examples to generate.data_types(Optional[list[str]]): The types of data to generate.prompt_settings(Optional[dict[str, Any]]): Settings for the prompt generation.
get
id(Optional[str]): The dataset ID.name(Optional[str]): The dataset name.
get_content
get_version_content
index(int): The 1-based version index to retrieve. Must be >= 1.
get_versions
list
limit(Union[Unset, int]): Maximum number of datasets to return.project_id(Optional[str]): Filter datasets used in this project by ID.project_name(Optional[str]): Filter datasets used in this project by name.