{
  "id": "TYbgPL3q7fwRRxDq",
  "name": "Intelligent Online Web Searcher",
  "tags": [],
  "nodes": [
    {
      "id": "15d43fe8-0d1f-4437-8042-f9d7d3b2b39e",
      "name": "Google Gemini Chat Model14",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1840,
        880
      ],
      "parameters": {
        "options": {
          "topP": 0.6,
          "temperature": 0.4,
          "safetySettings": {
            "values": [
              {
                "category": "HARM_CATEGORY_HARASSMENT",
                "threshold": "BLOCK_NONE"
              },
              {
                "category": "HARM_CATEGORY_HATE_SPEECH",
                "threshold": "BLOCK_NONE"
              },
              {
                "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                "threshold": "BLOCK_NONE"
              },
              {
                "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
                "threshold": "BLOCK_NONE"
              }
            ]
          },
          "maxOutputTokens": 4086
        },
        "modelName": "models/gemini-1.5-flash-002"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "096f5531-248f-4062-9046-3fc65072aab0",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        720,
        680
      ],
      "parameters": {
        "options": {
          "topK": 40,
          "topP": 0.8,
          "temperature": 0.5,
          "maxOutputTokens": 1024
        },
        "modelName": "models/gemini-1.5-flash-exp-0827"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ad8cf85b-7313-4976-90dc-223a219cd84e",
      "name": "Google Gemini Chat Model15",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1920,
        1180
      ],
      "parameters": {
        "options": {
          "topP": 0.6,
          "temperature": 0.4,
          "maxOutputTokens": 4096
        },
        "modelName": "models/gemini-1.5-flash-002"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a7509dc7-7bbe-4108-991a-a87f68b0121b",
      "name": "Auto-fixing Output Parser6",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        1880,
        620
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "3f0b2275-4496-4e74-baa3-d70e0df430ad",
      "name": "Structured Output Parser3",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1960,
        700
      ],
      "parameters": {
        "jsonSchemaExample": "{\n    \"chain_of_thought\": \"Your step-by-step reasoning here.\",\n    \"Highest_RANKEDURL_1\": \"First best match URL.\",\n    \"Highest_RANKEDURL_2\": \"Second best match URL.\",\n    \"Highest_RANKEDURL_3\": \"Third best match URL.\",\n    \"New_Query\": \"Provide the new search query text here.\",\n    \"Information_extracted\": \"Provide all extracted information relevant to the user's query or 'N/A' if none.\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "00f22a46-cd13-452a-b6a1-0b22a87009f1",
      "name": "Query 2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2140,
        520
      ],
      "parameters": {
        "url": "https://api.search.brave.com/res/v1/web/search",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $item(\"0\").$node[\"Query 1 Ranker & Query 2 Maker\"].json[\"output\"][\"New_Query\"] }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip"
            },
            {
              "name": "X-Subscription-Token",
              "value": "<Insert Your API Key Here>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "bfcf7a7c-b52d-4817-a934-849728c94d3d",
      "name": "Query  1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1460,
        520
      ],
      "parameters": {
        "url": "https://api.search.brave.com/res/v1/web/search",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q",
              "value": "={{ $json.output.final_search_query }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip"
            },
            {
              "name": "X-Subscription-Token",
              "value": "<Insert Your API Key Here>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "92d28c73-f8c3-45e2-9446-1b5cf7e1a3f3",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        4520,
        520
      ],
      "parameters": {
        "options": {},
        "respondWith": "text",
        "responseBody": "={{ $item(\"0\").$node[\"Research Reporter\"].json[\"text\"] }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "dee9de81-dcf4-4cd9-8620-cdeecf6cbffd",
      "name": "Date & Time",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        240,
        520
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "50dc717a-714d-484a-baf7-a9a9ca66a0d3",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        1120,
        620
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "df7f29e7-90e0-4b05-ae66-7970c648a4cb",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1320,
        700
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"reasoning_summary\": \"Detailed explanation of each analytical chain\u2019s purpose and insights, including key terms and considerations for query formulation.\",\n  \"final_search_query\": \"The single, best-fit search query derived from the meta-reasoning and multi-chain analysis, optimized to answer the research question.\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "353ec670-52fd-40c8-9be6-2b444b553de1",
      "name": "Auto-fixing Output Parser7",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        2540,
        620
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "e17f0a37-ca0f-48ca-870e-6fc5a881c541",
      "name": "Structured Output Parser4",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2700,
        680
      ],
      "parameters": {
        "jsonSchemaExample": "{\n    \"chain_of_thought\": \"Your step-by-step reasoning here.\",\n    \"Highest_RANKEDURL_1\": \"First best match URL.\",\n    \"Highest_RANKEDURL_2\": \"Second best match URL.\",\n    \"Information_extracted\": \"Provide all extracted information relevant to the user's query or 'N/A' if none.\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "1453ea3e-7e60-4fcc-af3d-e6d0fd4a9ac0",
      "name": "Query Maker - 1",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1140,
        520
      ],
      "parameters": {
        "text": "=1. **Task:** `\"Your task is to develop a web search query that most effectively answers the research question given. Use meta-reasoning and multi-chain analysis to ensure a comprehensive approach.\"`\n\n2. **Structured Guidance for Chains of Thought:**  \n    a. **Chain 1:** Break down the research question, identifying keywords and relevant terms.  \n    b. **Chain 2:** Explore the context and potential sources, determining the types of results that would be most relevant.  \n    c. **Chain 3:** Refine the query for specificity and completeness, considering how to capture nuances of the question.\n\n3. **Final Query Generation:** Based on the insights from the three chains, generate a single, refined search query.\n\n\n4. Note, the queries must not be long tails , as they result in 0 websearch reutrns. We give you some examples of good web search queries:\nExamples:\n\nUser Question: \"What is the current state of the U.S. economy in 2024?\"\n\nEffective Search Query: \"U.S. Economy Analysis Report 2024\"\nUser Question: \"What are the recent advancements in artificial intelligence?\"\n\nEffective Search Query: \"2024 Artificial Intelligence Developments\"\nUser Question: \"How is climate change affecting agriculture globally?\"\n\nEffective Search Query: \"Global Impact of Climate Change on Agriculture 2024\"\nUser Question: \"What are the latest trends in cybersecurity threats?\"\n\nEffective Search Query: \"Cybersecurity Threats and Trends 2024\"\nUser Question: \"What is the outlook for renewable energy investments?\"\n\nEffective Search Query: \"Renewable Energy Investment Outlook 2024\"\n\n5. Data Input:\n   - **Today's Date:** \"{{ $item(\"0\").$node[\"Date & Time\"].json[\"currentDate\"] }}\"\n **Search Inquiry:** \n   - **Search Topic to create the query upon it:**{{ $item(\"0\").$node[\"Analyst Emulator\"].json[\"text\"] }} \"\"\n\n6. Now develop the best fit web search query given the user request above under number 5\n---\n\n**Output Requirements:**  \nThe Assistant\u2019s output should be in JSON format, structured as follows:\n\n{\n  \"reasoning_summary\": \"Detailed explanation of each analytical chain\u2019s purpose and insights, including key terms and considerations for query formulation.\",\n  \"final_search_query\": \"The single, best-fit search query derived from the meta-reasoning and multi-chain analysis, optimized to answer the research question.\"\n}\n```\n\n---\n",
        "messages": {
          "messageValues": [
            {
              "message": "You are an advanced data and research retrieval through smart search queires via Bing and Brave websearch APIs. "
            },
            {
              "type": "HumanMessagePromptTemplate",
              "message": "1. **Task:** `\"Your task is to develop a web search query that most effectively answers the research question given. Use meta-reasoning and multi-chain analysis to ensure a comprehensive approach.\"`\n\n2. **Structured Guidance for Chains of Thought:**  \n    a. **Chain 1:** Break down the research question, identifying keywords and relevant terms.  \n    b. **Chain 2:** Explore the context and potential sources, determining the types of results that would be most relevant.  \n    c. **Chain 3:** Refine the query for specificity and completeness, considering how to capture nuances of the question.\n\n3. **Final Query Generation:** Based on the insights from the three chains, generate a single, refined search query.\n\n4. Data Input:\n   - **Today's Date:** \"2024-11-12T10:21:33.764-05:00\"\n2. **Search Inquiry:** \n   - **Search Topic to create the query upon it:** \"What is the latest stock Market Analysis in mid-term?\"\n\n\n---\n\n**Output Requirements:**  \nThe Assistant\u2019s output should be in JSON format, structured as follows:\n\n{\n  \"reasoning_summary\": \"Detailed explanation of each analytical chain\u2019s purpose and insights, including key terms and considerations for query formulation.\",\n  \"final_search_query\": \"The single, best-fit search query derived from the meta-reasoning and multi-chain analysis, optimized to answer the research question.\"\n}\n```\n\n---\n"
            },
            {
              "type": "AIMessagePromptTemplate",
              "message": "Assessing query functionality\n\nI\u2019m evaluating the viability of the assistant's proposed search query. The user questions if it would yield meaningful results on different search engines.\n\nClarifying the query\n\nOK, let me see. The task involves clarifying the user's needs, ensuring the response aligns with OpenAI's policies, and possibly re-evaluating and correcting any errors in the previous response.\n\nRefining search specifics\n\nI'm working through refining the search query to focus on specific terms like 'S&P 500', integrating dates such as 'November 2024', and emphasizing phrases for precision.\n\nSelf-reflecting on search queries\n\nToday, I\u2019m thinking about how to validate search queries for accuracy and realism, ensuring they are practical and likely to yield productive results.\n\nAcknowledging insights\n\nI\u2019m recognizing and correcting a search query to ensure it\u2019s optimal and effectively aligned with advanced user needs, leading to a more precise output.\n\nCrafting a search query\n\nI\u2019m crafting a search query to pinpoint the most pertinent recent mid-term stock market analyses. Starting with relevant terms and then exploring potential sources for context and relevance.\n\nPinpointing sources and specifics\n\nI'm gathering info from financial news, investment reports, and economic research institutions. I\u2019m refining search terms like \"mid-term stock market analysis\" and \"market forecast\" to keep results current and nuanced.\n\nCrafting the query\n\nI\u2019m finalizing the query by merging terms like 'latest' and 'stock market analysis' with 'mid-term', and considering synonyms such as 'market forecast' to refine the search for 2024.\n\nTweaking the search\n\nI adjusted the search terms to 'latest stock market mid-term outlook 2024,' removing excessive quotes for better clarity and relevance.\n\n\n{\n  \"reasoning_summary\": \"Chain 1: Broke down the research question to identify key terms such as 'latest', 'stock market analysis', and 'mid-term'. Considered synonyms like 'mid-term outlook', 'market forecast', and included the current year '2024' for recency.\\n\\nChain 2: Explored the context where the user seeks recent analyses of the stock market with a mid-term perspective. Relevant sources would be financial news outlets, investment banks, and economic research firms. The most useful results would be up-to-date articles or reports offering mid-term forecasts.\\n\\nChain 3: Refined the query by removing unnecessary quotation marks and simplifying it to reflect how an advanced user might search. Included terms like 'latest', 'mid-term outlook', and '2024' to enhance specificity without limiting the search results unnecessarily.\",\n  \"final_search_query\": \"latest stock market mid-term outlook 2024\"\n}"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.4
    },
    {
      "id": "e6a80775-af6e-4aa6-b012-17ea3004246a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1100,
        20
      ],
      "parameters": {
        "color": 3,
        "width": 1804.0623684864886,
        "height": 1343.3495711384608,
        "content": "## Query Makers and Web Result Rankers"
      },
      "typeVersion": 1
    },
    {
      "id": "998f8d37-7762-46b4-9c82-ed2b07f1b502",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2940,
        20
      ],
      "parameters": {
        "color": 4,
        "width": 1031,
        "height": 823,
        "content": "## Top 5 search results extraction"
      },
      "typeVersion": 1
    },
    {
      "id": "c4f33fb1-8921-4a85-b86f-db7451374eeb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4020,
        220
      ],
      "parameters": {
        "color": 6,
        "width": 738,
        "height": 625,
        "content": "## Research Reporter\n"
      },
      "typeVersion": 1
    },
    {
      "id": "91026446-739f-4d20-864e-ef37f3c09222",
      "name": "Google Gemini Chat Model16",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        4200,
        680
      ],
      "parameters": {
        "options": {
          "topP": 0.8,
          "temperature": 0.6,
          "safetySettings": {
            "values": [
              {
                "category": "HARM_CATEGORY_HARASSMENT",
                "threshold": "BLOCK_NONE"
              },
              {
                "category": "HARM_CATEGORY_HATE_SPEECH",
                "threshold": "BLOCK_NONE"
              },
              {
                "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
                "threshold": "BLOCK_NONE"
              },
              {
                "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
                "threshold": "BLOCK_NONE"
              }
            ]
          },
          "maxOutputTokens": 4086
        },
        "modelName": "models/gemini-1.5-flash-002"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "801ec1f8-ec78-413d-9598-dd90bdf9aa4f",
      "name": "Article Extractor1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3280,
        540
      ],
      "parameters": {
        "url": "https://article-extractor2.p.rapidapi.com/article/parse",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": " word_per_minute",
              "value": "5000"
            },
            {
              "name": "url",
              "value": "={{ $('Code').item.json.url }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "X-RapidAPI-Host",
              "value": "article-extractor2.p.rapidapi.com"
            },
            {
              "name": "X-RapidAPI-Key",
              "value": "<Insert Your API Key Here>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1b4b1960-afe9-4fb8-88ae-3ca07e8e8019",
      "name": "Analyst Emulator",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        700,
        520
      ],
      "parameters": {
        "text": "=**Context:**  \nAs our advanced system prompt creator specializing in emulating domain-specific AI agents, we have a new request that demands a highly specialized framework. Your role is to design a system prompt tailored to engage the Assistant in advanced meta-reasoning methodologies. This will involve analyzing user-provided data inputs for research questions, utilizing domain-specific methods of analysis, depth, and detail suited for an expert audience.\n\n---\n\n**Request:**  \nThe system prompt must instruct the Assistant to perform meta-reasoning, following **three distinct chains of thought**, each with a minimum of **five steps**. This approach should enable a comprehensive, multi-faceted analysis of the data inputs to address any given research question effectively.\n\n1. **Time Awareness:** Incorporate an awareness of the current date and time, allowing the Assistant to contextualize its analysis within the present timeframe.\n   - **Today's Date:**{{ $item(\"0\").$node[\"Date & Time1\"].json[\"formattedDate\"] }}\"\"\n2. **Search Inquiry:** Define the topic for analysis, ensuring relevance and alignment with the user\u2019s question.\n   - **Search Topic:**{{ $item(\"0\").$node[\"Webhook\"].json[\"query\"][\"Research Question\"] }}\"\"\n\n---\n\n**Instructions for the Assistant:**  \nAfter reviewing the context and request, initiate a structured tree of thought with at least three independent chains, each comprising five steps. Provide an analysis of each thought chain and its conclusions.\n\n**Output Requirements:**  \nYour response must be soley include the full prompt engineered, full-proof system prompt text.\n",
        "messages": {
          "messageValues": [
            {
              "message": "You act as a domain expert in large language model AND advanced prompt engineering. Your task is to create highly detailed and effective user and system prompts that align with the principles of layered reasoning, recursive analysis, and multi-dimensional thinking. You will ensure that each prompt you generate adheres to the highest standards of specificity, creativity, and strategic alignment, drawing on the 20 advanced techniques outlined below:|### **1. Hierarchical Thought Processes:**- **Structure**: Ensure that prompts guide the AI to start with foundational analysis and progressively move to higher levels of abstraction, linking specific details to broader strategic concepts.### **2. Dynamic Layering:**- **Flexibility**: Design prompts that allow the AI to adjust its reasoning dynamically based on the complexity and evolving context, activating or deactivating reasoning layers as needed.### **3. Recursive Re-Evaluation:**- **Refinement**: Create prompts that encourage the AI to revisit and refine its conclusions continually, incorporating new data and feedback for iterative improvement.### **4. Non-Linear Exploration:**- **Simultaneous Pathways**: Develop prompts that allow the AI to explore multiple reasoning pathways at once, branching out into different solutions before converging on the most viable one.### **5. Divergent and Convergent Thinking:**- **Broad to Specific**: Guide the AI to generate a wide range of ideas before narrowing down to the most practical solutions, ensuring a balance between creativity and feasibility.### **6. Mimicking Intuition and Emotion:**- **Pattern Recognition**: Encourage the AI to recognize complex patterns in data that align with human intuition, while also considering the emotional context where applicable.### **7. Integrating Subconscious Processes:**- **Background Analysis**: Instruct the AI to perform ongoing background processing, surfacing insights and connections even when not actively prompted.### **9. Infinite Thought Processes:**- **Continuous Learning**: Encourage the AI to continually refine its understanding and remain open to new insights, ensuring that its reasoning evolves over time.### **10. Strategic Goal Alignment:**- **Long-Term Thinking**: Guide the AI to align its analysis and recommendations with broader strategic objectives, considering long-term implications and risks.### **11. Abstract Knowledge Representation Systems:**- **Abstract Reasoning**: Prompt the AI to represent complex ideas in abstract forms, allowing it to transcend literal interpretations and explore higher-order concepts.### **12. Layered Knowledge Representations:**- **Multi-Level Analysis**: Ensure that prompts lead the AI to build layered representations of knowledge, connecting surface details with deeper abstractions.### **13. Fostering Creativity Through Constraints:**- **Innovative Constraints**: Use prompts that impose creative constraints, encouraging the AI to think outside the box and generate innovative solutions.### **14. Multi-Perspective Analysis Modules:**- **Holistic View**: Guide the AI to analyze issues from multiple perspectives, integrating these views into a cohesive understanding that considers all angles.### **15. Confidence-Based Divergence Mechanisms:**- **Risk-YOUR_OPENAI_KEY_HERE Analysis**: Instruct the AI to assess its confidence in conclusions and explore alternative pathways when confidence is low, especially in high-risk areas.### **16. Tree of Thoughts (ToT) Framework:**- **Branching Logic**: Design prompts that encourage the AI to explore and evaluate multiple branches of reasoning, using tree-based search methods for comprehensive analysis.### **17. Self-Correcting Feedback Loops:**- **Meta-Cognitive Reflection**: Ensure the AI continuously critiques and refines its outputs, learning from past mistakes to improve future performance.### **19. Scenario-Based Analysis and Simulation:**- **What-If Scenarios**: Prompt the AI to simulate various deep technical analysis scenarios, analyzing the risks and benefits of each to provide strategic recommendations.### **20. Final Integration and Synthesis:**- **Comprehensive Synthesis**: Guide the AI to synthesize all analyses into a unified final output, ensuring coherence, accuracy, and strategic alignment."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.4
    },
    {
      "id": "ce56c1b4-beb4-43b6-860d-133e38b79ed1",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        40,
        520
      ],
      "parameters": {
        "path": "962f1468-c80f-4c0c-8555-a0acf648ede4",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "380bc143-9300-4b10-b6b2-4e1a833391b1",
      "name": "Query 1 Ranker & Query 2 Maker",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "onError": "continueRegularOutput",
      "position": [
        1780,
        520
      ],
      "parameters": {
        "text": "=\n**Objective:**\n\nFor the user's query, web search results are provided. Your tasks are:\n\n1. **Rank the links** based on how well they match the user's query.\n2. **Extract relevant information** from the descriptions provided. If no relevant information is found, return \"N/A\".\n\n---\n\n**Task:**\n\n**Step 1: Understand the User's Intent**\n\n- Determine what the user is truly and technically looking for.\n- The user's request query is: \"{{ $('Webhook').item.json.query['Research Question'] }}\"\n- The serach results below, however their  performance seem, have been based on this query \"{{ $item(\"0\").$node[\"Query Maker - 1\"].json[\"output\"][\"final_search_query\"] }}\". If the result are not satisfactory or missing due to bad query making, you should note that as well for the neww query making.\n- To nesure being time aware , realize todays date is: \"{{ $item(\"0\").$node[\"Date & Time\"].json[\"currentDate\"] }}\"\n\n- Follow a three-step chain of thought to comprehend the user's needs. Think out loud.\n\n---\n\n**Step 2: Rank the Links**\n\n- From the URLs and description snippets provided, **rank the top 3 websites** that are most likely to contain the required information.\n- Use the titles, descriptions, and sources to inform your ranking.\n\n**Links, Titles, and Descriptions:**\n\n{{ $json.aggregated_text }}\n\n---\n\nThis list completes the structure up to 20 results as you requested. Let me know if there\u2019s anything more you need!\n\n---\n\n**Step 3: Analyze and Create a Follow-up Query**\n\n- Recognize that for the user's request:\n\n  `\"{{ $('Webhook').item.json.query['Research Question'] }}\"`\n\n  The results provided are based on the assistant's generated search query:\n\n  `\"{{ $item(\"0\").$node[\"Query Maker - 1\"].json[\"output\"][\"final_search_query\"] }}\"`\n\n- Analyze and revise any issues or new insights through multi-step thinking to create a follow-up query.\n\n**Indications and Priorities:**\n\n1. **No Results Received:** If no search items are shared, the search query may have been ineffective (e.g., too specific, incorrect parameters).\n2. **Insufficient or Unpromising Results:** If fewer than 20 but more than 5 results are provided, and none seem promising, the search query may need refinement.\n3. **Successful Results with Potential Follow-up:** If none of the above issues occurred and the search results provide answers or suggest a follow-up, create a new query. This could be a new topic, a deep dive, or a parallel factor that offers additional benefits.\n\n- Provide your chain of thought that connects the user's request to the actual information.\n\n- Deliver precise, detailed, and value-oriented information relevant to the user's query.\n\n**Step 4: Query making notes and examples**: \n\nThe queries must not be long tails , as they result in 0 websearch reutrns. We give you some examples of good web search queries:\nExamples:\n\nUser Question: \"What is the current state of the U.S. economy in 2024?\"\nEffective Search Query: \"U.S. Economy Analysis Report 2024\"\n\nUser Question: \"What are the recent advancements in artificial intelligence?\"\nEffective Search Query: \"2024 Artificial Intelligence Developments\"\n\nUser Question: \"How is climate change affecting agriculture globally?\"\nEffective Search Query: \"Global Impact of Climate Change on Agriculture 2024\"\n\nUser Question: \"What are the latest trends in cybersecurity threats?\"\nEffective Search Query: \"Cybersecurity Threats and Trends 2024\"\n\nUser Question: \"What is the outlook for renewable energy investments?\"\nEffective Search Query: \"Renewable Energy Investment Outlook 2024\"\n\n**Step 5: Query making*: \nor query making remember as we said:\n   - **Today's Date:** \"{{ $item(\"0\").$node[\"Date & Time\"].json[\"currentDate\"] }}\"\n **Search Inquiry:** \n   - **Search Topic to create the query upon it:**{{ $item(\"0\").$node[\"Webhook\"].json[\"query\"][\"Research Question\"] }}\"\"\n\n\n---\n\n**Step 6: Output Format**\n\nEnsure the response is in the following JSON format:\n\n\n{\n    \"chain_of_thought\": \"Your step-by-step reasoning here.\",\n    \"Highest_RANKEDURL_1\": \"First best match URL.\",\n    \"Highest_RANKEDURL_2\": \"Second best match URL.\",\n    \"Highest_RANKEDURL_3\": \"Third best match URL.\",\n    \"New_Query\": \"Provide the new search query text here.\",\n    \"Information_extracted\": \"Provide all extracted information relevant to the user's query or 'N/A' if none.\"\n}\n\n",
        "messages": {
          "messageValues": [
            {
              "message": "=\nYou are an expert information retrieval and critical evaluation assistant designed to process, rank, and extract high-relevance content from web search results for complex user queries. You must provide value-oriented insights while refining searches based on relevance and context sensitivity. \n\n**Your Process and Priorities:**\n\n#### 1. **Determine the User's Technical Intent**\n   - Interpret the user's core question provided as `{{ $item(\"0\").$node[\"Webhook\"].json[\"query\"][\"Research Question\"] }}`, discerning underlying objectives and specialized needs.\n   - Recognize that the search results may have been generated from a **secondary query**: `{{ $item(\"0\").$node[\"Query Maker - 1\"].json[\"output\"][\"final_search_query\"] }}`. \n   - Judge the adequacy of this generated query. If it does not meet the user\u2019s objectives, highlight the need for query refinement and prepare to adapt the approach.\n   - Stay mindful of the date context, using `{{ $item(\"0\").$node[\"Date & Time\"].json[\"currentDate\"] }}` to assess the freshness of content or time-sensitive relevance.\n\n#### 2. **Rank Results Based on Analytical Relevance**\n   - From the search results provided, **rank the top 3 URLs** that most closely align with the user\u2019s intent and technical needs.\n     - Use multi-dimensional analysis to assess how each link\u2019s title, description, and source match the user\u2019s objective.\n     - Prioritize results based on credibility, relevance, and their potential to add depth to the user\u2019s inquiry.\n   - Your goal is to select the highest-value links, disregarding results that offer superficial, off-topic, or outdated information.\n\n#### 3. **Extract Key Information**\n   - For each of the top 3 ranked results, extract insights and details from the description snippets that directly address the user\u2019s query.\n   - If no pertinent information is available in a description, record `\"N/A\"` to indicate its lack of relevance.\n\n#### 4. **Evaluate for Potential Query Improvement**\n   - Evaluate the relevance and coverage of search results:\n     - If fewer than 5 relevant results are present, consider that the initial query may be too narrow, specific, or otherwise misaligned.\n     - Generate a **refined query** that is adjusted to better match the user\u2019s likely needs and produce higher-quality results.\n   - Use advanced language modifications, new keyword suggestions, or rephrasing to formulate a search query that enhances alignment with the user\u2019s goals.\n"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.4
    },
    {
      "id": "387735ff-ccfd-4b2b-90d2-fb0194573c43",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2960,
        80
      ],
      "parameters": {
        "color": 5,
        "width": 991,
        "height": 416,
        "content": "## Step 2. Get a Free API Key for Article Extraction\n\n Step 1:\nSign up at [RapidAPI.com](https://rapidapi.com/) and subscribe to the Article Extraction API. This specific API offers 300 extractions per month for free. \n\n**API Link:** [Article Extractor](https://rapidapi.com/pwshub-pwshub-default/api/article-Step 2.extractor2/playground/apiendpoint_6710e06d-d607-486f-b514-0812c7935cbc)\n\nStep 2: \nAfter subscribing, obtain your API key and add it to each of the 5 HTTP Request nodes in n8n.io.\n\n**Side Note:**  \nYou are free to choose alternative APIs if they better suit your needs, but remember to update each HTTP Request node accordingly.\n\n**Alternative Example API:**  \n[Scraper Tech API](https://rapidapi.com/alexanderxbx/api/scraper-tech/playground/apiendpoint_599d266e-c763-4bc5-819b-3841cf2af4b0)\n\n**Additional Tip for RapidAPI users:**  \nIf you\u2019re using a different API, you can copy the cURL code from the RapidAPI playground and paste it directly into the HTTP node within n8n.io. This simplifies integration by automatically filling in the necessary headers and request details. "
      },
      "typeVersion": 1
    },
    {
      "id": "288f701d-d885-4730-871a-56ccdf3a141c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2220,
        40
      ],
      "parameters": {
        "color": 5,
        "width": 672,
        "height": 290,
        "content": "\n## Step 1. Set Up a Free Brave Web Search Query API Key\n\nTo attain the free web search API tier from Brave, follow these steps:\n\n1. Visit api.search.brave.com\n2. Create an account\n3. Subscribe to the free plan (no charge)\n4. Navigate to the API Keys section\n5. Generate an API key. For the subscription type, choose \"Free\".\n6. Go to the \"Query 1\" and \"Query 2\" Nodes, and change the \"X-Subscription-Token\" value to your API Key.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "78997ab2-0938-4786-9075-c0027dbba550",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 6,
        "width": 1064.223581887485,
        "height": 466.14018755820865,
        "content": "## Step 1. Get Free Gemini API Key \n(Skip this step and replace the Gemini Nodes with any other LLM if you prefer others)\n\nTo obtain a free API key for Google's Gemini API, follow these steps:\n\n1. **Access Google AI Studio**: Navigate to [Google AI Studio](https://aistudio.google.com/app/welcome) and sign in with your Google account.\n\n2. **Create an API Key**: Once logged in, click on \"Get API key\" and then select \"Create API key in new project.\" This action will generate your unique API key. \n\n3. **Secure Your API Key**: Ensure you store your API key securely, as it grants access to your project's quota and resources. Avoid sharing it publicly or embedding it in client-side code. \n\n**Free Tier Limitations for Gemini 1.5 Flash**:\n\nThe free tier for the Gemini 1.5 Flash model includes:\n\n- **Requests per Minute (RPM)**: Up to 15 requests.\n- **Tokens per Minute (TPM)**: Up to 1 million tokens.\n- **Requests per Day (RPD)**: Up to 1,500 requests.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "89f32350-e3d9-4562-8dc9-36e4946a392e",
      "name": "Date & Time1",
      "type": "n8n-nodes-base.dateTime",
      "position": [
        460,
        520
      ],
      "parameters": {
        "date": "={{ $item(\"0\").$node[\"Date & Time\"].json[\"currentDate\"] }}",
        "options": {},
        "operation": "formatDate"
      },
      "typeVersion": 2
    },
    {
      "id": "f663f17e-8037-46e9-8ebf-accd5f50d034",
      "name": "Query-1 Combined",
      "type": "n8n-nodes-base.code",
      "position": [
        1620,
        520
      ],
      "parameters": {
        "jsCode": "// Initialize an empty string to store all title, url, and description pairs\nlet aggregatedOutputText = \"\";\n\n// Loop through all items passed to this Function node\nfor (let item of items) {\n  // Access the JSON data from \"Query 1\" node for the current item\n  const queryData = item.json;\n\n  // Ensure there is a \"web.results\" array to process\n  if (queryData.web?.results && Array.isArray(queryData.web.results)) {\n    // Loop through all results in the \"web.results\" array\n    for (let result of queryData.web.results) {\n      // Extract the title, url, and description for each result\n      const title = result.title || \"No Title\";\n      const url = result.url || \"No URL\";\n      const description = result.description || \"No Description\";\n\n      // Append the values to the aggregated string\n      aggregatedOutputText += `Title: ${title}\\nURL: ${url}\\nDescription: ${description}\\n\\n`;\n    }\n  } else {\n    // If no results array, handle gracefully\n    aggregatedOutputText += \"No results found for this item.\\n\\n\";\n  }\n}\n\n// Trim the final string to remove any trailing newline and whitespace\naggregatedOutputText = aggregatedOutputText.trim();\n\n// Return a single item containing the aggregated output as a string\nreturn [\n  {\n    json: {\n      aggregated_text: aggregatedOutputText\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "964d4b7d-7082-4e1c-9f98-60d4a3d00b18",
      "name": "Query-2 Combined",
      "type": "n8n-nodes-base.code",
      "position": [
        2340,
        520
      ],
      "parameters": {
        "jsCode": "// Initialize an empty string to store all title, url, and description pairs\nlet aggregatedOutputText = \"\";\n\n// Loop through all items passed to this Function node\nfor (let item of items) {\n  // Access the JSON data from \"Query 2\" node for the current item\n  const queryData = item.json;\n\n  // Ensure there is a \"web.results\" array to process\n  if (queryData.web?.results && Array.isArray(queryData.web.results)) {\n    // Loop through all results in the \"web.results\" array\n    for (let result of queryData.web.results) {\n      // Extract the title, url, and description for each result\n      const title = result.title || \"No Title\";\n      const url = result.url || \"No URL\";\n      const description = result.description || \"No Description\";\n\n      // Append the values to the aggregated string\n      aggregatedOutputText += `Title: ${title}\\nURL: ${url}\\nDescription: ${description}\\n\\n`;\n    }\n  } else {\n    // If no results array, handle gracefully\n    aggregatedOutputText += \"No results found for this item.\\n\\n\";\n  }\n}\n\n// Trim the final string to remove any trailing newline and whitespace\naggregatedOutputText = aggregatedOutputText.trim();\n\n// Return a single item containing the aggregated output as a string\nreturn [\n  {\n    json: {\n      aggregated_text: aggregatedOutputText\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "d067d059-33de-474e-94b1-4aa1edd05258",
      "name": "Query 2 - Ranker",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "onError": "continueRegularOutput",
      "position": [
        2480,
        520
      ],
      "parameters": {
        "text": "=\n**Objective:**\n\nFor the user's query, web search results are provided. Your tasks are:\n\n1. **Rank the links** based on how well they match the user's query.\n2. **Extract relevant information** from the descriptions provided. If no relevant information is found, return \"N/A\".\n\n---\n\n**Task:**\n\n**Step 1: Understand the User's Intent**\n\n- Determine what the user is truly and technically looking for.\n- The user's request query is: `\"{{ $('Webhook').item.json.query['Research Question'] }}\"`\n- The search results below, however their performance seems, have been based on this query `\"{{ $item(\"0\").$node[\"Query Maker - 1\"].json[\"output\"][\"final_search_query\"] }}\"`. If the results are not satisfactory or missing due to a bad query, you should note that as well for new query making.\n- To ensure being time-aware, realize today\u2019s date is: `\"{{ $item(\"0\").$node[\"Date & Time\"].json[\"currentDate\"] }}\"`\n\n- Follow a three-step chain of thought to comprehend the user's needs. Think out loud.\n\n---\n\n**Step 2: Rank the Links**\n\n- From the URLs and description snippets provided, **rank the top 2 websites** that are most likely to contain the required information.\n- Use the titles, descriptions, and sources to inform your ranking.\n\n**Links, Titles, and Descriptions:**\n\n\n{{ $item(\"0\").$node[\"Query-2 Combined\"].json[\"aggregated_text\"] }}\n\n---\n\n\n**Links to exclude**\n\nWe already have identified these three URLs below. If these URL links exist in the fresh web search links shared above, do not include them in your ranking analysis. Do the analysis except these 3 links below:\n\n- First link to exclude: {{ $item(\"0\").$node[\"Query 1 Ranker & Query 2 Maker\"].json[\"output\"][\"Highest_RANKEDURL_1\"] }}\n- Second link to exclude: {{ $item(\"0\").$node[\"Query 1 Ranker & Query 2 Maker\"].json[\"output\"][\"Highest_RANKEDURL_2\"] }}\n- Third link to exclude: {{ $item(\"0\").$node[\"Query 1 Ranker & Query 2 Maker\"].json[\"output\"][\"Highest_RANKEDURL_3\"] }}\n**Step 3: Output Format**\n\nEnsure the response is in the following JSON format:\n\n{\n    \"chain_of_thought\": \"Your step-by-step reasoning here.\",\n    \"Highest_RANKEDURL_1\": \"First best match URL.\",\n    \"Highest_RANKEDURL_2\": \"Second best match URL.\",\n    \"Information_extracted\": \"Provide all extracted information relevant to the user's query or 'N/A' if none.\"\n}\n```",
        "messages": {
          "messageValues": [
            {
              "message": "you area a expert and percise web query ranker based on the user intended output they seek from a web search result urls."
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.4
    },
    {
      "id": "25596f61-d645-4c28-bfcf-ce28cbf66134",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        2780,
        520
      ],
      "parameters": {
        "jsCode": "// Initialize an array to store all URLs\nlet urls = [];\n\n// Add URLs from \"Query 1 Ranker & Query 2 Maker\" node\nurls.push(\n  $item(\"0\").$node[\"Query 1 Ranker & Query 2 Maker\"].json[\"output\"][\"Highest_RANKEDURL_1\"],\n  $item(\"0\").$node[\"Query 1 Ranker & Query 2 Maker\"].json[\"output\"][\"Highest_RANKEDURL_2\"],\n  $item(\"0\").$node[\"Query 1 Ranker & Query 2 Maker\"].json[\"output\"][\"Highest_RANKEDURL_3\"]\n);\n\n// Add URLs from \"Query 2 Ranker\" node\nurls.push(\n  $item(\"0\").$node[\"Query 2 - Ranker\"].json[\"output\"][\"Highest_RANKEDURL_1\"],\n  $item(\"0\").$node[\"Query 2 - Ranker\"].json[\"output\"][\"Highest_RANKEDURL_2\"]\n);\n\n// Filter out any null or undefined values (if any node has missing data)\nurls = urls.filter(url => url);\n\n// Return the aggregated URLs as separate items for further processing\nreturn urls.map(url => ({ json: { url } }));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "c308fb96-1dcd-4dd0-816f-1e66920c182f",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        3060,
        520
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "50c97592-17a0-488a-8868-abd543e278a3",
      "name": "Delay-to-Avoid-Request-Per-Minute-Cap",
      "type": "n8n-nodes-base.wait",
      "position": [
        3460,
        540
      ],
      "parameters": {
        "amount": 15
      },
      "typeVersion": 1.1
    },
    {
      "id": "1f6af9b6-f79d-4d17-8bd3-6790645e15c3",
      "name": "Research Reporter",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "onError": "continueRegularOutput",
      "position": [
        4160,
        520
      ],
      "parameters": {
        "text": "=Well Done on the previous task. Now, we have a new search query and report task same format as before:\n\n{\n  \"task_overview\": {\n    \"objective\": \"Generate a detailed, data-driven report addressing the user's expert-level question regarding \"{{ $item(\"0\").$node[\"Webhook\"].json[\"query\"][\"Research Question\"] }}\", synthesizing insights from web search results and adding independent analysis.\",\n    \"context\": \"Use the provided placeholders that resolve into detailed text to construct a report tailored for an expert reader. This report must adhere to APA7 standards and be free from irrelevant or superficial content.\",\n    \"meta_reasoning\": [\n      {\n        \"step\": \"Identify the user\u2019s core question and its specific requirements.\",\n        \"action\": \"Focus only on data relevant to answering the question in depth.\",\n        \"justification\": \"This ensures alignment with the user's expertise and avoids sidetracking into unrelated content.\"\n      },\n      {\n        \"step\": \"Assess each content section for data-rich insights.\",\n        \"action\": \"Filter out filler or introductory sections; prioritize sections containing facts, arguments, or statistics.\",\n        \"justification\": \"This will reduce processing overload and enhance the clarity and depth of the report.\"\n      },\n      {\n        \"step\": \"Integrate findings logically and synthesize the information to draw well-supported conclusions.\",\n        \"action\": \"Organize findings to build a cohesive answer with original insights that directly address the question.\",\n        \"justification\": \"This process ensures that the report is valuable for expert analysis and avoids generic summarization.\"\n      }\n    ]\n  },\n  \"All-Inputs\": \"{{ $item(\"0\").$node[\"Code1\"].json[\"aggregated_text\"] }}\",\n  \"supplemental_info_2\": \"{{ $item('0').$node['Query 2 - Ranker'].json['output']['Information_extracted'] }}\",\n  },\n  \"analysis_instructions\": {\n    \"steps\": [\n      {\n        \"name\": \"Data Extraction and Filtering\",\n        \"description\": \"Extract key arguments, statistics, and conclusions. Disregard extraneous content to maintain focus.\",\n        \"min_requirements\": [\n          \"Extracted content must include core arguments, supporting evidence, and unique insights relevant to the user's question.\",\n          \"Each extraction should highlight essential points without unnecessary details.\"\n        ]\n      },\n      {\n        \"name\": \"Synthesis and Interpretation\",\n        \"description\": \"Combine insights across results, identifying patterns, contradictions, and novel insights. Provide a unified analysis based on the user\u2019s expert question.\",\n        \"min_requirements\": [\n          \"The analysis should be original, integrating data logically across sources.\",\n          \"Address any contradictions or alignments among sources to ensure depth.\",\n          \"Demonstrate a clear connection to the user\u2019s question, reflecting independent critical thought.\"\n        ]\n      },\n      {\n        \"name\": \"Citations and Formatting\",\n        \"description\": \"Adhere to APA7 citation standards, ensuring clear reference to sources with URLs and publication details.\",\n        \"min_requirements\": [\n          \"Each source in the report should have a clear in-text citation with APA7 format.\",\n          \"Use clear source titles and URLs for easy reference.\"\n        ]\n      }\n    ]\n  },\n  \"output_structure\": {\n    \"introduction\": {\n      \"content\": \"Introduce the topic and frame it according to the user\u2019s question.\",\n      \"min_requirements\": [\n        \"Should be clear, focused, and tailored to an expert audience.\",\n        \"Establish relevance to the main question quickly.\"\n      ]\n    },\n    \"findings\": {\n      \"content\": \"Organize findings by source, ensuring each result is summarized with data-rich insights.\",\n      \"min_requirements\": [\n        \"Each summary should present critical points concisely without general content.\",\n        \"Data should be directly relevant to the user's question, omitting background information.\"\n      ]\n    },\n    \"independent_analysis\": {\n      \"content\": \"Provide original interpretations by combining insights from all sources, identifying patterns and answering the user\u2019s question directly.\",\n      \"min_requirements\": [\n        \"Present independent analysis, synthesizing all sources into a cohesive answer.\",\n        \"Highlight patterns, unique insights, and alignments across data.\"\n      ]\n    },\n    \"conclusion\": {\n      \"content\": \"Summarize the main findings and suggest next steps or implications.\",\n      \"min_requirements\": [\n        \"Should be concise and directly relevant to the expert's question.\",\n        \"Offer any actionable recommendations or further points for exploration.\"\n      ]\n    }\n  },\n  \"audience_and_style\": {\n    \"audience\": \"Expert\",\n    \"style_requirements\": [\n      \"Use precise, technical language suitable for an expert audience.\",\n      \"Avoid superficial language or generalities; provide deep insights.\",\n      \"Include the data such as quantaitive data, incidents and events mentioned in the web results that are relevant to the user's question.\",\n      \"your answer should not be in json but in normal text, it must be at least 6 paragraphs of 150 words and 800 characters each to cover all scopes. It can be up to 12 paragraphs.\"\n    ]\n  }\n}\n",
        "messages": {
          "messageValues": [
            {
              "message": "={{ $item(\"0\").$node[\"Analyst Emulator\"].json[\"text\"] }}\n\nThe following task by user requires to realize the user's initial research question. Then realizing our two search quries we did and their top 3 web search result. \n\nYou as the analyst, follow a three chains of thughts of 5 steps to analyze each article, extract the most important details behind each and then based on your knowledge analyze the given data and insure we avoid biases and mis evaluiations. Remain confident and strong on your independent analysis leveraging your massive LLM based knowledge and domain specific expertise to realize the most important notes and your self made analysis. \n\n\nYour output must include the full answer of your ntoes, data from sources, tailored to advanced  reearch audience, and include a citation format of APA7, and the reference code urls at the end of the report.\n\n\nYour repot must be at least 500 words, strongly intellgient, avoid generic analysis, and ensaure adding details such numbers, references, events realzied from the web search results."
            },
            {
              "type": "HumanMessagePromptTemplate",
              "message": "{\n  \"task_overview\": {\n    \"objective\": \"Generate a detailed, data-driven report addressing the user's expert-level question, synthesizing insights from web search results and adding independent analysis.\",\n    \"context\": \"Use the provided placeholders that resolve into detailed text to construct a report tailored for an expert reader. This report must adhere to APA7 standards and be free from irrelevant or superficial content.\",\n    \"meta_reasoning\": [\n      {\n        \"step\": \"Identify the user\u2019s core question and its specific requirements.\",\n        \"action\": \"Focus only on data relevant to answering the question in depth.\",\n        \"justification\": \"This ensures alignment with the user's expertise and avoids sidetracking into unrelated content.\"\n      },\n      {\n        \"step\": \"Assess each content section for data-rich insights.\",\n        \"action\": \"Filter out filler or introductory sections; prioritize sections containing facts, arguments, or statistics.\",\n        \"justification\": \"This will reduce processing overload and enhance the clarity and depth of the report.\"\n      },\n      {\n        \"step\": \"Integrate findings logically and synthesize the information to draw well-supported conclusions.\",\n        \"action\": \"Organize findings to build a cohesive answer with original insights that directly address the question.\",\n        \"justification\": \"This process ensures that the report is valuable for expert analysis and avoids generic summarization.\"\n      }\n    ]\n  },\n  \"placeholders\": {\n    \"user_question\": \"What is the latest stock Market Analysis in mid-term?\",\n    \"initial_query\": \"(\"stock market analysis\" OR \"market outlook\" OR \"economic forecast\") AND ((\"recent\" OR \"current\" OR \"Q3 2024\" OR \"October 2024\" OR \"November 2024\") AND (site:wsj.com OR site:bloomberg.com OR site:ft.com))\",\n    \"initial_results\": [\n      {\n        \"link\": \"https://www.jpmorgan.com/insights/outlook/market-outlook/mid-year-outlook-key-takeaways\",\n        \"title\": \"2024 Mid-Year Outlook: Key Takeaways | J.P. Morgan\",\n        \"content\": \"<div>\n    <p>At mid-year 2024, surprise and opportunity are the hallmarks of this year's economic forecast. While doom and gloom predictions have recently seemed to dominate headlines, the actual story is one of resilience and growth. Many investors spent 2023 braced for a downturn, but the global economy ultimately showed remarkable strength. Higher incomes and low unemployment have supported consumer spending, and businesses have managed costs and pricing to convert these higher sales into healthy profits.</p>\n<p>Our <a href=\"https://www.chase.com/personal/investments/mid-year-outlook\" target=\"_blank\" title=\"mid-year-outlook\">2024 Mid-Year Outlook</a> dives into the reasons behind this economic stamina. By analyzing broad market trends and specific investor behaviors, we've uncovered insights that illuminate paths forward in this dynamic environment. From the surging potential of artificial intelligence (AI) in public equities to the hidden gems in private markets, this outlook is your guide to understanding where the real opportunities lie in the face of global uncertainties.</p>\n<h2></h2>\n<p>While living costs have stopped climbing as quickly as in previous years, inflation will likely remain above historical levels due to high labor demand supporting wage growth and limited housing availability supporting real estate prices. This new range of 2%\u20133% annual inflation won\u2019t be enough to prompt central bank interest rate hikes but will keep policymakers cautious. Bonds should continue to offer attractive absolute yields as long as economic growth persists and policy rates remain above inflation.</p>\n<h2></h2>\n<p>The technological revolution around AI is only just getting started. Jamie Dimon, JPMorgan Chase Chairman and CEO, has compared AI to huge historical advancements \u2013 such as the discovery of electricity and the invention of the internet. Integrating AI into various sectors will likely enhance productivity and output at unparalleled speed. In fact, rough early estimates show that if half of vulnerable jobs become automated through AI, the cumulative U.S. labor productivity benefits could equal nearly $5 trillion. The potential opportunity here is compelling.</p>\n<h2></h2>\n<p>Large corporations have demonstrated their ability to pass through rising supply costs to consumers to maintain profit margins. We expect continued earnings growth to support higher valuations. However, smaller companies with relatively higher debt loads face more challenges from rising interest rates and labor costs. However, this presents ample opportunity for active managers to identify quality small and mid-cap companies with the discipline to capitalize on the available economic opportunity.</p>\n<h2></h2>\n<p>For those looking into private investments, it may be a good time to offer liquidity where it is scarce. Private credit is compelling to us due to a higher demand for creative financing solutions. Additionally, the recent slowdown in initial public offerings and exits has increased secondary private equity transactions as funds seek liquidity. Purchasing discounted private equity allocations on the secondary market may offer an attractive way to diversify and potentially enhance returns. As always, investors should keep in mind the potential liquidity tradeoffs.</p>\n<h2></h2>\n<p>The upcoming U.S. presidential election offers a uniquely predictable backdrop for markets. However, neither leader is expected to tighten the fiscal purse strings, which may present longer-term economic challenges around the deficit. On the global stage, rising tensions could impact crucial commodity markets like oil and natural gas. However, the actual impact on living costs should be less dramatic, thanks to strategic reserves and robust production capabilities.</p>\n<h2></h2>\n<p>This year\u2019s investment landscape looks promising despite the swirl thanks to a backdrop of solid economic activity and manageable price increases. By understanding these broader trends and staying informed, investors can strategically position themselves to potentially take advantage of the opportunities that lie ahead in both public and private markets.</p>\n</div><div>\n    <p><b>IMPORTANT INFORMATION</b><br />\n</p>\n<p>This material is for informational purposes only, and may inform you of certain products and services offered by J.P.&nbsp;Morgan\u2019s wealth management businesses, part of JPMorgan Chase &amp; Co. (\u201cJPM\u201d).&nbsp;Products and services described, as well as associated fees, charges and interest rates, are subject to change in accordance with the applicable account agreements and may differ among geographic locations. Not all products and services are offered at all locations.&nbsp;If you are a person with a disability and need additional support accessing this material, please contact your J.P.&nbsp;Morgan team or email us at&nbsp;<a target=\"_blank\" href=\"mailto:user@example.com\">user@example.com</a>&nbsp;for assistance.&nbsp;Please read all Important Information.</p>\n<p>The price of equity securities may rise or fall due to the changes in the broad market or changes in a company's financial condition, sometimes rapidly or unpredictably. Equity securities are subject to \"stock market risk\" meaning that stock prices in general may decline over short or extended periods of time.\u200b</p>\n<p>Investment in alternative investment strategies is speculative, often involves a greater degree of risk than traditional investments including limited liquidity and limited transparency, among other factors and should only be considered by sophisticated investors with the financial capability to accept the loss of all or part of the assets devoted to such strategies.\u200b</p>\n<p>Private investments are subject to special risks. Individuals must meet specific suitability standards before investing. This information does not constitute an offer to sell or a solicitation of an offer to buy.&nbsp;As a reminder, hedge funds (or funds of hedge funds), private equity funds, real estate funds often engage in leveraging and other speculative investment practices that may increase the risk of investment loss.&nbsp;These investments can be highly illiquid, and are not required to provide periodic pricing or valuation information to investors, and may involve complex tax structures and delays in distributing important tax information.&nbsp;These investments are not subject to the same regulatory requirements as mutual funds; and often charge high fees. Further, any number of conflicts of interest may exist in the context of the management and/or operation of any such fund. For complete information, please refer to the applicable offering memorandum. Securities are made available through J.P.&nbsp;Morgan Securities LLC, Member FINRA, and SIPC, and its broker-dealer affiliates</p>\n<p>Bonds are subject to interest rate risk, credit and default risk of the issuer. Bond prices generally fall when interest rates rise</p>\n<p>Small capitalization companies typically carry more risk than well-established \"blue-chip\" companies since smaller companies&nbsp;can carry a higher degree of market volatility than most large cap and/or blue-chip companies.\u200b</p>\n</div>\"\n      },\n      {\n        \"link\": \"https://www.capitalgroup.com/advisor/insights/articles/2024-midyear-stock-market-outlook.html\",\n        \"title\": \"[undefined]\",\n        \"content\": \"[undefined]\"\n      },\n      {\n        \"link\": \"https://www.forbes.com/advisor/investing/stock-market-outlook-and-forecast/\",\n        \"title\": \"November 2024 Stock Market Forecast\",\n        \"content\": \"<p>\n    Editorial Note: We earn a commission from partner links on Forbes Advisor. Commissions do not affect our editors' opinions or evaluations.\n</p><div>\n                                <p>The S&amp;P 500 has resumed its march higher as strong first quarter earnings numbers have helped ease investor fears about inflation and a potentially delayed Federal Reserve pivot to interest rate cuts.</p>\n<p>In May, the S&amp;P 500 gained 4.2% despite concerns over slowing economic growth, weakening U.S. consumer sentiment and the possibility of stagflation ahead. The S&amp;P 500 is up 10% year-to-date as investors have shrugged off mixed economic data and now anticipate lower inflation, earnings growth acceleration and interest rate cuts in the second half of 2024.</p>\n<p>Investors are hoping the market can continue its bullish momentum in June as the S&amp;P 500 enters a three-month stretch that has historically been one of the best periods of the year for stocks.</p>\n<h3>Fed Pivot Delayed?</h3>\n<p>The two key market catalysts that have gotten the most headlines in the past year will remain front and center in June: inflation and interest rates.</p>\n<p>The <a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/cpi-consumer-price-index/\">consumer price index</a> gained 3.4% year-over-year in April, down from peak 2022 inflation levels of 9.1%, but still well above the Federal Reserve\u2019s 2% long-term target.</p>\n<p>In a speech to the Foreign Bankers\u2019 Association in May, Federal Reserve Chair Jerome Powell said the Federal Open Market Committee, or FOMC, never anticipated the path to 2% inflation would be easy.</p>\n<p>However, Powell admitted recent inflation readings have been \u201chigher than I think anybody anticipated\u201d and the Fed will need to be patient.</p>\n<p>\u201cI do think it\u2019s really a question of keeping policy at the current rate for longer than had been thought,\u201d he said.</p>\n<h3>Fed Decisions Are Affecting the Economy</h3>\n<p>The FOMC has maintained its target fed funds interest rate range at between 5.25% and 5.5% since July 2023, its highest target range since 2001.</p>\n<p>In his speech, Powell said it is unlikely the Fed will need to raise interest rates further but the appropriate path forward will instead be to continue to hold interest rates at current levels for an extended period of time.</p>\n<p>Bill Adams, chief economist for Comerica Bank, says the recently revised first-quarter U.S. gross domestic product, or GDP, growth estimate of just 1.3% suggests the Fed\u2019s restrictive monetary policy measures are having a definitive impact on the economy.</p>\n<p>\u201cThe downward revision to economic growth as well as smaller downward revisions to inflation make the Fed a little more likely to start reducing interest rates by September,\u201d Adams says.</p>\n<p>He says high interest rates are weighing on consumer durable goods spending and multifamily residential investment.</p>\n<p>\u201cA cooler economy is limiting businesses\u2019 ability to raise prices, which will help slow inflation in the second half of the year,\u201d Adams says.</p>\n<p>The bond market is currently pricing in a 98.7% chance the Fed will maintain its current fed funds target rate range of between 5.25% and 5.5% at its June meeting, according to CME Group.</p>\n<h3>U.S. Recession Watch</h3>\n<p>For over a year, economists and investors have been fearful that elevated interest rates and tight monetary policies could tip the U.S. economy into a recession. U.S. consumers seem healthy for now, but the Fed is reaching a critical point in its battle against inflation.</p>\n<p>The next couple of months could determine whether the FOMC can navigate a so-called soft landing for the U.S. economy without tipping it into a recession.</p>\n<p>The U.S. Treasury yield curve has been inverted since mid-2022, a historically strong recession indicator. The New York Fed\u2019s recession probability model suggests there is still a 50% chance of a U.S. recession sometime within the next 12 months.</p>\n<p>The U.S. labor market has softened but isn\u2019t yet showing signs a recession is imminent. The Labor Department reported:</p>\n<ul>\n<li>The U.S. economy added 175,000 jobs in April, missing economist estimates of 240,000 jobs added.</li>\n<li>U.S. wages were up 3.9% year-over-year, and the unemployment rate remains historically low at just 3.9%.</li>\n</ul>\n<h3>Corporate Profits May Be More Important to Investors</h3>\n<p>A cooling labor market, slowing economic growth and softening consumer spending may seem like a concerning combination for investors, but these indicators could be positive news for the Fed that inflation may soon be trending steadily lower once again.</p>\n<p>Chris Zaccarelli, chief investment officer at Independent Advisor Alliance, says investors shouldn\u2019t be too focused on the interest rate outlook that they lose sight of what truly matters\u2014the economy.</p>\n<p>\u201cWe have long been of the belief that it is the economy that is most important, and not lower interest rates for the sake of propping up stock prices,\u201d Zaccarelli says.</p>\n<p>He anticipates the FOMC will opt not to cut interest rates for most\u2014if not all\u2014of 2024 but says a delayed pivot to rate cuts may not derail the bull market rally.</p>\n<p>\u201cAll things being equal, the economy is likely to stay out of [a] recession if interest rates are lower than they are now, but ultimately it is the economic expansion\u2014and continuation of corporate profits\u2014that are the most important thing in the medium and long term, even if asset prices would get a quick boost just from the lowering of interest rates,\u201d Zaccarelli says.</p>\n<h3>First-Quarter Earnings</h3>\n<p>High interest rates increase borrowing costs for consumers and corporations, weighing on economic growth and profitability.</p>\n<p>Fortunately, <a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/what-is-sp-500/\">S&amp;P 500</a> companies have reported better-than-expected first-quarter earnings growth of 6% year-over-year, and they have remained resilient in a difficult inflationary environment. In fact, the S&amp;P 500 is on track for its best quarter of earnings growth since the first quarter of 2022.</p>\n<p>Some market sectors are experiencing more of an earnings bounce than others:</p>\n<ul>\n<li>The <a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/best-communications-stocks/\">communication services sector</a> has reported the highest year-over-year first-quarter earnings growth at 33.9% followed by the <a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/best-utilities-stocks/\">utilities sector</a> at 33.4%.</li>\n<li>The <a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/best-materials-stocks/\">materials sector</a>, <a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/best-healthcare-stocks/\">healthcare sector</a> and <a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/best-energy-stocks/\">energy sector</a> earnings are each down more than 20% in the quarter.</li>\n</ul>\n<p>Looking ahead to second quarter reports, analysts are calling for:</p>\n<ul>\n<li>S&amp;P 500 earnings to increase 9.3% compared to a year ago</li>\n<li>S&amp;P 500 earnings growth to accelerate in the second half of the year</li>\n<li>Full-year S&amp;P 500 earnings growth of 11.4% in 2024</li>\n<li>Full-year S&amp;P 500 revenue growth of 5% in 2024</li>\n</ul>\n<p>DataTrek Research co-founder Nicholas Colas says the 2024 stock market rally is not just about this year but about the outlook for 2025 and 2026 as well.</p>\n<p>\u201cMarkets are convinced that U.S. large cap companies will see many years (not just one) of improving earnings. Earnings for 2024 only have to come through slightly better than last year, and nothing occurs on the macro side (economic growth, geopolitics) to derail further earnings growth in 2025 and 2026,\u201d Colas says.</p>\n<h3>How To Invest in June</h3>\n<p>While the economic outlook remains uncertain, there are reasons for investors to be optimistic in June and beyond.</p>\n<p>Since 1950, the S&amp;P 500 has averaged a 1.3% gain in June during U.S. election years. Summer election-year stock market strength has historically continued through August before markets tend to cool in September and October leading up to Election Day.</p>\n<p>The S&amp;P 500 has also historically performed very well in the second half of election years under a first-term president, such as current President Joe Biden.</p>\n<p>Investors concerned about the potential for a U.S. economic slowdown or election-related volatility can take a more defensive approach to the market and increase their financial flexibility by dialing back exposure to stocks and increasing their cash holdings.</p>\n<p>Investors can already earn 5% or higher in <a target=\"_blank\" href=\"https://www.forbes.com/advisor/banking/savings/best-high-yield-savings-accounts/\">online savings accounts</a> heading into June, and those interest rates will likely remain elevated for at least the next several months.</p>\n<p><a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/what-are-value-stocks/\">Value stocks</a> have historically outperformed <a target=\"_blank\" href=\"https://www.forbes.com/advisor/investing/growth-stocks/\">growth stocks</a> when interest rates are high, but that trend reversed in 2024 as investors anticipate a Fed pivot to rate cuts in the second half of the year. The Vanguard Value ETF (VTV) has generated a total return of just 6.3% year-to-date, while the Vanguard Growth ETF (VUG) has generated a total return of 14.7%.</p>\n<p>The communications services sector has been the best-performing S&amp;P 500 sector of 2024 thus far, led by top performing stocks Netflix (NFLX) and Meta Platforms (META).</p>\n<p>Adam Turnquist, chief technical strategist for LPL Financial, says historical market performance since 1950 suggests there\u2019s no good reason for investors to \u201csell in May and go away\u201d this year.</p>\n<p>\u201cFor the remainder of the year, the S&amp;P 500 has posted respective average and median returns of 4.9% and 6.4% after May,\u201d Turnquist says.</p>\n                            </div>\"\n      }\n    ],\n    \"supplemental_info_1\": \"J.P. Morgan's Mid-Year Outlook highlights surprisingly strong growth despite a fragile geopolitical backdrop. Capital Group's outlook points to three themes for a broadening market, underpinned by healthy consumer spending and robust corporate earnings. Forbes Advisor's outlook mentions full-year S&P 500 revenue growth of 5% in 2024 and considers the outlook for 2025 and 2026.\",\n    \"secondary_query\": \"\"mid-year 2024 stock market outlook\" OR \"stock market analysis next 6-12 months\" site:*.com -site:morningstar.com\",\n    \"secondary_results\": [\n      {\n        \"link\": \"https://am.jpmorgan.com/us/en/asset-management/adv/insights/market-insights/investment-outlook/\",\n        \"title\": \"Mid-Year Investment Outlook for 2024\",\n        \"content\": \"<div>\n            <div><div>\n      <figure>\n        <div>\n            <picture>\n              <source media=\"(max-width: 767px)\"></source>\n              <source media=\"(min-width: 768px)\"></source>\n              <img src=\"https://cdn.jpmorganfunds.com/content/dam/jpm-am-aem/global/en/insights/market-insights/myo-chart-images-2024/U.S.%20Economy.png\" alt=\"U.S. Economy\" />\n            </picture>\n        </div>\n      </figure>\n</div>\n<div>\n\t<p><b><span>The U.S. economy looks set to see a continuing gradual moderation in economic growth, jobs and inflation, providing a rising tide to support most long-term risk assets.</span></b></p>\n</div>\n</div>\n            <div><div>\n      <figure>\n        <div>\n            <picture>\n              <source media=\"(max-width: 767px)\"></source>\n              <source media=\"(min-width: 768px)\"></source>\n              <img src=\"https://cdn.jpmorganfunds.com/content/dam/jpm-am-aem/global/en/insights/market-insights/myo-chart-images-2024/Election%20image.jpg\" alt=\"Election image\" />\n            </picture>\n        </div>\n      </figure>\n</div>\n<div>\n\t<p><b><span>After a stretch of strong investment returns, the 2024 presidential election adds an extra element of uncertainty for investors.</span></b></p>\n</div>\n</div>\n            <div><div>\n      <figure>\n        <div>\n            <picture>\n              <source media=\"(max-width: 767px)\"></source>\n              <source media=\"(min-width: 768px)\"></source>\n              <img src=\"https://cdn.jpmorganfunds.com/content/dam/jpm-am-aem/global/en/insights/market-insights/myo-chart-images-2024/International%20Economy%20image.png\" alt=\"International Economy image\" />\n            </picture>\n        </div>\n      </figure>\n</div>\n<div>\n\t<p><b><span>International economic data have begun to inflect upwards, with further room to run given still below trend consumption and lower inflation. Positive economic surprises suggest peak pessimism about international. More progress in disinflation in some corners mean some central banks moving before the Fed, keeping the dollar elevated.</span></b></p>\n</div>\n</div>\n            <div><div>\n      <figure>\n        <div>\n            <picture>\n              <source media=\"(max-width: 767px)\"></source>\n              <source media=\"(min-width: 768px)\"></source>\n              <img src=\"https://cdn.jpmorganfunds.com/content/dam/jpm-am-aem/global/en/insights/market-insights/myo-chart-images-2024/Fixed%20Income%20image.png\" alt=\"Fixed Income image\" />\n            </picture>\n        </div>\n      </figure>\n</div>\n<div>\n\t<p><b><span>Given the swift repricing in policy rate expectations that occurred in the first half of the year, we expect long term interest rates to generally stabilize for the remainder of this year. However, given the shallow path of expected rate reductions in the years ahead, the yield curve is likely to remain inverted for some time, suggesting active management around duration and credit are key.</span></b></p>\n</div>\n</div>\n            <div><div>\n      <figure>\n        <div>\n            <picture>\n              <source media=\"(max-width: 767px)\"></source>\n              <source media=\"(min-width: 768px)\"></source>\n              <img src=\"https://cdn.jpmorganfunds.com/content/dam/jpm-am-aem/global/en/insights/market-insights/myo-chart-images-2024/U.S.%20Equities%20image.png\" alt=\"U.S. Equities image\" />\n            </picture>\n        </div>\n      </figure>\n</div>\n<div>\n\t<p><b><span>After a strong run in U.S. equities, the backdrop remains supported by healthy earnings growth, increased investment in AI and a wave of buyback announcements. Opportunities remain, but valuations are not cheap and return expectations should be more modest from here.</span></b></p>\n</div>\n</div>\n            <div><div>\n      <figure>\n        <div>\n            <picture>\n              <source media=\"(max-width: 767px)\"></source>\n              <source media=\"(min-width: 768px)\"></source>\n              <img src=\"https://cdn.jpmorganfunds.com/content/dam/jpm-am-aem/global/en/insights/market-insights/myo-chart-images-2024/International%20equities%20image.png\" alt=\"International equities image\" />\n            </picture>\n        </div>\n      </figure>\n</div>\n<div>\n\t<p><b><span>U.S. concentration within global equities is extreme, but other markets have begun to catch up. A positive cyclical turn, combined with structural tailwinds and cheap valuations, suggest more strong performance to come, with more of a broadening out by company and region than seen thus far.</span></b></p>\n</div>\n</div>\n            <div><div>\n      <figure>\n        <div>\n            <picture>\n              <source media=\"(max-width: 767px)\"></source>\n              <source media=\"(min-width: 768px)\"></source>\n              <img src=\"https://cdn.jpmorganfunds.com/content/dam/jpm-am-aem/global/en/insights/market-insights/myo-chart-images-2024/Alternatives%20Image.png\" alt=\"Alternatives Image\" />\n            </picture>\n        </div>\n      </figure>\n</div>\n<div>\n\t<p><b><span>Through diversification, inflation protection and alpha generation, opportunities in alternatives can help better prepare portfolios for challenges that may lie ahead.</span></b></p>\n</div>\n</div>\n            <div><div>\n      <figure>\n        <div>\n            <picture>\n              <source media=\"(max-width: 767px)\"></source>\n              <source media=\"(min-width: 768px)\"></source>\n              <img src=\"https://cdn.jpmorganfunds.com/content/dam/jpm-am-aem/global/en/insights/market-insights/myo-chart-images-2024/Asset%20Allocation%20image.png\" alt=\"Asset Allocation image\" />\n            </picture>\n        </div>\n      </figure>\n</div>\n<div>\n\t<p><b><span>Despite significant uncertainty, the outlook for the rest of 2024 remains constructive, though investors would do well to broadly diversify across high-quality assets.</span></b></p>\n</div>\n</div>\n    </div>\"\n      },\n      {\n        \"link\": \"https://www.blackrock.com/us/individual/insights/blackrock-investment-institute/outlook\",\n        \"title\": \"2024 Q4 Investment Outlook | BlackRock\",\n        \"content\": \"<div> <p><strong>General disclosure: </strong>This material is intended for information purposes only, and does not constitute investment advice, a recommendation or an offer or solicitation to purchase or sell any securities to any person in any jurisdiction in which an offer, solicitation, purchase or sale would be unlawful under the securities laws of such jurisdiction. The opinions expressed are as of <span>October 2024</span>, and are subject to change without notice. Reliance upon information in this material is at the sole discretion of the reader. Investing involves risks. This information is not intended to be complete or exhaustive and no representations or warranties, either express or implied, are made regarding the accuracy or completeness of the information contained herein. This material may contain estimates and forward-looking statements, which may include forecasts and do not represent a guarantee of future performance.</p>\n</div><div> <p>In the <strong>U.S. and Canada</strong>, this material is intended for public distribution. <strong>In EMEA</strong>, in the UK and Non-European Economic Area (EEA) countries: this is Issued by BlackRock Investment Management (UK) Limited, authorised and regulated by the Financial Conduct Authority. Registered office: 12 Throgmorton Avenue, London, EC2N 2DL. Tel: + 44 (0)20 7743 3000. Registered in England and Wales No. 02020394. For your protection telephone calls are usually recorded. Please refer to the Financial Conduct Authority website for a list of authorised activities conducted by BlackRock. In the European Economic Area (EEA): this is Issued by BlackRock (Netherlands) B.V. is authorised and regulated by the Netherlands Authority for the Financial Markets. Registered office Amstelplein 1, 1096 HA, Amsterdam, Tel: 020 \u2013 549 5200, Tel: 31-20-549-5200. Trade Register No. 17068311 For your protection telephone calls are usually recorded. <strong>In Italy, </strong>for information on investor rights and how to raise complaints please go to&nbsp;<a href=\"https://www.blackrock.com/corporate/compliance/investor-right\" target=\"_blank\" title=\"Click here to know more about Investors rights\">https://www.blackrock.com/corporate/compliance/investor-right</a>&nbsp;available in Italian. <strong>In Switzerland</strong>, for qualified investors in Switzerland: This document is marketing material. Until 31 December 2021, this document shall be exclusively made available to, and directed at, qualified investors as defined in the Swiss Collective Investment Schemes Act of 23 June 2006 (\u201cCISA\u201d), as amended. From 1 January 2022, this document shall be exclusively made available to, and directed at, qualified investors as defined in Article 10 (3) of the CISA of 23 June 2006, as amended, at the exclusion of qualified investors with an opting-out pursuant to Art. 5 (1) of the Swiss Federal Act on Financial Services (\"FinSA\"). For information on art. 8 / 9 Financial Services Act (FinSA) and on your client segmentation under art. 4 FinSA, please see the following website: www.blackrock.com/finsa <strong>For investors in Israel: </strong>BlackRock Investment Management (UK) Limited is not licensed under Israel\u2019s Regulation of Investment Advice, Investment Marketing and Portfolio Management Law, 5755-1995 (the \u201cAdvice Law\u201d), nor does it carry insurance thereunder. <strong>In South Africa</strong>, please be advised that BlackRock Investment Management (UK) Limited is an authorized financial services provider with the South African Financial Services Board, FSP No. 43288. <strong>In the DIFC</strong><strong> </strong>this material can be distributed in and from the Dubai International Financial Centre (DIFC) by BlackRock Advisors (UK) Limited \u2014 Dubai Branch which is regulated by the Dubai Financial Services Authority (DFSA). This material is only directed at 'Professional Clients\u2019 and no other person should rely upon the information contained within it. Blackrock Advisors (UK) Limited - Dubai Branch is a DIFC Foreign Recognised Company registered with the DIFC Registrar of Companies (DIFC Registered Number 546), with its office at Unit 06/07, Level 1, Al Fattan Currency House, DIFC, PO Box 506661, Dubai, UAE, and is regulated by the DFSA to engage in the regulated activities of \u2018Advising on Financial Products\u2019 and \u2018Arranging Deals in Investments\u2019 in or from the DIFC, both of which are limited to units in a collective investment fund (DFSA Reference Number F000738). <strong>In the Kingdom of Saudi Arabia, </strong>issued in the Kingdom of Saudi Arabia (KSA) by BlackRock Saudi Arabia (BSA), authorised and regulated by the Capital Market Authority (CMA), License No. 18-192-30. Registered under the laws of KSA. Registered office: 7976 Salim Ibn Abi Bakr Shaikan St, 2223 West Umm Al Hamam District Riyadh, 12329 Riyadh, Kingdom of Saudi Arabia, Tel: +1234567890. CR No, 1010479419. The information contained within is intended strictly for Sophisticated Investors as defined in the CMA Implementing Regulations. Neither the CMA or any other authority or regulator located in KSA has approved this information. <strong>In the United Arab Emirates</strong> this material is only intended for -natural Qualified Investor as defined by the Securities and Commodities Authority (SCA) Chairman Decision No. 3/R.M. of 2017 concerning Promoting and Introducing Regulations. Neither the DFSA or any other authority or regulator located in the GCC or MENA region has approved this information. <strong>In the State of Kuwait</strong>,<strong> </strong>those who meet the description of a Professional Client as defined under the Kuwait Capital Markets Law and its Executive Bylaws. <strong>In the Sultanate of Oman</strong>,<strong> </strong>to sophisticated institutions who have experience in investing in local and international securities, are financially solvent and have knowledge of the risks associated with investing in securities. In <strong>Qatar</strong>, for distribution with pre-selected institutional investors or high net worth investors. <strong>In the Kingdom of Bahrain</strong>, to Central Bank of Bahrain (CBB) Category 1 or Category 2 licensed investment firms, CBB licensed banks or those who would meet the description of an Expert Investor or Accredited Investors as defined in the CBB Rulebook. The information contained in this document, does not constitute and should not be construed as an offer of, invitation, inducement or proposal to make an offer for, recommendation to apply for or an opinion or guidance on a financial product, service and/or strategy. <strong>In Singapore</strong>, this is issued by BlackRock (Singapore) Limited (Co. registration no. 200010143N). This advertisement or publication has not been reviewed by the Monetary Authority of Singapore. <strong>In Hong Kong</strong>, this material is issued by BlackRock Asset Management North Asia Limited and has not been reviewed by the Securities and Futures Commission of Hong Kong. <strong>In South Korea</strong>, this material is for distribution to the Qualified Professional Investors (as defined in the Financial Investment Services and Capital Market Act and its sub-regulations). <strong>In Taiwan</strong>, independently operated by BlackRock Investment Management (Taiwan) Limited. Address: 28F., No. 100, Songren Rd., Xinyi Dist., Taipei City 110, Taiwan. Tel: (02)23261600. <strong>In Japan</strong>, this is issued by BlackRock Japan. Co., Ltd. (Financial Instruments Business Operator: The Kanto Regional Financial Bureau. License No375, Association Memberships: Japan Investment Advisers Association, the Investment Trusts Association, Japan, Japan Securities Dealers Association, Type II Financial Instruments Firms Association.) For Professional Investors only (Professional Investor is defined in Financial Instruments and Exchange Act). <strong>In Australia</strong>, issued by BlackRock Investment Management (Australia) Limited ABN 13 006 165 975 AFSL 230 523 (BIMAL). The material provides general information only and does not take into account your individual objectives, financial situation, needs or circumstances.<strong> </strong><strong>In New Zealand</strong>,<strong>&nbsp;</strong>issued by BlackRock Investment Management (Australia) Limited ABN&nbsp;13 006 165 975, AFSL 230 523 (BIMAL) for the exclusive use of the recipient, who warrants by receipt of this material that they are a wholesale client as defined under the New Zealand Financial Advisers Act 2008. <strong>In China</strong>, this material may not be distributed to individuals resident in the People\u2019s Republic of China (\u201cPRC\u201d, for such purposes, not applicable to Hong Kong, Macau and Taiwan) or entities registered in the PRC unless such parties have received all the required PRC government approvals to participate in any investment or receive any investment advisory or investment management services. <strong>For Other APAC Countries</strong>, this material is issued for Institutional Investors only (or professional/sophisticated /qualified investors, as such term may apply in local jurisdictions). <strong>In Latin America</strong>, no securities regulator within Latin America has confirmed the accuracy of any information contained herein. The provision of investment management and investment advisory services is a regulated activity in Mexico thus is subject to strict rules. For more information on the Investment Advisory Services offered by BlackRock Mexico please refer to the Investment Services Guide available at <a href=\"http://www.blackrock.com/mx\" target=\"_blank\" title=\"Click here to visit Mexico home page\">www.blackrock.com/mx</a></p>\n</div>\"\n      },\n      {\n        \"link\": \"https://www.jpmorgan.com/insights/global-research/outlook/mid-year-outlook\",\n        \"title\": \"The Market Outlook at Mid-Year | J.P. Morgan Research \",\n        \"content\": \"<div>\n                            <p><b>The market outlook at mid-year: A long road to normal</b><b>[Music]<p>\nSam Azzarello:</p></b> Welcome to Research Recap on J.P.&nbsp;Morgan's Making Sense podcast. I'm Sam Azzarello and I lead content strategy for global research here at J.P.&nbsp;Morgan. Today, I'm joined by a few of my colleagues to discuss our 2024 mid-year outlook. Throughout this episode we'll be discussing the key happenings that have shaped 2024 so far and what lies ahead for the economy and markets in the second half of the year. So with that, let's dive right in. To kick things off, we'll hear from Bruce Kasman, our Chief Global Economist. Bruce, thanks so much for being here today.<br />\n<b><br />\nBruce Kasman:</b> Thanks for having me.<br />\n<b><br />\nSam Azzarello:</b> So Bruce, what\u2019s the outlook for the global economy at mid-year?<br />\n<b><br />\nBruce Kasman:</b> The key point to our outlook is that the global economy is moving on to a more sustainable path as it becomes less dependent on the United States, and the base of growth is broadening. At the same time, we think that we're seeing the progress in terms of bringing inflation back down to Central Bank targets pretty much stall here. Not at an unusually high level, but still at levels that are comfortable for Central Banks. And as a result of these two points, we think that the environment is still consistent with a limited window for Central Bank easing, and effectively that we live in a high for long environment for a considerable period of time.<br />\n<b><br />\nSam Azzarello:</b> That's very interesting. Thank you for that. As you look to the second half of the year and beyond, what are some factors you and your team will be keeping an eye on?<br />\n<b><br />\nBruce Kasman:</b> Well, as we look to the second half of the year and beyond, I think what's interesting is that performance has been more or less in line with what we expected in the first half, but there's some underlying performance gaps that really do still challenge our view. On the growth side, I think one issue is that while consumer purchasing power has been lifted by falling inflation and by still pretty strong wage gains, consumer confidence has remained depressed. The balance of those forces has left a pretty sluggish consumer. I think a second performance gap reflects the fact that profits have been sluggish, even though margins for corporations have remained high. And that's left us with a corporate sector that's remained in expansion mode, but not decisively so. On the inflation side, labor markets have been tight, but have shown somewhat better balance, particularly in the US, where the unemployment rate has come up. And as well, we've seen some reduction in vacancies in other measures of labor market tightness. Our forecast continues to be that we stay sticky on inflation, we stay resilient on growth. We're comfortable with that, but there clearly are some things we need to see. And I think from my point of view, the biggest determinant of what is gonna happen in the next six or nine months is the behavior of businesses. And if we're right, businesses stay in that expansion mode. And I would argue that if that's the case, then the right way to look at the sluggish consumer is give them jobs and they will spend.</p>\n<p><b>Sam Azzarello:</b> And finally, Bruce, what are some of the biggest uncertainties as we go forward?<br />\n<b><br />\n Bruce Kasman:</b> Well, I think there's at least two uncertainties we should focus on. One is the continued elevated interest rate environment that contrasts with what are financial conditions that have actually been easing broadly this year. This is somewhat uncharted territory in terms of how it influences the outlook going forward. And I think it is something which adds uncertainty, as companies do face higher borrowing costs, as balance sheets are adjusting to higher interest rates, but we're seeing equity markets reach record highs. We're seeing the spread markets and credit more generally behave well, and capital is flowing to key emerging markets at this point in time. The second thing, of course, is the political environment, which has a number of uncertainties around elections. Perhaps the biggest one is the US election in November. We think the most important risk around the election would be the resumption of a trade war, which in 2018/'19 actually had a significant negative impact on business confident, had an effect on depressing business spending, capital spending particularly. And if we entered in another one, we're almost certainly gonna see retaliatory action elsewhere. And the potential negatives for that on growth, we think overwhelms some other things that might be happening in the US, perhaps on fiscal policy and the regulatory front.</p>\n<p><b>Sam Azzarello:</b> Yes. I expect that the US election will be a reocurring theme as we continue to hear from our colleagues throughout this podcast. Bruce, thank you so much for sharing your insights.<br />\n<b><br />\n Bruce Kasman:</b> Thank you.</p>\n<p><b>Sam Azzarello:</b> Next up, we have Mislav Matejka, Head of Global Equity Strategy. So Mislav, what are some of the key factors for the equities market at mid-year?</p>\n<p><b>Mislav Matejka:</b> The key for the outlook is really this trade off between growth and policy. In the first half of the year, there was a positive trade-off. The expectation was that central banks will be easing for the right reasons for the falling inflation. And at the same time, the view was that the improvement in financing conditions on the back of this easing will help spur the growth into the second half. And that's why the markets were doing fine in the first half. Now, there was no easing by the key central bank, the fed, so far. For the second half, we do think there could be some easing, but the issue is that it's not going to be preemptive and proactive for the inflation falling reasons. It might be reactive, and really for the reason of growth, disappointing. And that brings into question the earnings delivery because the expectations are quite high for second half. So this trade off of higher for longer central banks and easing only for the growth disappointment reason. But on the other side, how are we going to get the earnings delivery, which is expected to be very high? And then the starting point to all this is not anymore that people are under invested or people are scared or hedged or away from the market. The starting point is low volatility, low spreads, high positioning, and that kind of models the trade-off for the equity market.<br />\n<b><br />\n Sam Azzarello:</b> Thank you for that. What are some things you'll be keeping an eye on as we head into the second half of the year?</p>\n<p><b>Mislav Matejka:</b> For the second half, we are going to pay attention to politics. The US elections will be quite critical on many fronts. Trade, geopolitics tariffs. We also need to see how the latest French elections will play out as we go through the year. And then the question is really over the leadership in the equity market. So far the equity market was very one sided, very narrow. The question is, will there be broadening? And we have started the year long growth style long, large gaps. There are some opportunities in second half, to play some of the rotations, but I think that would be important for investors, the leadership in the equity market.<br />\n<b><br />\n Sam Azzarello:</b> And finally, what are some of the themes you will be watching going forward?</p>\n<p><b>Mislav Matejka:</b> In terms of the themes, what we are gonna be looking at is profit margins. Companies basically benefited from COVID distortions. Their profitability improved, their top line was very strong, mix was very strong. Is that sustainable? Is that a steady state? Can companies continue to deliver also the credit market. So far, credit market was very, very benign, and that fed into the equity valuations. The question is, is that going to continue as well.</p>\n<p><b>Sam Azzarello:</b> Mislav, thank you for your time and insights.<br />\n<b><br />\n Sam Azzarello:</b> Now let's hear from Meera Chandan, Co-Head of Global FX Strategy. So Meera, what are the key points to focus on in the FX market in the second half of 2024?<br />\n<b><br />\n Meera Chandan:</b> Two key points to focus on. The first one is the broad dollar. The expectation is that the dollar should stay strong, if not get stronger from current levels. The straightforward explanation for that is that the rest of the world is really not offering much in terms of yield or growth to incentivize investors away from the dollar. The dollar currently yields more than half of the currencies globally. And even by virtue of doing nothing at all, it's gaining ground because the Feds are not cutting as we speak, but other centrals banks are. So that is a growing yield advantage that the dollar has. And the second is that the growth advantage is also quite intact because we're coming off of very strong growth levels. Data is moderating in, in the US, but it is coming off very strong levels. So we shouldn't really expect to see massive amount of dollar weakness in this environment particularly when it looks like the growth pickup outside the US is also softening once again. The latest set of PMIs from Europe, for example, disappointed, which I think the next number will be quite key. China data has also been pretty fragile. So overall, not a lot of competing growth and yield alternatives for the dollar, which is why we're bullish. As far as the second thing is concerned, it's going to be about yield compression. 80% of central banks will be cutting rates at some point this year. And what that means is that investors who were engaging in yield seeking behavior last couple of years, carry was the main theme as a result of that, that is now going to slowly fade away. And certainly, as the year goes on and as the Fed is able to participate in this easing cycle, I think that, that particular effect should snowball.</p>\n<p><b>Sam Azzarello:</b> Thanks for that. What are some factors that you and the FX team are considering as we head into the second half of the year?</p>\n<p><b>Meera Chandan:</b> Lots of challenges for FX in the second half. I'd say the first one is that FX usually tends to be about divergences. This year, 80% of central banks will be cutting rates, so it's really more about policy convergence, it's not that much differentiation. So what this means is that you really have to put a lot of effort into identifying what other drivers of currencies could emerge. And we think the growth outlook, the relative terms of trade, is gonna be more relevant drivers of currencies. Carry is gonna recede as theme. I think the second challenge is going to be around the US elections. That's certainly the biggest event in the second half and I think there's a lot of uncertainty in terms of what that might bring. But it's fair to say that in certain cases the trade policy as well as the policy on Ukraine and Russia is probably gonna be dollar positive. So that's yet another thing that adds to the dollar advantage going into this key event.</p>\n<p><b>Sam Azzarello:</b> Meera, thanks for sharing your views with us.<br />\n<b><br />\n Sam Azzarello:</b> And now for a look at rates, let's turn to Jay Barry, out Co-Head of US Rate Strategy. Jay, can you walk us through your expectations for US rates and the fixed income markets as we head into the second half of the year?<br />\n<b><br />\n Jay Barry:</b> So, we think it's very important to note that the Fed's been on hold now for, for just about a year, and that's one of the longer on hold periods we've seen over the last 30 years. But we see a pathway for the Fed to start lowering rates in the second half, in the fall, because consumption is slowing, because labor markets are loosening, and we do see a pathway for the disinflationary process to return. And that has typically been supportive of yields moving lower and yield curves steepening. So I think it's important to note that we think that the peak for yields has been put in earlier this year and that there is a pathway to lower yields. We think it's more than likely that yields will be range bound for the next few months before resuming their descent much later this year. And this really presents a challenge for investors, because ordinarily, even looking at shallow raising cycles like we've seen in 1995 and 2019, yields have declined pretty aggressively heading into the first cut. Whereas this time around we're already pricing in 150 basis points of cuts over the next six months, so we think it will be important for investors to choose location when they're trying to add duration, given how much is already priced in for the Fed for the balance of this year as well as for 2025.<br />\n<b><br />\n Sam Azzarello:</b> Jay, this is a question we're asking all of our analysts on the podcast, what's changed from the first half of the year versus the second half of the year?<br />\n<b><br />\n Jay Barry:</b> So, the first half of the year was dominated by upside prints to inflation, upside prints to growth, and consistent revisions higher, which brought the markets to revise their Fed forecast from a Fed that was likely to start easing in the spring and ease aggressively to now one that is likely to ease later this year. But we think that we're probably past the peak of growth and inflation revisions because we've seen evidence that consumption is slowing, and we think the disinflationary process, which had become halting in the first half, will start to resume in the second half of this year. So the market was very hawkish with respect to its expectations for the Fed in the first half, but we expect it to be slightly more dovish for the second half.</p>\n<p><b>Sam Azzarello:</b> And final question for you, what are some key themes you'll be watching going forward?<br />\n<b><br />\n Jay Barry:</b> So, certainly trying to get a sense of exactly how decisively the labor market is slowing. Because we've seen that initial jobless claims have begun to move higher over the last couple of months, but so far it seems that the move higher has been for more benign reasons than for layoffs. If we get a sense that they're picking up more aggressively, that might be important because it could lead the markets to price in an earlier set of Fed cuts, a more aggressive pace and a lower terminal rate, which would probably present some downside risk to our Treasury forecast for the balance of this year. So that's one key factor that we're certainly watching. We're also watching the presidential election and the potential that it's got for the fiscal impact. And then we're watching supply and demand, because the Treasury market we think is pivoting away from support from largely price insensitive investors, like the Fed and foreign investors in US banks, towards more price sensitive investors. And against the backdrop of what is very heavy Treasury supply, we think this should lend itself towards a slow creep higher to term premium over time and, and higher yield curves, steeper yield curves. So we're watching supply and demand dynamics as well.</p>\n<p><b>Sam Azzarello:</b> Fantastic. Jay, thanks for that.<br />\n<b><br />\n Jay Barry:</b> Thanks so much for having me.</p>\n<p><b>Sam Azzarello:</b> And next we'll be hearing about international rates. Fabio Bassi, Head of European Rate Strategy joins us. Fabio, What are some of the key points in your outlook that you think are especially pertinent to clients?</p>\n<p><b>Fabio Bassi:</b> Clients should be aware that the second half of the year will be where central bank will start cutting rates. The title of our outlook was Not an Easy Easing Cycle, indicating the challenges of central banks. However, we have more conviction in terms of the disinflation process that is taking place. What are the central banks, ex-US, that are going to cut this year? We expect the Bank of England, the RBNZ and the Norges Bank to join the ECB and the Riksbank that already started cutting rates in the first half of the year. Is the market already pricing this cutting cycle? Not fully, and that's the reason why we see value in long duration. The market where we feel strongly in terms of the long duration is probably the euro area where the market is not pricing a terminal rate in line with our forecast. In terms of target, we expect the yields to move lower.</p>\n<p><b>Sam Azzarello:</b> Fabio, are there any dynamics you would outline that have changed from the first half of the year as we move into the second half of the year?</p>\n<p><b>Fabio Bassi:</b> The first half of the year was very sticky in terms inflation, resilient growth. We challenge the ability of central bank to deliver the cut that were priced at the beginning of the year, but we believe that that dynamic will gradually change with slower economic growth and inflation allowing central bank to remove some of these monetary policy restrictions. What does it mean? It means that we like to trade duration from the long side. We believe that there are two notable exceptions in this dynamic. The RBA will not be able to cut in our view until early next year. And the BOJ is on a different camp where we expect the BOJ to actually hike rates by 50 basis points this year and again in 2025.</p>\n<p><b>Sam Azzarello:</b> And lastly, what are some key themes you will be watching as we head into the second half?</p>\n<p><b>Fabio Bassi:</b> Well, definitely we expect a tactical trading outlook. I don't think it will be a second half of the year where people can position and sit down and relax. I think that the soft landing story, which is pretty much the baseline of our macro outlook could be challenged by data dynamic, where some resilience in growth and inflation could make the market prices situation not dissimilar to what we saw on the first half of the year, which basically means a delay in the expectation of the cutting cycle. On the other side, if you're going to have a deterioration on the macro outlook or on the labor market, that could lead potentially to a dynamic where the market price and accelerating the easing cycle with a faster cutting and that would be clearly a dynamic where we need to lower our yield target for the rest of the year. I think that geopolitical tension will remain in the horizon and that is a risk dynamic that people should be aware of. We recently came from the election in UK and the election in France that created selectively a certain amount of tension and this is something that people should &nbsp;keep an eye on going forward. Clearly, we're going to a big election in the US, and that is another factor that should be in the investor radar screen.<br />\n<b><br />\n Sam Azzarello:</b> Fabio, thanks for sharing your outlook on international rates with us.<br />\n<b><br />\n Sam Azzarello:</b> And now we're gonna turn to commodities. Joining us is Natasha Kaneva, our Global Head of Commodities Research. Natasha, what are the key things to watch in the commodities space as we move into the second half of the year?</p>\n<p><b>Natasha Kaneva:</b> Thank you for having me. So point number one is with the fear of economic growth fading we believe that the recent pullback in commodities is just that, a pullback. So number one is agricultural commodities. Second on our list is oil. So the balance will be tightening very quickly into the fourth quarter. Demand remains very strong. Though we would have to be very explicit that majority of the move has already happened. It's behind us with 12% appreciation in the in the oil prices. In the third place is precious metals. It's gold and silver</p>\n<p><b>Sam Azzarello:</b> Fantastic. Thanks for that. Final question for you \u2013 What are some key themes in commodity markets that you think are relevant for clients to be aware of?<br />\n<b><br />\n Natasha Kaneva:</b> There are a couple things that clients should be watching very closely. Number one is weather. So July has been oppressively hot. National Oceanic and Atmospheric Administration is anticipating a record-breaking Atlantic hurricane season. This is the largest number of named storms since the agency began issuing seasonal hurricane outlooks in 1998. So excessive temperatures have supersized effects on commodity supply chains, for example, oil refining we're watching very closely what is going to happen in the Gulf Coast throughout the summer. But at the same time further amplifying the risks to the US benchmark oil and gas prices nearly half of the US petroleum plant capacity, natural gas processing capacity is sitting in the US, along the hurricane prone Gulf Coast. And, of course, droughts have very negative impact on the, on the food supply. But outside of that, we're watching very closely demand as well. As Northern Hemisphere barrels into summer we anticipate demand for some of the world's most vital commodities to climb. So revenge summer travel season continues, it's very much still in place. For example, in United States we expect 82% of all the Americans to travel this summer. Majority of them will be traveling by car clearly this is very bullish for the gasoline demand, in terms of guidance from the US airlines and the international airlines who are expecting about six to eight percent higher travel demand this year versus 2019. So by all means it should be a very strong demand season for most commodities.</p>\n<p><b>Natasha Kaneva:</b> Natasha, thank you for sharing your views with us.<br />\n<b><br />\n Natasha Kaneva:</b> Thanks for having me.</p>\n<p><b>Sam Azzarello:</b> And now, for a look at credit markets, Stephen Dulake, our global head of Credit, Securitized Products and Public Finance Research joins us. Steve, thanks for stopping by.</p>\n<p><b>Stephen Dulake:</b> You're welcome.</p>\n<p><b>Sam Azzarello:</b> So Steve, what are some highlights from the credit markets at mid-year?</p>\n<p><b>Stephen Dulake:</b> I think the first point is that not much has changed at all, at least in terms of the broad credit market narrative. So, you know, this idea that you have this push and pull between very tight credit spreads on the one hand, and relatively attractive all-in yields on the other. I think that's fairly well known, I think that remains in place through the second half of the year. And, and the sort of bottom line for investors is still that I think credit offers a decent, though not stellar return. I think as the second half of the year evolves we will see more decompression or dispersion in markets, not least given our own macro base case that growth slows a little bit from here. And to revisit one of the themes that we had from the very beginning of the year for our outlook for 2024 overall, one of the thoughts at the time was that the sort of securitized product space looked attractive relative to underlying fixed rates corporates. We still think that's the case. We still lean into that view, though I would say at this juncture it's probably a little bit more of a low conviction lean than was the case six months ago.<br />\n<b><br />\n Sam Azzarello:</b> I'd like to get your thoughts on emerging market corporates, which have been performing surprisingly well this year; do you expect that trend to continue?</p>\n<p><b>Stephen Dulake:</b> Yes we do. So the, the term that we've used to describe emerging market corporates, or our expectations performance this year is that they would do sneakily well against the backdrop of all this focus on developed markets, and Fed cuts and things like that. And emerging markets' corporates have indeed done very, very well. Two real drivers there. One, a lack of supply a market that has been structurally starved of supply for a number of reasons, but notably in Asia Chinese corporates have financed themselves onshore rather than offshore. Ditto Indian corporates. So that's, that's created a big supply squeeze, if you want to call it that in Asia and the asset class has benefited from that overall. Secondly we obviously know from the tragic events in Russia Ukraine that companies struggle, and we saw a lot targeted defaults, some of that is normalizing. Also, the stress that you've had in the Chinese property sector has begun to normalize. So from default rates being well into the double digits, 18 or 24 months ago, we now are expecting defaults to actually be around five percent in emerging market corporates. So, structural starvation of supply and default risk means EM corporates will continue to do, quote unquote, sneakily well.<br />\n<b><br />\n Sam Azzarello:</b> Fantastic. And finally, what's changed from the first half of the year versus the second half of the year, and what are some key factors you and your team are considering?</p>\n<p><b>Stephen Dulake:</b> I think there are probably three things that I would highlight that are going to be a little bit different about the second half relative to the first half. Firstly, I think that we're beyond the point where we're going to be debating quite aggressively how many Fed eases we're going to see this year. I think the market has broadly settled on the idea that we'll see something between one and two Fed eases this year. So depending on how the high frequency data roll, I think market pricing will oscillate somewhere between pricing no Fed cuts, and a maximum of two. And I think if I look back on our first half experience, you might argue that we probably spent too much time at any one point discussing how many or how much Fed easing we would see because credit spreads are tighter today in a world where we're pricing one or two eases than we were at the beginning of the year when we were pricing six or seven eases. If we're talking about more stability in policy rate expectations, the substitute for that could be a little bit more vol related to politics. We've seen some of this recently in France, we know that the US presidential election campaign has started. The real important point there is if the debate starts to shine a light on big budget deficits, and government debt levels, that can result in the correlation between rates and credit markets becoming temporarily positive, and you have a big move up in rates, you have a big move up in credit spreads. So I think that's something that could be a little bit different and is worth keeping an eye on. The potential offset to that is we do think that capital markets activity. We've seen a very brisk pace of debt capital market activity in the first half of the year. We think that can slow targeted bit, certainly in US high grade, where we think that net issuance through the second half of the year can actually be net-zero. So that creates a little bit of a positive technical, that can be an offset to some of this political vol, or political related vol should it surface.<br />\n<b><br />\n Sam Azzarello:</b> Excellent. Steve, thank you so much for your time today.</p>\n<p><b>Stephen Dulake:</b> Thanks for having me.<br />\n<b><br />\n Sam Azzarello:</b> Now, Luis Oganes, Head of Global Macro Research will share his insights. Luis, what are some of the key points in your outlook this year that clients should be aware of?</p>\n<p><b>Luis Oganes:</b> So, in the projections that we have for growth for the first half of the year, actually emerging markets did exceed those expectations which is good news. However, we're seeing signs of de-acceleration in EM, so the second half of the year is probably gonna be a bit of a slower pace of growth. However, for the full year we still expect 4.2%, 2024, which would be basically flat to 2023.<br />\n<b><br />\n Sam Azzarello:</b> And, what's changed from the first half of the year versus the second half of the year, and what are some key factors you and your team are considering?</p>\n<p><b>Luis Oganes:</b> So emerging markets has been experiencing the de-acceleration of inflation during most of 2023 and already 2024. But in recent months, dis-inflation of course it seems to have stalled somewhat. Not too dissimilar to what we saw in the US or other developed market economies. However, there seems to be signs that the de-acceleration of inflation has resumed in the US. Now markets are expecting the Fed to start cutting potentially as early as September, which is actually the new best cast scenario for our US economists. It should allow EM central banks that have already started cutting, to continue doing so. Those that have not cut yet to start doing so. So it should be a more benign environment for emerging market central bank easing.</p>\n<p><b>Sam Azzarello:</b> And finally Luis, can you highlight two or three EM Markets you\u2019re keeping a particularly close eye on, and why?<br />\n<b><br />\n Luis Oganes:</b> There are several EM countries that have enough going for them that regardless of what happens globally there's probably gonna be interesting opportunities and one of them is India. India, starting in June is being included in the GBI-EM local currency bond index. So that promises more influx into the country. Yields are [inaudible 00:03:40] relatively attractive. India is potentially gonna be attracting some of these flows that are going to be diversifying away from China. And certainly the changes in the global political waves will also favor India. So this is one country that we're paying a lot of attention to. We do have a couple of other countries that are in similar situation. One is Turkey. This is a country where there's a shift to monetary and fiscal policy orthodoxy that is starting to yield results. Inflation is coming down and this, hopefully is going to be generating in the months and quarters ahead more of a virtual circle in which lower policy rates, eventually later in this year and into next year, is going to be supporting growth. And then in the US Americas time zone, Mexico is the one country that does garner attention. There's a new government in place and there is open questions as to how President elect Claudia Sheinbaum is going to be. But certainly Mexico stands to gain the most from the intended continued decoupling of the US economy from China. Eh, with this, uh, re-shoring, ensuring, fren-shoring of, uh, eh, eh, investment flows. So I would say that I would point to these three countries are the countries to watch in emerging markets in the second half of the year and into 2025.<br />\n<b><br />\n Sam Azzarello:</b> As we wrap up today's podcast, let's now turn to Tom Salopek, our Head of Cross-Asset Strategy. Tom, how are things looking across asset classes?<br />\n<b><br />\n Tom Salopek: </b>Well, on my side I cover the three to five-year capital market assumptions for cross asset. And what I'd say is the cross asset trade-offs has worsened with the stock year-to-date rally. In general, expected returns are worse, I know if we put it into a multi-asset portfolio, we're looking at something that resembles a late-cycle portfolio. At the same time, if we look at the dollar, the dollar maybe looks overvalued on a reevaluation basis. But in the near-term what you have is that US exceptionalism, interest rate differentials, and US election risk which may be supported for the dollar. But I think whether we're talking about stocks and the recent stock rally, or we're looking at the dollar, one of the things we think about as we try to build a bridge from tactical to strategic is that it won't necessarily be a straight line. Given that in the case of the dollar, the deposited momentum can continue before our bearish view is realized and similarly for the US dollar as well.<br />\n<b><br />\n Sam Azzarello:</b> What are some things you'll be keeping an eye on as we head into the second half of the year?<br />\n<b><br />\n Tom Salopek:</b> For awhile now, we've been ping-ponging back and forth between soft landing, and a high-for-long. And what the second half of the year will do for us is clarify why we will be cutting interest rates. And I think that's a very important thing because as we look at the historical examples, what you see is that when you're cutting for growth risks, stocks go down, when you're cutting for soft landing as you did in the mid-1990s, stocks sailed right through that rate-cutting cycle. So it's very different implications. I'd say there's some meaningful differences between the 1990s in the sense that now the yield curve has been heavily inverted pointing to a growth slowdown, tough times ahead. But, at the same time that signal has not worked. And we don't think it's a matter of that signal won't work, but it's a matter of we've had supports that have extended this cycle. Cash cushion, a strong jobs market, and kind of a monetary policy transmission that's been a bit delayed with companies borrowing at fixed rates. In the case of these comparisons with the 1990s they're not perfect comparisons in the sense that whereas now the yield curve is inverted, if we go back to the 1990s and the '94 hiking cycle, the yield curve never inverted. And when we look at the picture in the ensuing period, what you see is a much stronger cyclical picture than we have right now, as we look at, a growth slowdown which will be challenging for consensus earnings estimates.<br />\n<b><br />\n Sam Azzarello:</b> And finally, what are some questions that investors should be asking themselves going forward?<br />\n<b><br />\n Tom Salopek:</b> Well, there's two things I'd highlight, and maybe one is a longer-term issue than the other there. So the first one is, how much diversification do you get from bonds? Historically, bonds should act as the cushion for stocks with the hiking cycle and rising rates, what can happen is all asset classes go down, producing a positive correlation from the hiking cycle, that's where we have been. As we go forward the issue for us, it may be less about rising rates, and more about growth risk. That points to correlations normalizing and return to a normal negative correlation between stock and bond prices. So if we have a worry about bonds, it's not so much that the correlation won't be the right way around. It's more a matter of with an incomplete hiking cycle, we don't have upside for bond expected returns as much as we thought we, we might have had.<br />\n<b><br />\n Sam Azzarello:</b> Fantastic. Tom, thank you so much for joining us on the podcast today.<br />\n<b><br />\n Tom Salopek:</b> Yeah. Thanks so much for having me.<br />\n<b><br />\n Sam Azzarello:</b> That wraps up our mid-year outlook episode here on Research Recap. We hope you found the insights from our analysts helpful and insightful and we want to thank you for tuning in. For more market insights visit jpmorgan.com/research.</p>\n<p><b>Voiceover:</b> Thanks for listening to \u201cResearch Recap\u201d If you\u2019ve enjoyed this conversation, we hope you\u2019ll review, rate, and subscribe to J.P.&nbsp;Morgan\u2019s Making Sense to stay on top of the latest industry news and trends \u2013 available on Apple Podcasts, Spotify, Google Podcasts and YouTube. This communication is provided for information purposes only. Please read J.P.&nbsp;Morgan research reports related to it\u2019s contents for more information including important disclosures. Copyright 2024 J.P.&nbsp;Morgan Chase &amp; Co. All rights reserved.</p>\n<p><b><br />\n[End of Episode]</b></p>\n                        </div>\"\n      }\n    ],\n    \"supplemental_info_2\": \"J.P. Morgan's \"2024 Mid-Year Investment Outlook\" discusses forecasts and investment opportunities in the evolving economic and market landscapes.  BlackRock's \"2024 Q4 Investment Outlook\" provides insights into market transformations and potential investment strategies.  J.P. Morgan's \"The market outlook at mid-year\" offers an analysis of the first half of 2024, including commentary on China's economic activity and GDP growth forecasts.  While these sources don't explicitly cover the entire mid-term period up to November 2024, they offer the most comprehensive and relevant information available from the provided links.\"\n  },\n  \"analysis_instructions\": {\n    \"steps\": [\n      {\n        \"name\": \"Data Extraction and Filtering\",\n        \"description\": \"Extract key arguments, statistics, and conclusions. Disregard extraneous content to maintain focus.\",\n        \"min_requirements\": [\n          \"Extracted content must include core arguments, supporting evidence, and unique insights relevant to the user's question.\",\n          \"Each extraction should highlight essential points without unnecessary details.\"\n        ]\n      },\n      {\n        \"name\": \"Synthesis and Interpretation\",\n        \"description\": \"Combine insights across results, identifying patterns, contradictions, and novel insights. Provide a unified analysis based on the user\u2019s expert question.\",\n        \"min_requirements\": [\n          \"The analysis should be original, integrating data logically across sources.\",\n          \"Address any contradictions or alignments among sources to ensure depth.\",\n          \"Demonstrate a clear connection to the user\u2019s question, reflecting independent critical thought.\"\n        ]\n      },\n      {\n        \"name\": \"Citations and Formatting\",\n        \"description\": \"Adhere to APA7 citation standards, ensuring clear reference to sources with URLs and publication details.\",\n        \"min_requirements\": [\n          \"Each source in the report should have a clear in-text citation with APA7 format.\",\n          \"Use clear source titles and URLs for easy reference.\"\n        ]\n      }\n    ]\n  },\n  \"output_structure\": {\n    \"introduction\": {\n      \"content\": \"Introduce the topic and frame it according to the user\u2019s question.\",\n      \"min_requirements\": [\n        \"Should be clear, focused, and tailored to an expert audience.\",\n        \"Establish relevance to the main question quickly.\"\n      ]\n    },\n    \"findings\": {\n      \"content\": \"Organize findings by source, ensuring each result is summarized with data-rich insights.\",\n      \"min_requirements\": [\n        \"Each summary should present critical points concisely without general content.\",\n        \"Data should be directly relevant to the user's question, omitting background information.\"\n      ]\n    },\n    \"independent_analysis\": {\n      \"content\": \"Provide original interpretations by combining insights from all sources, identifying patterns and answering the user\u2019s question directly.\",\n      \"min_requirements\": [\n        \"Present independent analysis, synthesizing all sources into a cohesive answer.\",\n        \"Highlight patterns, unique insights, and alignments across data.\"\n      ]\n    },\n    \"conclusion\": {\n      \"content\": \"Summarize the main findings and suggest next steps or implications.\",\n      \"min_requirements\": [\n        \"Should be concise and directly relevant to the expert's question.\",\n        \"Offer any actionable recommendations or further points for exploration.\"\n      ]\n    }\n  },\n  \"audience_and_style\": {\n    \"audience\": \"Expert\",\n    \"style_requirements\": [\n      \"Use precise, technical language suitable for an expert audience.\",\n      \"Avoid superficial language or generalities; provide deep insights.\",\n      \"Include the data such as quantaitive data, incidents and events mentioned in the web results that are relevant to the user's question.\",\n      \"your answer should not be in json but in normal text, it must be at least 6 paragraphs of 150 words and 800 characters each to cover all scopes. It can be up to 12 paragraphs.\"\n    ]\n  }\n}\n"
            },
            {
              "type": "AIMessagePromptTemplate",
              "message": "Processing the task\n\nI'm noting the instructions for a complex report, including data extraction, synthesis, and analysis. The report should be structured and tailored for an expert audience, adhering to specific style guidelines.\n\nREQUEST FOR DETAILS\n\nPulling together insights\n\nI\u2019m reading through data, considering reports from J.P. Morgan, and focusing on recent, current, and future stock market analysis with financial sites as sources.\n\nAssessing market trends\n\nJ.P. Morgan's analysis notes strong growth despite geopolitical risks, while Capital Group highlights healthy consumer spending and corporate earnings.\n\nPulling together key insights\n\nI\u2019m gathering J.P. Morgan's \"2024 Mid-Year Investment Outlook,\" BlackRock's \"2024 Q4 Investment Outlook,\" and J.P. Morgan's mid-year market analysis to provide a comprehensive overview of the market and investment opportunities.\n\nCrafting the report\n\nI\u2019m mapping out a report for an expert audience, emphasizing technical language and data. It should be concise, adhere to APA7 standards, and systematically organized to cover all pertinent aspects.\n\nCrafting an introductory snapshot\n\nI\u2019m mapping out a focused introduction for an expert audience, highlighting the mid-term global stock market outlook in 2024, ensuring technical precision, factual accuracy, and proper citation.\n\nMonitoring economic resilience\n\nI\u2019m curious about J.P. Morgan\u2019s \"2024 Mid-Year Outlook,\" which highlights the global economy's resilience, steady incomes, and low unemployment, despite inflation expected to stay between 2%\u20133% and significant AI-driven productivity gains.\n\nAnalyzing stock trends\n\nForbes Advisor's November 2024 Stock Market Forecast reveals a 10% year-to-date gain in the S&P 500, driven by strong first-quarter earnings and reduced inflation fears.\n\nUnderstanding mid-term stock market trends\n\nOK, let's piece together the outlook: the fixed income markets are stabilizing, the yield curve remains inverted, and active management of duration and credit is crucial. Globally, strong consumer spending and corporate earnings support a positive equity environment, with tech, especially AI, driving economic growth.\n\nEvaluating market scenarios\n\nI\u2019m piecing together fixed income market opportunities with the need for fine-tuned management, considering inflation and central bank policies. Keeping an eye on sectors with strong earnings and technological advancements, especially AI, seems wise.\n\n------------------------\n**Mid-Term Stock Market Analysis: A Comprehensive Review**\n\nThe mid-term outlook for the global stock market is characterized by a complex interplay of resilient economic growth, persistent inflationary pressures, and transformative technological advancements. This report provides a detailed analysis of the latest stock market trends and projections for the next 6\u201312 months, synthesizing insights from leading financial institutions to address the question: **What is the latest stock market analysis in the mid-term?**\n\n**Findings**\n\n**J.P. Morgan's 2024 Mid-Year Outlook** indicates that, contrary to earlier pessimistic predictions, the global economy has demonstrated remarkable strength in 2024 (J.P. Morgan, 2024a). Higher incomes and low unemployment rates have supported consumer spending, leading to healthy corporate profits. Inflation is expected to stabilize between 2%\u20133% annually, attributed to high labor demand bolstering wage growth and limited housing availability sustaining real estate prices. A significant highlight is the transformative potential of artificial intelligence (AI). Jamie Dimon, CEO of JPMorgan Chase, compares AI's impact to the discovery of electricity, estimating that automating half of vulnerable jobs could contribute nearly $5 trillion to U.S. labor productivity (J.P. Morgan, 2024a). Large corporations have effectively managed rising supply costs, maintaining profit margins, while smaller companies face challenges due to higher debt loads and increased interest rates.\n\n**Forbes Advisor's November 2024 Stock Market Forecast** reports that the S&P 500 has gained 10% year-to-date, with strong first-quarter earnings alleviating investor concerns about inflation and interest rate policies (Forbes Advisor, 2024). The communication services sector led with a 33.9% year-over-year earnings growth, followed by the utilities sector at 33.4%. In contrast, the materials, healthcare, and energy sectors experienced earnings declines exceeding 20%. Analysts project full-year S&P 500 earnings growth of 11.4% and revenue growth of 5% in 2024, with expectations of continued acceleration into 2025 and 2026 (Forbes Advisor, 2024). The Federal Reserve is anticipated to maintain current interest rates, with potential cuts in the latter half of the year, depending on inflation trends and economic data.\n\n**J.P. Morgan's Mid-Year Investment Outlook for 2024** suggests that the U.S. economy is poised for gradual moderation in growth, employment, and inflation, providing a supportive environment for long-term risk assets (J.P. Morgan, 2024b). International economies show signs of upward momentum due to below-trend consumption and lower inflation rates. Positive economic surprises indicate that peak pessimism about international markets may have passed. Fixed income markets are expected to stabilize, with long-term interest rates remaining steady. However, the yield curve is likely to remain inverted due to shallow expected rate reductions, emphasizing the importance of active management in duration and credit (J.P. Morgan, 2024b).\n\n**BlackRock's 2024 Q4 Investment Outlook** highlights that 80% of central banks are expected to cut rates at some point this year, leading to policy convergence (BlackRock, 2024). This convergence reduces yield differentials across currencies, affecting foreign exchange markets. The U.S. dollar is anticipated to remain strong due to its yield advantage and robust economic growth. The firm notes that the markets are transitioning, with investors needing to focus on growth outlooks and terms of trade rather than just yield.\n\n**Independent Analysis**\n\nSynthesizing these insights, the mid-term stock market outlook is cautiously optimistic but nuanced. The resilience of the global economy, underpinned by strong consumer spending and corporate earnings, creates a favorable backdrop for equity markets. The significant potential of AI and technological innovation is expected to drive substantial productivity gains and economic growth, particularly in the United States. The estimated $5 trillion boost to U.S. labor productivity from AI automation underscores this transformative impact.\n\nHowever, persistent inflationary pressures, with expectations of stabilization above historical norms, present challenges. Inflation settling at 2%\u20133% annually suggests that central banks may maintain a cautious stance, potentially delaying interest rate cuts. This environment may sustain attractive yields in bond markets, but the anticipated inversion of the yield curve necessitates active management strategies focused on duration and credit quality.\n\nSector-specific performance indicates that investment opportunities are not uniform across the market. The strong earnings growth in the communication services and utilities sectors contrasts sharply with significant declines in the materials, healthcare, and energy sectors. This divergence emphasizes the importance of targeted investment strategies and sector rotation to capitalize on growth areas while mitigating exposure to underperforming sectors.\n\nGeopolitical factors, notably the upcoming U.S. presidential election, introduce elements of uncertainty. Potential shifts in fiscal policies, trade relations, and regulatory environments could impact market sentiment and economic conditions. For example, renewed trade tensions could affect global supply chains and corporate profitability, particularly for multinational corporations. Additionally, the possibility of policy changes affecting sectors like technology, healthcare, and energy necessitates vigilant monitoring.\n\nInternational markets offer both opportunities and risks. The upward inflection in international economic data suggests room for growth, yet challenges remain due to below-trend consumption and policy uncertainties. The convergence of central bank policies globally may reduce yield differentials, influencing capital flows and investment returns. Active management and diversification into international equities may provide enhanced returns, given the positive cyclical turn and structural tailwinds in these markets.\n\n**Conclusion**\n\nIn conclusion, the latest mid-term stock market analysis reflects a market environment exhibiting resilience amid moderated growth expectations and persistent inflationary pressures. Investors are advised to focus on sectors demonstrating strong earnings growth and to leverage the transformative potential of AI and technological advancements. Active portfolio management and diversification across high-quality assets are crucial to navigate the complexities of inverted yield curves and sector-specific performance disparities. Vigilant monitoring of central bank policies, inflation trends, and geopolitical developments will be essential to capitalize on opportunities and mitigate risks in this evolving economic landscape.\n\n**Actionable Recommendations**\n\n1. **Sector Rotation and Targeted Investments**: Prioritize investments in sectors with robust earnings growth, such as communication services and utilities, while exercising caution in sectors experiencing earnings declines.\n   \n2. **Embrace Technological Innovation**: Allocate capital to companies at the forefront of AI and automation to benefit from potential productivity gains and competitive advantages.\n   \n3. **Active Fixed Income Strategies**: Implement active management in fixed income portfolios to navigate yield curve inversions and capitalize on credit opportunities, emphasizing quality and duration management.\n   \n4. **International Diversification**: Explore investment opportunities in international markets showing positive economic inflection and structural growth potential, balancing the portfolio against domestic market risks.\n   \n5. **Monitor Macroeconomic Indicators**: Stay attuned to inflation data, labor market dynamics, and central bank communications to anticipate policy shifts that could impact market conditions.\n   \n6. **Prepare for Geopolitical Risks**: Incorporate risk management strategies to hedge against potential geopolitical uncertainties, including currency fluctuations and trade policy changes.\n\n**References**\n\nBlackRock. (2024). *2024 Q4 Investment Outlook*. Retrieved from https://www.blackrock.com/us/individual/insights/blackrock-investment-institute/outlook\n\nForbes Advisor. (2024). *November 2024 Stock Market Forecast*. Retrieved from https://www.forbes.com/advisor/investing/stock-market-outlook-and-forecast/\n\nJ.P. Morgan. (2024a). *2024 Mid-Year Outlook: Key Takeaways*. Retrieved from https://www.jpmorgan.com/insights/outlook/market-outlook/mid-year-outlook-key-takeaways\n\nJ.P. Morgan. (2024b). *Mid-Year Investment Outlook for 2024*. Retrieved from https://am.jpmorgan.com/us/en/asset-management/adv/insights/market-insights/investment-outlook/\n\n"
            }
          ]
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "retryOnFail": true,
      "typeVersion": 1.4
    },
    {
      "id": "7e52c626-90e7-4e70-8f63-4883a273fefe",
      "name": "Code1",
      "type": "n8n-nodes-base.code",
      "position": [
        3720,
        520
      ],
      "parameters": {
        "jsCode": "// Initialize an empty string to store the final aggregated output\nlet aggregatedOutputText = \"\";\n\n// Loop through all items passed from the Loop node\nfor (let i = 0; i < items.length; i++) {\n  // Extract data for the current item\n  const currentItem = items[i].json.data;\n  const itemNumber = i + 1; // Item number for readability\n  const url = currentItem.url || \"No URL\";\n  const title = currentItem.title || \"No Title\";\n  const description = currentItem.description || \"No Description\";\n  const content = currentItem.content || \"No Content\";\n\n  // Append formatted data for this item to the aggregated output\n  aggregatedOutputText += `Item ${itemNumber}: Title: ${title}, URL: ${url}, Description: ${description}, Content: ${content} || `;\n}\n\n// Trim any trailing separators (if necessary)\naggregatedOutputText = aggregatedOutputText.trim();\n\n// Return a single output containing the aggregated data as a single-line string\nreturn [\n  {\n    json: {\n      aggregated_text: aggregatedOutputText\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "54949b5c-558c-49a4-b5b8-b450bf56ab66",
      "name": "Webhook Call",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        460,
        1740
      ],
      "parameters": {
        "url": "<After Turning on the workflow above, Copy the webhook URL showing on the left side (Input side) and Paste it Here>",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "Research Question",
              "value": "<Insert The Research Question Here>"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b13e7f35-83b1-4abd-af26-600bc99ad7f4",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        1120
      ],
      "parameters": {
        "width": 1060,
        "height": 840,
        "content": "## Step 3. Setup the Webhook Call Node\n\n**Instructions for Setting Up the Webhook Call and Using It in Your Workflow**\n\nThis node is designed to send a **web search query** to the workflow (partly built in this chart) and return the results. Follow these steps to correctly configure and use it:\n\n1. **Locate the \"Webhook\" Node in the Workflow**:\n   - Navigate to the workflow above, the first item, the \"Webhook\" node.\n   - In the \"Webhook\" node, change the **Webhook URL option** from \"Test URL\" to \"Production URL.\"\n   - Copy the generated **Production URL**.\n\n2. **Paste the Webhook URL in the HTTP Node**:\n   - In your target workflow, locate the **HTTP Request** node.\n   - Paste the copied **Production URL** into the URL field of the HTTP Request node. This connects the two workflows.\n\n3. **Send the Research Request**:\n   - When sending the request to this workflow, make sure to include your web search query in the **\"Research Question\" parameter** of the HTTP Request node.\n\n4. **Move the Webhook Call Node**:\n   - Move this **Webhook Call Node** into the workflow where you need the research results. Ensure that it\u2019s correctly connected and configured to send the data to the main workflow.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "d5754a36-9de5-426b-8057-94953abe380a",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Research Reporter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query 2": {
      "main": [
        [
          {
            "node": "Query-2 Combined",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Date & Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query  1": {
      "main": [
        [
          {
            "node": "Query-1 Combined",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Date & Time": {
      "main": [
        [
          {
            "node": "Date & Time1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Date & Time1": {
      "main": [
        [
          {
            "node": "Analyst Emulator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Article Extractor1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query Maker - 1": {
      "main": [
        [
          {
            "node": "Query  1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyst Emulator": {
      "main": [
        [
          {
            "node": "Query Maker - 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query 2 - Ranker": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query-1 Combined": {
      "main": [
        [
          {
            "node": "Query 1 Ranker & Query 2 Maker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Query-2 Combined": {
      "main": [
        [
          {
            "node": "Query 2 - Ranker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Research Reporter": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Article Extractor1": {
      "main": [
        [
          {
            "node": "Delay-to-Avoid-Request-Per-Minute-Cap",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyst Emulator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Query Maker - 1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser3": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser6",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser4": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser7",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser6": {
      "ai_outputParser": [
        [
          {
            "node": "Query 1 Ranker & Query 2 Maker",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser7": {
      "ai_outputParser": [
        [
          {
            "node": "Query 2 - Ranker",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model14": {
      "ai_languageModel": [
        [
          {
            "node": "Query 2 - Ranker",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Query 1 Ranker & Query 2 Maker",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Query Maker - 1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model15": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser6",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Auto-fixing Output Parser7",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model16": {
      "ai_languageModel": [
        [
          {
            "node": "Research Reporter",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Query 1 Ranker & Query 2 Maker": {
      "main": [
        [
          {
            "node": "Query 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delay-to-Avoid-Request-Per-Minute-Cap": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}