Quick Start
Get started with simple but powerful Lightningrod SDK
Your First API Call
2
3
Generate Your First Dataset
from lightningrod import BinaryAnswerType, QuestionPipeline, NewsSeedGenerator, ForwardLookingQuestionGenerator, WebSearchLabeler
binary_answer = BinaryAnswerType()
pipeline = QuestionPipeline(
seed_generator=NewsSeedGenerator(
start_date=datetime.now() - timedelta(days=90),
end_date=datetime.now(),
search_query=["Trump"],
),
question_generator=ForwardLookingQuestionGenerator(
instructions="Generate binary forecasting questions about Trump's actions and decisions.",
examples=[
"Will Trump impose 25% tariffs on all goods from Canada by February 1, 2025?",
"Will Pete Hegseth be confirmed as Secretary of Defense by February 15, 2025?",
]
),
labeler=WebSearchLabeler(answer_type=binary_answer),
)
dataset = lr.transforms.run(pipeline, max_questions=3000)Colab Notebook
Last updated
