Automated LLM-driven hypothesis generation and testing for tabular datasets; use when you need systematic exploration of empirical patterns (e.g., fraud detection, content analysis) and want to combine literature insights with data-driven hypothesis evaluation.
62
74%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./scientific-skills/Protocol Design/hypogenic/SKILL.md${text_features_1}, ${num_hypotheses}) for generation and inference.hypogenic (install via PyPI; version depends on your environment)redis (server; used for caching repeated LLM calls)GROBID (service; used for PDF preprocessing)s2orc-doc2json (PDF-to-structured conversion used in literature pipelines)Install:
uv pip install hypogenicThe following example is a minimal end-to-end workflow (dataset + config + CLI + Python). Adjust paths and prompts for your task.
Create three files:
./data/my_task_train.json./data/my_task_val.json./data/my_task_test.jsonExample schema (feature keys can be renamed, but must match your config placeholders):
{
"text_features_1": ["Text A1", "Text A2"],
"text_features_2": ["Text B1", "Text B2"],
"label": ["Class1", "Class2"]
}./data/my_task/config.yamltask_name: my_task
train_data_path: ./data/my_task_train.json
val_data_path: ./data/my_task_val.json
test_data_path: ./data/my_task_test.json
prompt_templates:
observations: |
Feature 1: ${text_features_1}
Feature 2: ${text_features_2}
Label: ${label}
batched_generation:
system: |
You are a scientific assistant. Propose testable, falsifiable hypotheses that map features to labels.
user: |
Given examples and labels, generate ${num_hypotheses} distinct hypotheses.
Return a JSON list of hypotheses, each with a short name and a testable statement.
inference:
system: |
You are a careful classifier. Use the provided hypothesis to predict the label.
user: |
Hypothesis: ${hypothesis}
Feature 1: ${text_features_1}
Feature 2: ${text_features_2}
Output the final answer as: "final answer: <LABEL>"# Generate hypotheses (HypoGeniC)
hypogenic_generation \
--config ./data/my_task/config.yaml \
--method hypogenic \
--num_hypotheses 20
# Evaluate generated hypotheses
hypogenic_inference \
--config ./data/my_task/config.yaml \
--hypotheses ./output/hypotheses.jsonfrom hypogenic import BaseTask
import re
def extract_label(llm_output: str) -> str:
m = re.search(r"final answer:\s*(.*)", llm_output, re.IGNORECASE)
return m.group(1).strip() if m else llm_output.strip()
task = BaseTask(
config_path="./data/my_task/config.yaml",
extract_label=extract_label,
)
task.generate_hypotheses(
method="hypogenic",
num_hypotheses=20,
output_path="./output/hypotheses.json",
)
results = task.inference(
hypothesis_bank="./output/hypotheses.json",
test_data="./data/my_task_test.json",
)
print(results)HypoGeniC (data-driven)
HypoRefine (literature + data)
Union
Literature ∪ HypoGeniCLiterature ∪ HypoRefine${text_features_1}, ${text_features_2}, … (from dataset JSON)${label} (ground truth label, typically used in observation templates)${num_hypotheses} (generation-time control)${hypothesis} (inference-time hypothesis text)extract_label):
label values.final answer: ...; customize for your output format.63c61d3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.