From 94db0cb42206127812531eb5317bc256889b6779 Mon Sep 17 00:00:00 2001 From: Jenit Jain Date: Mon, 11 Aug 2025 22:40:03 -0700 Subject: [PATCH] Update AI models --- docs/ToDo.md | 13 ++++++++++++- .../data_visualizer/data_transformation_agent.py | 6 +++++- tradingagents/agents/utils/memory.py | 2 +- tradingagents/dataflows/reddit_utils.py | 3 ++- tradingagents/default_config.py | 4 ++-- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/docs/ToDo.md b/docs/ToDo.md index a0bc809a..2f26dcce 100644 --- a/docs/ToDo.md +++ b/docs/ToDo.md @@ -4,4 +4,15 @@ - Add a method to include new files and articles and resources to the knowledge base and run the loop of analysis again. - Update the trading prompts to be more specific and to the point. - Research on the new roles of agents to involve and what they will be doing. -- Identify places where the human-in-the-loop can be used to improve the system. \ No newline at end of file +- Identify places where the human-in-the-loop can be used to improve the system. +- Peer comparison +- Portfolio management with the Risk management agent + +Questions for financial folks: + +1. Identify new roles for agents that are missing in the company structure that can help add insights into the decision making process. +2. Identify the steps in the process where you would want to give manual input and opinions to help guide a discussion between agents. +3. Review the prompts for the different agents and identify tasks to add for the agents or improvements. +4. List of website that you find helpful and use on a daily basis and maybe some specific tools you use on the website, +5. What are some of the decisions that you need help with on a daily basis for which the AI can provide insights and corresponding proof. +6. Summary of all the possible sources you interact with while evaluating a stock. \ No newline at end of file diff --git a/tradingagents/agents/data_visualizer/data_transformation_agent.py b/tradingagents/agents/data_visualizer/data_transformation_agent.py index ad8c5fae..91d23ff0 100644 --- a/tradingagents/agents/data_visualizer/data_transformation_agent.py +++ b/tradingagents/agents/data_visualizer/data_transformation_agent.py @@ -477,7 +477,7 @@ IMPORTANT: Return ONLY the transformed JSON, no additional text or explanations. print(f"Failed to process {json_file}") except Exception as e: - print(f"Failed to process {json_file}: {e}") + print(f" {json_file}: {e}") results["failed"].append(str(json_file)) return results @@ -504,6 +504,10 @@ IMPORTANT: Return ONLY the transformed JSON, no additional text or explanations. else: output_file_path = Path(output_file_path) / f"{input_path.stem}_transformed.json" + # Ensure output directory exists + output_dir = Path(output_file_path).parent + output_dir.mkdir(parents=True, exist_ok=True) + # Save the transformed data with open(output_file_path, 'w') as f: json.dump(transformed_data, f, indent=2) diff --git a/tradingagents/agents/utils/memory.py b/tradingagents/agents/utils/memory.py index 6d13cf9d..27bdc36e 100644 --- a/tradingagents/agents/utils/memory.py +++ b/tradingagents/agents/utils/memory.py @@ -9,7 +9,7 @@ class FinancialSituationMemory: self.embedding = "nomic-embed-text" else: # TODO: Replace the following with Voyage Finance-2 embedding - self.embedding = "text-embedding-3-small" + self.embedding = "text-embedding-3-large" self.client = OpenAI(base_url=config["backend_url"]) self.chroma_client = chromadb.Client(Settings(allow_reset=True)) # Check if collection exists diff --git a/tradingagents/dataflows/reddit_utils.py b/tradingagents/dataflows/reddit_utils.py index cd88bb8b..56db4317 100644 --- a/tradingagents/dataflows/reddit_utils.py +++ b/tradingagents/dataflows/reddit_utils.py @@ -46,7 +46,8 @@ ticker_to_company = { "UBER": "Uber", "ROKU": "Roku", "PINS": "Pinterest", - "AVAH": "Aveanna Healthcare" + "AVAH": "Aveanna Healthcare", + "BTAI": "BioXcel Therapeutics" } diff --git a/tradingagents/default_config.py b/tradingagents/default_config.py index ae4acfbe..adcf8181 100644 --- a/tradingagents/default_config.py +++ b/tradingagents/default_config.py @@ -10,8 +10,8 @@ DEFAULT_CONFIG = { ), # LLM settings "llm_provider": "openai", - "deep_think_llm": "o4-mini", - "quick_think_llm": "gpt-4o-mini", + "deep_think_llm": "o3", + "quick_think_llm": "gpt-4.1", "backend_url": "https://api.openai.com/v1", # Debate and discussion settings "max_debate_rounds": 5,