Getting Started

We're so excited to have you here! This guide will help you get started with running and tracking your own forecasts.

Step 1: Register

First, you need an Emerging Trajectories account. Sign up here. Once you do so, you'll get an API key that you can use with the SDK.

Note that right now, we've prioritized the Python SDK as the way to create and update forecasts. If you want a visual interface, let us know.

Step 2: Install the SDK

Next, you'll need to install the SDK. You can do so with pip:

pip install emergingtrajectories

Step 3: Create a Statement

Now that you've got your API key and SDK installed, it's time to create a statement and a forecast.

Statements are the thing you are trying to forecast. Today, Emerging Trajectories supports numerical statements, where you predict the actual number for an event... For example, the percentage increase in inflation, the GDP growth of an economy, or the value of Bitcoin by a certain date.

Statements require pieces of info: (a) a title, (b) a description of what is being predicted, and (c) the deadline for prediction.

See the code below for how to create a new statement.

from emergingtrajectories import Client 
c = Client(api_key = "your-api-key-goes-here")
  
response = c.create_statement(
    title = "Bitcoin Price By Dec 31, 2024",
    description = "The price of Bitcoin will exceed $100,000 by the end of 2024.",
    fill_in_the_blank = "The probability of Bitcoin exceeding $100,000 by the end of 2024 is ___.",
    deadline = "2024-12-31T23:59:59Z")

Note that the fill_in_the_blank variable here is key; this summarizes the forecasting challenge by framing it as a 'fill in the blank' statement. We use this in later components of our workflows to more easily ask for — and extract — predictions from LLMs.

The response will include the statement ID, which you'll need to create a forecast.

In the case above, printing the response will yield the following...

{'status': 'success', 'message': 'Statement created.', 'statement_id': 1}

Step 4: Submit a Forecast

Now that you've created a statement, it's time to submit a forecast. A Forecast is your prediction for the statement. You can submit as many forecasts as you want for a given statement.

Forecasts are tied to Statements, so you'll need to reference the statement ID from the prior step. Additionally, you'll need to provide a title, an optional justification, the prediction, and an agent name.

Titles, justifications, and predictions are self-explanatory. Agent names allow you to subsegment your forecasts by specific approaches, LLM agents, or other categorizations. Every forecast you make is tied to your personal account, but this allows you to further track performance by specific approaches you might be using.

The code below submits a forecast against the statement above.

from emergingtrajectories import Client 
c = Client(api_key = "your-api-key-goes-here")

response = c.create_forecast(1, "Unlikely, probability of 0.1", "No justification provided.", 0.1, "Agent A")

The response will let you know if you successfully logged the forecast, as well as the ID of the forecast, should you ever need it.

Questions? Feedback?

Don't hesitate to reach out: hello --at-- phaseai --dot-- com

 

© Phase AI