A Python tool that analyzes prediction questions using AI models and web scraping to generate detailed probability estimates.
- Uses Perplexity API for initial research
- Scrapes citation sources using Firecrawl
- Generates detailed analysis using OpenAI's o3-mini model
- Saves research prompts and predictions to files
- Clone the repository:
git clone https://github.com/yourusername/predictions.git
cd predictions
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the root directory with your API keys:
PERPLEXITY_API_KEY=your_perplexity_api_key
FIRECRAWL_API_KEY=your_firecrawl_api_key
OPENAI_API_KEY=your_openai_api_key
Run the script with your prediction questions:
python index.py
The script will:
- Generate research reports for each question
- Scrape relevant citations
- Create detailed analysis prompts
- Generate probability estimates using AI
- Save all outputs to files with timestamps
For each prediction question, two files are generated:
{timestamp}_{question}_prompt.md
: Contains the research and analysis prompt{timestamp}_{question}_o3_prediction.txt
: Contains the AI-generated probability estimate
MIT License