dataset_info:
features:
- name: description
dtype: string
- name: query
dtype: string
- name: source
dtype: string
- name: schema
dtype: string
- name: id
dtype: int64
- name: query_length
dtype: int64
- name: description_length
dtype: int64
- name: complexity_score
dtype: int64
- name: query_type
dtype: string
- name: entities
sequence: string
splits:
- name: train
num_bytes: 3580759
num_examples: 301
download_size: 33073
dataset_size: 3580759
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
HoundBench Cypher Queries Dataset
Dataset Description
This dataset contains 180 curated Cypher queries specifically designed for BloodHound, the popular Active Directory reconnaissance tool. Each entry pairs a natural language description with its corresponding Cypher query, train and eval your agents for BloodHound query generation :D.
Dataset Summary
- Total Examples: 180 query-description pairs
- Language: English (descriptions), Cypher (queries)
- Domain: Cybersecurity, Active Directory analysis, Graph databases
- Use Cases: Query generation, cybersecurity education, BloodHound automation
Supported Tasks
- Text-to-Code Generation: Generate Cypher queries from natural language descriptions
- Query Understanding: Understand the intent behind cybersecurity queries
- Educational Resource: Learn BloodHound query patterns and techniques
Dataset Structure
Data Instances
Each example contains:
{
"description": "Find all users with an SPN (Kerberoastable users)",
"query": "MATCH (n:User) WHERE n.hasspn=true RETURN n",
"source": "https://hausec.com/2019/09/09/bloodhound-cypher-cheatsheet/"
}
Data Fields
description(string): Natural language description of what the query accomplishesquery(string): The corresponding Cypher query for BloodHound/Neo4jsource(string): Attribution to the original source (URL, author, or publication)
Data Splits
The dataset is provided as a single collection. Users can create custom splits using the provided utilities:
from datasets import load_dataset
from utils.dataset_utils import split_dataset
dataset = load_dataset("joshtmerrill/HoundBench")
train_set, test_set = split_dataset(dataset, train_ratio=0.8)
Additional Information
Dataset Curators
This dataset was curated as part of the HoundBench project, a comprehensive toolkit for evaluating and validating Cypher queries against BloodHound instances.
Queries were curated from open and closed sources.
Licensing Information
This dataset is released under the MIT License. While the dataset itself is freely available, users should respect the original sources and their respective licenses.
Citation Information
If you use this dataset in your research, please cite:
@dataset{houndbench,
title={HoundBench: Benchmarking offensive agents},
author={Josh Merrill},
year={2025},
url={https://huggingface.co/datasets/joshtmerrill/HoundBench},
}
Contributions
We welcome contributions to improve and expand this dataset. Please see our contribution guidelines for more information.
Usage Examples
Loading the Dataset
from datasets import load_dataset
# Load the full dataset
dataset = load_dataset("joshtmerrill/bloodhound-cypher-queries")
# Load with custom split
train_dataset = load_dataset("joshtmerrill/bloodhound-cypher-queries", split="train[:80%]")
test_dataset = load_dataset("joshtmerrill/bloodhound-cypher-queries", split="train[80%:]")
Basic Usage
# Iterate through examples
for example in dataset:
print(f"Description: {example['description']}")
print(f"Query: {example['query']}")
print(f"Source: {example['source']}")
print("---")
Integration with HoundBench
from utils.dataset_utils import load_queries_dataset, split_dataset
# Load using HoundBench utilities
dataset = load_queries_dataset("joshtmerrill/bloodhound-cypher-queries")
# Create train/test split
train_set, test_set = split_dataset(dataset, train_ratio=0.8, random_seed=42)
# Filter by source
hausec_queries = filter_dataset_by_source(dataset, ["hausec.com"])
Query Generation Example
from transformers import pipeline
# Load a text generation model
generator = pipeline("text-generation", model="your-model")
# Generate query from description
description = "Find all Domain Admins with active sessions"
prompt = f"Description: {description}\nQuery:"
result = generator(prompt, max_length=100)
print(result[0]['generated_text'])