alterlab-ieu/alterlab-academic-skills/alterlab-hypogenic
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Runs automated LLM-driven hypothesis generation and testing on tabular datasets with HypoGeniC, combining literature insights with data-driven testing. Use when systematically exploring hypotheses about patterns in empirical data (for example deception detection or content analysis). For manual hypothesis formulation use alterlab-hypothesis-gen; for open-ended creative ideation use alterlab-scientific-brainstorm. Part of the AlterLab Academic Skills suite.
Install
npx vskill@latest install alterlab-ieu/alterlab-academic-skills/alterlab-hypogenicSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
Hypogenic
Overview
Hypogenic provides automated hypothesis generation and testing using large language models to accelerate scientific discovery. The framework supports three approaches: HypoGeniC (data-driven hypothesis generation), HypoRefine (synergistic literature and data integration), and Union methods (mechanistic combination of literature and data-driven hypotheses).
Quick Start
Get started with Hypogenic in minutes:
Flags verified against thehypogenic0.3.5 console scripts (hypogenic_cmd). The CLIcovers data-driven HypoGeniC generation and inference; HypoRefine and Union runs aredriven by the example scripts (below). Run--helpfor the full option list.
Or use the example scripts (the library ships runnable scripts under examples/; there is no one-line fluent task.generate_hypotheses(...) API — see "Python API Usage" below for the real classes):
When to Use This Skill
Use this skill when working on:
- Generating scientific hypotheses from observational datasets
- Testing multiple competing hypotheses systematically
- Combining literature insights with empirical patterns
- Accelerating research discovery through automated hypothesis ideation
- Domains requiring hypothesis-driven analysis: deception detection, AI-generated content identification, mental health indicators, predictive modeling, or other empirical research
Does NOT Trigger
| Scenario | Use Instead | |
|---|---|---|
| Hand-formulating falsifiable hypotheses and predictions from observations (no LLM pipeline) | alterlab-hypothesis-gen | |
| Open-ended ideation or research-gap brainstorming with no dataset yet | alterlab-scientific-brainstorm | |
| Topic models, dictionaries, or supervised classifiers over text as social-science measurement | alterlab-text-as-data | |
| Testing one pre-specified hypothesis with a conventional statistical test | alterlab-statistical-analysis |
Key Features
Automated Hypothesis Generation
- Generate 10-20+ testable hypotheses from data in minutes
- Iterative refinement based on validation performance
- Support for both API-based (OpenAI, Anthropic) and local LLMs
Literature Integration
- Extract insights from research papers via PDF processing
- Combine theoretical foundations with empirical patterns
- Systematic literature-to-hypothesis pipeline with GROBID
Performance Optimization
- Redis caching reduces API costs for repeated experiments
- Parallel processing for large-scale hypothesis testing
- Adaptive refinement focuses on challenging examples
Flexible Configuration
- Template-based prompt engineering with variable injection
- Custom label extraction for domain-specific tasks
- Modular architecture for easy extension
Reported Results (from arXiv:2410.17309, Literature Meets Data)
- +8.97% over few-shot, +15.75% over literature-only, +3.37% over data-driven-only baselines
- Human accuracy improved +7.44% (deception detection) and +14.19% (AI-generated content detection)
- A redundancy checker prunes near-duplicate hypotheses to keep the final bank diverse
Core Capabilities
1. HypoGeniC: Data-Driven Hypothesis Generation
Generate hypotheses solely from observational data through iterative refinement.
Process:
- Initialize with a small data subset to generate candidate hypotheses
- Iteratively refine hypotheses based on performance
- Replace poorly-performing hypotheses with new ones from challenging examples
Best for: Exploratory research without existing literature, pattern discovery in novel datasets
2. HypoRefine: Literature and Data Integration
Synergistically combine existing literature with empirical data through an agentic framework.
Process:
- Extract insights from relevant research papers (typically 10 papers)
- Generate theory-grounded hypotheses from literature
- Generate data-driven hypotheses from observational patterns
- Refine both hypothesis banks through iterative improvement
Best for: Research with established theoretical foundations, validating or extending existing theories
3. Union Methods
Mechanistically combine literature-only hypotheses with framework outputs.
Variants:
- Literature ∪ HypoGeniC: Combines literature hypotheses with data-driven generation
- Literature ∪ HypoRefine: Combines literature hypotheses with integrated approach
Best for: Comprehensive hypothesis coverage, eliminating redundancy while maintaining diverse perspectives
Installation
Install via pip:
Because of the pinned dependency versions above, keep hypogenic out of your main analysis environment.
Optional dependencies:
- Redis server (port 6832): Enables caching of LLM responses to significantly reduce API costs during iterative hypothesis generation
- s2orc-doc2json: Required for processing literature PDFs in HypoRefine workflows
- GROBID: Required for PDF preprocessing (see Literature Processing section)
Clone example datasets:
Dataset Format
Datasets must follow HuggingFace datasets format with specific naming conventions:
Required files:
<TASK>_train.json: Training data<TASK>_val.json: Validation data<TASK>_test.json: Test data
Required keys in JSON:
text_features_1throughtext_features_n: Lists of strings containing feature valueslabel: List of strings containing ground truth labels
Example (headline click prediction):
Important notes:
- All lists must have the same length
- Label format must match your
extract_label()function output format - Feature keys can be customized to match your domain (e.g.,
review_text,post_content, etc.)
Configuration
Each task requires a config.yaml file specifying:
Required elements:
- Dataset paths (train/val/test)
- Prompt templates for:
- Observations generation
- Batched hypothesis generation
- Hypothesis inference
- Relevance checking
- Adaptive methods (for HypoRefine)
Template capabilities:
- Dataset placeholders for dynamic variable injection (e.g.,
${text_features_1},${num_hypotheses}) - Custom label extraction functions for domain-specific parsing
- Role-based prompt structure (system, user, assistant roles)
Configuration structure:
Refer to references/config_template.yaml for a complete example configuration.
Literature Processing (HypoRefine/Union Methods)
To use literature-based hypothesis generation, you must preprocess PDF papers:
Step 1: Setup GROBID (first time only)
Step 2: Add PDF files Place research papers in literature/YOUR_TASK_NAME/raw/
Step 3: Process PDFs
This converts PDFs to structured format for hypothesis extraction. Automated literature search will be supported in future releases.
CLI Usage
Hypothesis Generation
Key parameters:
- Task configuration file path
- Model selection (API-based or local)
- Generation method (HypoGeniC, HypoRefine, or Union)
- Number of hypotheses to generate
- Output directory for hypothesis banks
Hypothesis Inference
Key parameters:
- Task configuration file path
- Hypothesis bank file path
- Test dataset path
- Inference method (default or multi-hypothesis)
- Output file for results
Python API Usage
The library is not a one-call fluent API — generation runs as an explicit init/update loop over the algorithm classes (DefaultGeneration, DefaultInference, DefaultUpdate, DefaultReplace), and inference runs through the inference_register. Copy and adapt the scripts under examples/; for HypoRefine/Union adapt examples/union_generation.py.
Full import list, the generation/inference loop, inference_type strategy options, and the critical extract_label() parsing contract: see references/python_api.md.
Workflow Examples
Three end-to-end scenarios — data-driven (HypoGeniC, AI-content detection), literature-informed (HypoRefine, deception in hotel reviews), and comprehensive coverage (Union, mental-stress detection) — with dataset prep, generation, and inference commands for each: see references/workflow_examples.md.
Performance Optimization
Caching: Enable Redis caching to reduce API costs and computation time for repeated LLM calls
Parallel Processing: Leverage multiple workers for large-scale hypothesis generation and testing
Adaptive Refinement: Use challenging examples to iteratively improve hypothesis quality
Troubleshooting
Issue: Generated hypotheses are too generic Solution: Refine prompt templates in config.yaml to request more specific, testable hypotheses
Issue: Poor inference performance Solution: Ensure dataset has sufficient training examples, adjust hypothesis generation parameters, or increase number of hypotheses
Issue: Label extraction failures Solution: Implement custom extract_label() function for domain-specific output parsing
Issue: GROBID PDF processing fails Solution: Ensure GROBID service is running (bash ./modules/run_grobid.sh) and PDFs are valid research papers
Creating Custom Tasks
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/domain-specific/alterlab-hypogenic/SKILL.md
Popularity
- Repository stars
- 69
- Repository forks
- 14
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/alterlab-ieu/alterlab-academic-skills/alterlab-hypogenic)