Generate forecasting datasets and fine-tune models using the Lightningrod Python SDK. Create seed data from BigQuery public datasets, local files, or web searches; build SFT and GRPO training data; track experiments; and run transform pipelines for forecasting model development.
BigQuery seed sourcing patterns for Lightningrod. Use when sourcing seeds from BigQuery tables.
Production examples for content learning (SFT) training -- survival field guide (TopicTree + WebSearch), medical textbooks (FileSet + QuestionAndLabel). Use when teaching domain knowledge via Q&A pairs and SFT.
Seed generation from user-provided files and custom datasets. Use when converting local files, CSVs, PDFs, or user uploads into Lightningrod seeds.
Decision tree for choosing a training pattern (forward-looking GRPO, content learning SFT, tabular data). Use when starting a new project, choosing between RL and SFT, or selecting an answer type.
Standardised training-experiment tracking. One notebook per experiment under `./userland/<project>/experiments/`, plus a single `experiments.md` index table at the project root. Use whenever a training run's tracked config differs from the previous run.
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
The Lightning Rod SDK provides a simple Python API for generating custom forecasting datasets to train your LLMs. Transform news articles, documents, and other real-world data into high-quality training samples automatically.
Based on our research: Future-as-Label: Scalable Supervision from Real-World Outcomes
Documentation: docs.lightningrod.ai
Install for as a Python library:
pip install lightningrod-ai
Or install the Claude Code plugin for agentic use:
/plugin marketplace add lightning-rod-labs/lightningrod-python-sdk
/plugin install lightningrod-python-sdk
The plugin adds the lightningrod-assistant agent plus skills for forecasting datasets, content-learning datasets, tabular data, BigQuery seeds, custom files, and transform verification.
Sign up at dashboard.lightningrod.ai to get your API key.
lr = LightningRod(api_key="your-api-key")
Or export your API key in the shell before starting Claude Code session for agentic use:
export LIGHTNINGROD_API_KEY="your-api-key
Generate 1000+ forecasting questions easily - from raw sources to labeled dataset, automatically. ⚡
pipeline = QuestionPipeline(...)
dataset = lr.transforms.run(pipeline)
We use this to generate the Future-as-Label training dataset for our research paper.
Training a custom model is as easy as plugging in the generated dataset in the previous step:
train_dataset, test_dataset = prepare_for_training(dataset)
train_config = GRPOTrainingConfig(base_model_id="openai/gpt-oss-120b")
training_job = lr.training.run()
eval_job = lr.evals.run_from_training_job(train_config, training_job, test_dataset)
You can perform inference on your fine-tuned models or use our frontier forecasting models like Foresight-v3.
lr.predict(training_job.model_id, "Will the Fed cut rates by 25hp in the next 3 months?")
Check the API docs for use with OpenAI compatible API.
We have example notebooks to help you get started. If you have trouble using the SDK, please submit an issue on GitHub.
| Example Name | Path | Google Colab Link |
|---|---|---|
| Quick Start | notebooks/00_quickstart.ipynb | Open in Colab |
npx claudepluginhub lightning-rod-labs/lightningrod-python-sdk --plugin lightningrod-python-sdkIntelligent draw.io diagramming plugin with AI-powered diagram generation, multi-platform embedding (GitHub, Confluence, Azure DevOps, Notion, Teams, Harness), conditional formatting, live data binding, and MCP server integration for programmatic diagram creation and management.
Complete creative writing suite with 10 specialized agents covering the full writing process: research gathering, character development, story architecture, world-building, dialogue coaching, editing/review, outlining, content strategy, believability auditing, and prose style/voice analysis. Includes genre-specific guides, templates, and quality checklists.
TypeScript/JavaScript full-stack development with NestJS, React, and React Native
Complete AI coding workflow system. Self-correcting memory + persistent FTS5-indexed research wikis + auto-research loop + multi-LLM council on a single SQLite store. 33 skills, 8 agents, 22 commands, 37 hook scripts across 24 events. Cross-agent via SkillKit.
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.