Library and tools for building datasets related to Home Assistant.
Project description
Home Assistant Datasets
This package is a collection of datasets for evaluating AI Models in the context of Home Assistant. The overall approach is:
- Synthetic Data Generation: Create synthetic datasets that represent a home
- Synthetic Home: Load the data into Home Assistant and exercise different device states (e.g. light on, off)
- Collect Model Outputs: Run the datasets with Home Assistant Conversation agents with different models (e.g. OpenAI, Google, local models) to generate model outputs (e.g. tool calls, responses)
- Evaluate Results: Evaluate the model outsputs with the groundtruth (e.g. is the action correct), or humans can annotate the results (e.g. great, ok, bad)
- Visualize Results: Track improvements over time with different models, prompts, tools, RAG, etc.
graph LR;
A[Synthetic Data Generation]
B[Dataset]
C[Collect Model Outputs]
D[Synthetic Home]
F[Evaluate Results]
G[Visualize Results]
H[OpenAI]
I[Conversation Agent]
J[Local LM]
K[Conversation Agent]
L[Google]
M[Conversation Agent]
A --> B
B --> D
D --> C
C --> F
F --> G
H --> I
J --> K
L --> M
I --> C
K --> C
M --> C
I --> D
K --> D
M --> D
Synthetic Datasets
See the datasets README for details on the available datasets including Home descriptions, Area descriptions, Device descriptions and summaries that can be performed on a home.
The device level datasets are defined using the Synthetic Home format including its device registry of synthetic devices.
Synthetic Data Generation
See the generation README for more details on how synthetic data generation using LLMs works. The data is generated from a small amount of seed example data and a prompt, then is persisted.
The synthetic data generation is run with Jupyter notebooks.
classDiagram
direction LR
Home <|-- Area
Area <|-- Device
Device <|-- EntityStates
class Home{
+String name
+String country_code
+String location
+String type
}
class Area {
+String name
}
class Device {
+String name
+String device_type
+String model
+String mfg
+String sw_version
}
class EntityState {
+String state
}
Collect Model Outputs
You can use the generated synthetic data in Home Assistat and with integrated conversation agents to produce outputs for evaluation.
Model evaluation is currently performed with pytest, Synthetic Home, and any conversation agent (Open AI, Google, custom components, etc)
See [docs/eval.md] for instructions on how run an evaluation and update the leaderboard.
Home Assistant Actions - Offline Evaluation
The most commonly used evaluation is for the Home Assistant conversation agent actions for integrating with the assist pipeline. See the following dataset directories for more information on running an evaluation:
- datasets/assist - Dataset with a set of corner cases meant to challenge models on voice actions, but with a medium size home.
- datasets/assist-mini - A much simpler dataset set of tasks for smaller models using very limited number of entities.
- datasets/intents - A dataset based on the home assistant intents repository unit tests that are used for the NLP model. These have a very large home.
Models are configured in models/.
Home Assistant Automations - Offline Evaluation
We have an experimental dataset for zero show blueprint and automation creation, set up in a similar in style to a Software Engineer Benchmark. Each record contains a README with a description of the problem and expected results and a test eval that loads the blueprints generated by a model and exercises to verify if the solution is correct. See the dataset directory for more information:
- datasets/automations - Dataset for blueprint and automation creation.
Example Evaluation for Area Summaries
There are additional datasets for human evaluation of summarization tasks. These were the initial use case for this repo. It works something like this:
- Configure the Synthetic Home and devices
- Configure the conversation agent and prompt ("summarize this area")
- Ask the conversation agent to summarize:
- Each area of the home
- For each interesting device state in the area (e.g. lights on, lights off)
- Record the results
These can be used for human evaluation to determine the model quality. In this phase, we take the model outputs from a human rater and use them for evaluation.
Human rater (me) scores the result quality:
- 1: Low: Bad, incorrect, misleading, etc.
- 2: Medium: Solid, not incorrect, though perhaps a missed opportunity
- 3: High: Good
See the script/ directory for more details on preparing the data for human eval procedure using Doccano.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file home_assistant_datasets-0.3.0.tar.gz.
File metadata
- Download URL: home_assistant_datasets-0.3.0.tar.gz
- Upload date:
- Size: 16.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7c9f1dcf670cd9616d7d7dbb8647b56139458946227d81126683daed6542dd8
|
|
| MD5 |
f02e66f8120ded75537a42d1c5ef303f
|
|
| BLAKE2b-256 |
5c3e2bee7663e98709979696574b3a15b7e79a91c67266026d8499dee0e09aa9
|
Provenance
The following attestation bundles were made for home_assistant_datasets-0.3.0.tar.gz:
Publisher:
publish.yaml on allenporter/home-assistant-datasets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
home_assistant_datasets-0.3.0.tar.gz -
Subject digest:
d7c9f1dcf670cd9616d7d7dbb8647b56139458946227d81126683daed6542dd8 - Sigstore transparency entry: 775978376
- Sigstore integration time:
-
Permalink:
allenporter/home-assistant-datasets@55b5b4a8ef6ad00098ef25f2c3e27499ed2cebc2 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/allenporter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@55b5b4a8ef6ad00098ef25f2c3e27499ed2cebc2 -
Trigger Event:
release
-
Statement type:
File details
Details for the file home_assistant_datasets-0.3.0-py3-none-any.whl.
File metadata
- Download URL: home_assistant_datasets-0.3.0-py3-none-any.whl
- Upload date:
- Size: 74.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ac9434330642d87dff20374256d976d67aebbee6e5602d5f998e646589b5468
|
|
| MD5 |
d22b1e2b1b4d56b754c23db17e476445
|
|
| BLAKE2b-256 |
69525f9d39d67655a3a28cf9d0cc9bf264909b73f60976c466e97e3c49607f9a
|
Provenance
The following attestation bundles were made for home_assistant_datasets-0.3.0-py3-none-any.whl:
Publisher:
publish.yaml on allenporter/home-assistant-datasets
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
home_assistant_datasets-0.3.0-py3-none-any.whl -
Subject digest:
0ac9434330642d87dff20374256d976d67aebbee6e5602d5f998e646589b5468 - Sigstore transparency entry: 775978377
- Sigstore integration time:
-
Permalink:
allenporter/home-assistant-datasets@55b5b4a8ef6ad00098ef25f2c3e27499ed2cebc2 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/allenporter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@55b5b4a8ef6ad00098ef25f2c3e27499ed2cebc2 -
Trigger Event:
release
-
Statement type: