emergingtrajectories.factsragforecaster2 ======================================== .. py:module:: emergingtrajectories.factsragforecaster2 Attributes ---------- .. autoapisummary:: emergingtrajectories.factsragforecaster2.start_system_prompt emergingtrajectories.factsragforecaster2.start_user_prompt emergingtrajectories.factsragforecaster2.extend_user_prompt Classes ------- .. autoapisummary:: emergingtrajectories.factsragforecaster2.FactsRAGForecastingAgent Module Contents --------------- .. py:data:: start_system_prompt :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """Today's date is {the_date}. You are a researcher helping with economics and politics research. We will give you a few facts and we need you to fill in a blank to the best of your knowledge, based on all the information provided to you. All your answers should be absed on these facts ONLY. For example, suppose we ask, 'Who is the President of the USA?' and have the following facts... F1: The President of the USA is Joe Biden. F2: The Vice President of the USA is Kamala Harris. ... your answers hould be something like this: The President of th USA is Joe Biden [F1]. We will give you a list of facts for every question. You can reference those facts, or you can also reference earlier facts from the conversatio chain. YOU CANNOT USE OTHER INFORMATION.""" .. raw:: html
.. py:data:: start_user_prompt :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """Here is the research: {content} {additional_facts} ------------ Given the above, we need you to do your best to fill in the following blank... {fill_in_the_blank} PLEASE DO THE FOLLOWING: - Provide any further justification ONLY BASED ON THE FACTS AND SOURCES PROVIDED ABOVE. - Explain your forecast and how the facts, insights, etc. support it. Do not simply state a number. - Do not provide a range; provide ONE number. - End your forecast with the filled-in statement: {fill_in_the_blank_2} We realize you are being asked to provide a speculative forecast. We are using this to better understand the world and finance, so please fill in the blank. We will not use this for any active decision-making, but more to learn about the capabilities of AI. """ .. raw:: html
.. py:data:: extend_user_prompt :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """Here is the research: {content} {additional_facts} --------------------- In addition to the new content above, we want to UPDATE the forecast from before. Here is the earlier forecast... --------------------- FORECAST: {earlier_forecast_value} JUSTIFICATION: {earlier_forecast} --------------------- Given the above, we need you to do your best to fill in the following blank... {fill_in_the_blank} PLEASE DO THE FOLLOWING: - Provide any further justification ONLY BASED ON THE FACTS AND SOURCES PROVIDED ABOVE. - Explain your forecast and how the facts, insights, etc. support it. Do not simply state a number. - Do not provide a range; provide ONE number. - End your forecast with the filled-in statement: {fill_in_the_blank_2} We realize you are being asked to provide a speculative forecast. We are using this to better understand the world and finance, so please fill in the blank. We will not use this for any active decision-making, but more to learn about the capabilities of AI.""" .. raw:: html
.. py:class:: FactsRAGForecastingAgent(client: emergingtrajectories.recursiveagent.ETClient, chatbot: phasellm.llms.ChatBot, factbase: emergingtrajectories.factsrag2.FactRAGFileCache) Bases: :py:obj:`object` .. py:attribute:: client .. py:attribute:: chatbot .. py:attribute:: factbase .. py:method:: setChatBot(chatbot) .. py:method:: getChatBot() .. py:method:: create_forecast(statement: emergingtrajectories.Statement, openai_api_key, et_api_key, facts=None, prediction_agent='Test Agent') .. py:method:: extend_forecast(forecast: emergingtrajectories.Forecast, openai_api_key, et_api_key, facts=None, prediction_agent='Test Agent')