Semantic Models
Define semantic data models in Spice to improve dataset understanding for AI
A semantic model is a structured representation of data that captures the meaning and relationships between elements in a dataset.
In Spice, semantic models transform raw data into meaningful business concepts by defining metadata, descriptions, and relationships at both the dataset and column level. This makes the data more interpretable for both AI language models and human analysis.
Use-Cases
Large Language Models (LLMs)
The semantic model is automatically used by Spice Models as context to produce more accurate and context-aware AI responses.
Defining a Semantic Model
Semantic data models are defined within the spicepod.yaml
file, specifically under the datasets
section. Each dataset supports description
, metadata
, and a columns
field where individual columns are described with metadata and features for utility and clarity.
Example Configuration
Example spicepod.yaml
:
Dataset Metadata
Datasets can be defined with the following metadata:
instructions
: Optional. Instructions to provide to a language model when using this dataset.reference_url_template
: Optional. A URL template for citation links.
For detailed metadata
configuration, see the Spice OSS Dataset Reference
Column Definitions
Each column in the dataset can be defined with the following attributes:
description
: Optional. A description of the column's contents and purpose.embeddings
: Optional. Vector embeddings configuration for this column.
For detailed columns
configuration, see the Spice OSS Dataset Reference
Last updated