Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions prediction_prophet/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def research(
goal: str,
tavily_api_key: SecretStr,
model: str = "gpt-4-0125-preview",
model: str = "gpt-4-turbo",
initial_subqueries_limit: int = 20,
subqueries_limit: int = 4,
scrape_content_split_chunk_size: int = 800,
Expand Down Expand Up @@ -144,7 +144,7 @@ def research(
)

with st.status("Making prediction"):
prediction = _make_prediction(market_question=question, additional_information=report, engine="gpt-4-0125-preview", temperature=0.0)
prediction = _make_prediction(market_question=question, additional_information=report, engine="gpt-4-turbo", temperature=0.0)

if prediction.outcome_prediction == None:
st.container().error("The agent failed to generate a prediction")
Expand Down
2 changes: 1 addition & 1 deletion prediction_prophet/autonolas/research.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
]
TOOL_TO_ENGINE = {
"prediction-sentence-embedding-conservative": "gpt-3.5-turbo",
"prediction-sentence-embedding-bold": "gpt-4",
"prediction-sentence-embedding-bold": "gpt-4-turbo",
}


Expand Down
2 changes: 1 addition & 1 deletion prediction_prophet/deployment/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class DeployableAgentER_PredictionProphetGPT3(DeployableAgentER):


class DAPredictionProphetGPT4(DeployableAgentER):
agent = PredictionProphetAgent(model="gpt-4-0125-preview")
agent = PredictionProphetAgent(model="gpt-4-turbo")
# Limit to just 1, because so far it seems that 20x higher costs aren't justified by the prediction performance.
max_markets_per_run = 1

Expand Down
4 changes: 2 additions & 2 deletions prediction_prophet/functions/debate_prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def make_debated_prediction(prompt: str, additional_information: str, api_key: S

prediction_chain = (
prediction_prompt |
ChatOpenAI(model="gpt-4-0125-preview", api_key=secretstr_to_v1_secretstr(api_key)) |
ChatOpenAI(model="gpt-4-turbo", api_key=secretstr_to_v1_secretstr(api_key)) |
StrOutputParser()
)

Expand All @@ -106,7 +106,7 @@ def make_debated_prediction(prompt: str, additional_information: str, api_key: S
ConversableAgent(
name=f"Predictor_Agent_{i}",
system_message=PREDICTION_PROMPT,
llm_config={"config_list": [{"model": "gpt-4-0125-preview", "api_key": api_key.get_secret_value()}]},
llm_config={"config_list": [{"model": "gpt-4-turbo", "api_key": api_key.get_secret_value()}]},
human_input_mode="NEVER")
for i in range(2) ]

Expand Down
2 changes: 1 addition & 1 deletion prediction_prophet/functions/evaluate_question.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
@persistent_inmemory_cache
def is_predictable(
question: str,
engine: str = "gpt-4-0125-preview",
engine: str = "gpt-4-turbo",
prompt_template: str = QUESTION_EVALUATE_PROMPT,
api_key: SecretStr | None = None
) -> tuple[bool, str]:
Expand Down
2 changes: 1 addition & 1 deletion prediction_prophet/functions/is_predictable_and_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@persistent_inmemory_cache
def is_predictable_and_binary(
question: str,
engine: str = "gpt-4-0125-preview",
engine: str = "gpt-4-turbo",
prompt_template: str = QUESTION_EVALUATE_PROMPT,
api_key: SecretStr | None = None
) -> tuple[bool, str]:
Expand Down
2 changes: 1 addition & 1 deletion prediction_prophet/functions/rephrase_question.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class RephrasedQuestion(BaseModel):

def rephrase_question(
question: str,
engine: str = "gpt-4-0125-preview"
engine: str = "gpt-4-turbo"
) -> RephrasedQuestion:
"""
Rephrase the original question, by asking it in negation and universally, for example:
Expand Down
2 changes: 1 addition & 1 deletion prediction_prophet/functions/rerank_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def rerank_results(results: list[str], goal: str) -> list[str]:

rerank_results_chain = (
rerank_results_prompt |
ChatOpenAI(model="gpt-4-0125-preview") |
ChatOpenAI(model="gpt-4-turbo") |
CommaSeparatedListOutputParser()
)

Expand Down
2 changes: 1 addition & 1 deletion prediction_prophet/functions/research.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def research(
goal: str,
use_summaries: bool,
model: str = "gpt-4-0125-preview",
model: str = "gpt-4-turbo",
initial_subqueries_limit: int = 20,
subqueries_limit: int = 4,
scrape_content_split_chunk_size: int = 800,
Expand Down
4 changes: 2 additions & 2 deletions prediction_prophet/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def research(
start = time.time()

with get_openai_callback() as cb:
report = prophet_research(goal=prompt, use_summaries=False, model="gpt-4-0125-preview")
report = prophet_research(goal=prompt, use_summaries=False, model="gpt-4-turbo")

end = time.time()

Expand All @@ -66,7 +66,7 @@ def predict(prompt: str, path: str | None = None) -> None:
else:
logger = logging.getLogger("research")
logger.setLevel(logging.INFO)
report = prophet_research(goal=prompt, model="gpt-4-0125-preview", use_summaries=False, logger=logger)
report = prophet_research(goal=prompt, model="gpt-4-turbo", use_summaries=False, logger=logger)

prediction = make_debated_prediction(prompt=prompt, additional_information=report)

Expand Down
2 changes: 1 addition & 1 deletion scripts/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def main(
agent_name="prediction_prophet_gpt-3.5-turbo-0125_tavilyrawcontent",
use_tavily_raw_content=True,
),
# PredictionProphetAgent(model="gpt-4-0125-preview", max_workers=max_workers, agent_name="prediction_prophet_gpt-4-0125-preview"), # Too expensive to be enabled by default.
# PredictionProphetAgent(model="gpt-4-turbo", max_workers=max_workers, agent_name="prediction_prophet_gpt-4-turbo"), # Too expensive to be enabled by default.
],
cache_path=cache_path,
only_cached=only_cached,
Expand Down