diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..a6344aac8c09253b3b630fb776ae94478aa0275b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,35 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..cbb0d520fd356fe1c07654796e8c9dda34785d09 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +#Ignore env containing secrets +.env +#Ignore Virtual Env +env/ +#Ignore generated outputs +outputs/ +#Ignore pycache +**/__pycache__/ + +test*.py +./test/ +./flagged/ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..10bce1b598383a95588346b8457995b2773345a4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Ze Jin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..4e6139fd0f96067add4fd36c927e840b6a2aac94 --- /dev/null +++ b/README.md @@ -0,0 +1,82 @@ +--- +title: AI-Research-Assistant +app_file: app.py +sdk: gradio +sdk_version: 3.38.0 +duplicated_from: zej97/AI-Research-Assistant +--- +
+ +
+ English | + 中文 +
+
+ +> **15th Aug, 2023 Fix: HttpError. (Sorry for the late update. I'm currently working on my dissertation...)** +> **21th Aug, 2023 Fix: Report History is only displayed after clicking and will be rest after refreshing.** + + +Inspired by [gpt-researcher](https://github.com/assafelovic/gpt-researcher). This project endeavors to develop an AI research assistant capable of **generating research reports** effortlessly for researchers. For instance, researchers can request the AI research assistant to compose a report on *the latest advancements in the field of superconductors as of 2023*, which is currently a trending topic. The AI research assistant will subsequently compile a report based on the relevant information obtained from the internet. Now, AIRA also offers support for **academic English polishing**. + + +| Example1-1 | Example1-2 | Example1-3 | +| :----------------------------------: | :----------------------------------: | :----------------------------------: | +| | | | + +The currently supported agents encompass a wide range of fields, including *finance, business analysis, clinical medicine, basic medicine, travel, academic research and sociology*. + +In addition to official api, this project offers an alternative approach to generating research reports by utilizing a third-party API. For access to this third-party API, please refer to [chimeragpt](https://chimeragpt.adventblocks.cc/) or [GPT-API-free](https://github.com/chatanywhere/GPT_API_free). Before running the project, kindly ensure that you set the environment variables `OPENAI_API_KEY` and `OPENAI_API_BASE`. + +```shell +$ export OPENAI_API_KEY = your_api_key +$ export OPENAI_API_BASE = your_api_base +``` + +or you can set the api key and base in `.env` file. + + +## Installation + +1. Clone the repository + + ```shell + $ git clone git@github.com:paradoxtown/ai_research_assistant.git + $ cd ai_research_assistant + ``` + +2. Install the dependencies + + ```shell + $ pip install -r requirements.txt + ``` + +3. Export evnironment variables + + ```shell + $ export OPENAI_API_KEY = your_api_key + $ export OPENAI_API_BASE = your_api_base + ``` + or modify the `.env` file. + +4. Run the project + + ```shell + $ python app.py + ``` + +## TODO + +- [x] Switch Google Search to DuckDuckGo +- [ ] Literature review +- [x] Third-party API +- [ ] Prettify report +- [x] Add medical agent and social agent +- [ ] Add option for users to customize the number of words and temperature +- [ ] Copy and download buttons +- [ ] Allows the user to choose the degree of research. +- [ ] Wikipedia Understanding + +--- + +
Happy researching! 🚀
\ No newline at end of file diff --git a/__pycache__/aira.cpython-311.pyc b/__pycache__/aira.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8dfeb3420566bb1b85073745e2fddbc552df775f Binary files /dev/null and b/__pycache__/aira.cpython-311.pyc differ diff --git a/__pycache__/aira.cpython-39.pyc b/__pycache__/aira.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5857f99c4a3ca1af55e086b7c33ec5b1f33ff339 Binary files /dev/null and b/__pycache__/aira.cpython-39.pyc differ diff --git a/__pycache__/app.cpython-311.pyc b/__pycache__/app.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ba02a850a3108dfd347d85be0ced640ca7264a4 Binary files /dev/null and b/__pycache__/app.cpython-311.pyc differ diff --git a/__pycache__/app.cpython-39.pyc b/__pycache__/app.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c85977c372fa24cd29a94a5fa3fc17a7bb7b6341 Binary files /dev/null and b/__pycache__/app.cpython-39.pyc differ diff --git a/__pycache__/components.cpython-311.pyc b/__pycache__/components.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2140931b916fd14652ab6f995345b3680b95678f Binary files /dev/null and b/__pycache__/components.cpython-311.pyc differ diff --git a/__pycache__/home.cpython-311.pyc b/__pycache__/home.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5c542dc6c1d5a9e41f75ecb75c8a39b9bc2fac10 Binary files /dev/null and b/__pycache__/home.cpython-311.pyc differ diff --git a/__pycache__/main.cpython-311.pyc b/__pycache__/main.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e934e595dce91d6e099663c6db4e9718eece240 Binary files /dev/null and b/__pycache__/main.cpython-311.pyc differ diff --git a/__pycache__/main.cpython-39.pyc b/__pycache__/main.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..17174c0576b116123047ab963e18dfd65676f0ca Binary files /dev/null and b/__pycache__/main.cpython-39.pyc differ diff --git a/__pycache__/style.cpython-311.pyc b/__pycache__/style.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..04c61a745b9d0d991511b1c61917ad08e732596f Binary files /dev/null and b/__pycache__/style.cpython-311.pyc differ diff --git a/__pycache__/test.cpython-311.pyc b/__pycache__/test.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b73da4c44ffcee4ca069aab4ab3e0cd492de4103 Binary files /dev/null and b/__pycache__/test.cpython-311.pyc differ diff --git a/__pycache__/test2.cpython-311.pyc b/__pycache__/test2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c561ecfe51696a213bdcddb698f14b798c1403ea Binary files /dev/null and b/__pycache__/test2.cpython-311.pyc differ diff --git a/__pycache__/test3.cpython-311.pyc b/__pycache__/test3.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ec44db7bc64e51fd3481571aa3858597ae2d3493 Binary files /dev/null and b/__pycache__/test3.cpython-311.pyc differ diff --git a/actions/__pycache__/duck_search.cpython-311.pyc b/actions/__pycache__/duck_search.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3b504340adae05408e57270d4c24d719c7759063 Binary files /dev/null and b/actions/__pycache__/duck_search.cpython-311.pyc differ diff --git a/actions/__pycache__/google_search.cpython-311.pyc b/actions/__pycache__/google_search.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..191e723601337cc78a6786a1396dad3d6826045c Binary files /dev/null and b/actions/__pycache__/google_search.cpython-311.pyc differ diff --git a/actions/__pycache__/web_scrape.cpython-311.pyc b/actions/__pycache__/web_scrape.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..abd45c694d68a910754ca5a5502d0d0b22134b36 Binary files /dev/null and b/actions/__pycache__/web_scrape.cpython-311.pyc differ diff --git a/actions/__pycache__/web_scrape.cpython-39.pyc b/actions/__pycache__/web_scrape.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6146659a15f4fde0ebb2bb10144bd022dccc8d05 Binary files /dev/null and b/actions/__pycache__/web_scrape.cpython-39.pyc differ diff --git a/actions/__pycache__/web_search.cpython-311.pyc b/actions/__pycache__/web_search.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7d18bcade699ffaae51a79177cee60d3f1258687 Binary files /dev/null and b/actions/__pycache__/web_search.cpython-311.pyc differ diff --git a/actions/__pycache__/web_search.cpython-39.pyc b/actions/__pycache__/web_search.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5035276602742b421ce68a1bc179b7d782f373fc Binary files /dev/null and b/actions/__pycache__/web_search.cpython-39.pyc differ diff --git a/actions/duck_search.py b/actions/duck_search.py new file mode 100644 index 0000000000000000000000000000000000000000..d324475f5c82105dd76a603a01fae72e1a352f2b --- /dev/null +++ b/actions/duck_search.py @@ -0,0 +1,11 @@ +from duckduckgo_search import DDGS + + +def duckduckgo_search(query, max_search_result=3): + with DDGS() as ddgs: + responses = list() + for i, r in enumerate(ddgs.text(query, region='wt-wt', safesearch='off', timelimit='y')): + if i == max_search_result: + break + responses.append(r) + return responses \ No newline at end of file diff --git a/actions/google_search.py b/actions/google_search.py new file mode 100644 index 0000000000000000000000000000000000000000..1943a37ff3d2a9ba5c8fab7be99e2898f34c3d49 --- /dev/null +++ b/actions/google_search.py @@ -0,0 +1,63 @@ +import requests +from bs4 import BeautifulSoup + + +def get_urls(query, proxies=None): + query = query + url = f"https://www.google.com/search?q={query}" + headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36'} + response = requests.get(url, headers=headers, proxies=proxies) + soup = BeautifulSoup(response.content, 'html.parser') + results = [] + for g in soup.find_all('div', class_='g'): + anchors = g.find_all('a') + if anchors: + link = anchors[0]['href'] + if link.startswith('/url?q='): + link = link[7:] + if not link.startswith('http'): + continue + title = g.find('h3').text + item = {'title': title, 'link': link} + results.append(item) + + return results + +def scrape_text(url, proxies=None) -> str: + """Scrape text from a webpage + + Args: + url (str): The URL to scrape text from + + Returns: + str: The scraped text + """ + headers = { + 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36', + 'Content-Type': 'text/plain', + } + try: + response = requests.get(url, headers=headers, proxies=proxies, timeout=8) + if response.encoding == "ISO-8859-1": response.encoding = response.apparent_encoding + except: + return "Unable to connect to the server" + soup = BeautifulSoup(response.text, "html.parser") + for script in soup(["script", "style"]): + script.extract() + text = soup.get_text() + lines = (line.strip() for line in text.splitlines()) + chunks = (phrase.strip() for line in lines for phrase in line.split(" ")) + text = "\n".join(chunk for chunk in chunks if chunk) + return text + + +if __name__ == '__main__': + txt = "What is LSTM?" + proxies = None + urls = get_urls(txt, proxies) + max_search_result = 10 + + for url in urls[:max_search_result]: + print(url) + print(scrape_text(url['link'], proxies)) + print("\n\n") diff --git a/agent/__init__.py b/agent/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/agent/__pycache__/__init__.cpython-311.pyc b/agent/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b9bf3fad6991fd9749799648103bd772f2ead98c Binary files /dev/null and b/agent/__pycache__/__init__.cpython-311.pyc differ diff --git a/agent/__pycache__/llm_utils.cpython-311.pyc b/agent/__pycache__/llm_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ab7dc5619acb35d06bd49c90f3c7f57996a8b07e Binary files /dev/null and b/agent/__pycache__/llm_utils.cpython-311.pyc differ diff --git a/agent/__pycache__/llm_utils.cpython-39.pyc b/agent/__pycache__/llm_utils.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b98f13b47cb5cd1fec0bb5bc3eb70ed16e0df4c3 Binary files /dev/null and b/agent/__pycache__/llm_utils.cpython-39.pyc differ diff --git a/agent/__pycache__/prompts.cpython-311.pyc b/agent/__pycache__/prompts.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c69ffff633f544493cb5e82c4bbf57adb7b424c2 Binary files /dev/null and b/agent/__pycache__/prompts.cpython-311.pyc differ diff --git a/agent/__pycache__/prompts.cpython-39.pyc b/agent/__pycache__/prompts.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e6970af3ca63f554bdd017b09d839efd44e68c70 Binary files /dev/null and b/agent/__pycache__/prompts.cpython-39.pyc differ diff --git a/agent/__pycache__/research_agent.cpython-311.pyc b/agent/__pycache__/research_agent.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..42120edabc0cbacd742962c26e4f0d493c8519b7 Binary files /dev/null and b/agent/__pycache__/research_agent.cpython-311.pyc differ diff --git a/agent/__pycache__/research_agent.cpython-39.pyc b/agent/__pycache__/research_agent.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c87ab085cca74877c63d36ede550686c8c84e7db Binary files /dev/null and b/agent/__pycache__/research_agent.cpython-39.pyc differ diff --git a/agent/__pycache__/run.cpython-311.pyc b/agent/__pycache__/run.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..68ab3334c61558e3499edbe0f2c9eabf5e563d25 Binary files /dev/null and b/agent/__pycache__/run.cpython-311.pyc differ diff --git a/agent/__pycache__/run.cpython-39.pyc b/agent/__pycache__/run.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..136989cb7b504f9c915ceb028d59d0f80a27369a Binary files /dev/null and b/agent/__pycache__/run.cpython-39.pyc differ diff --git a/agent/__pycache__/toolkits.cpython-311.pyc b/agent/__pycache__/toolkits.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..61b3bd35446535119d0012371645dadb33bb6494 Binary files /dev/null and b/agent/__pycache__/toolkits.cpython-311.pyc differ diff --git a/agent/llm_utils.py b/agent/llm_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..0810a66ba41d76e48c4afe3d123b266f902b2e10 --- /dev/null +++ b/agent/llm_utils.py @@ -0,0 +1,39 @@ +from __future__ import annotations +from config import Config +import openai + +CFG = Config() + +openai.api_key = CFG.openai_api_key +openai.api_base = CFG.openai_api_base + +from typing import Optional + +def llm_response(model, + messages, + temperature: float = CFG.temperature, + max_tokens: Optional[int] = None): + return openai.ChatCompletion.create( + model=model, + messages=messages, + temperature=temperature, + max_tokens=max_tokens, + ).choices[0].message["content"] + + +def llm_stream_response(model, + messages, + temperature: float = CFG.temperature, + max_tokens: Optional[int] = None): + response = "" + for chunk in openai.ChatCompletion.create( + model=model, + messages=messages, + temperature=temperature, + max_tokens=max_tokens, + stream=True, + ): + content = chunk["choices"][0].get("delta", {}).get("content") + if content is not None: + response += content + yield response diff --git a/agent/prompts.py b/agent/prompts.py new file mode 100644 index 0000000000000000000000000000000000000000..382cd55fc01f5b330fe28769b017f69851b0b41d --- /dev/null +++ b/agent/prompts.py @@ -0,0 +1,137 @@ +def generate_agent_role_prompt(agent): + """ Generates the agent role prompt. + Args: agent (str): The type of the agent. + Returns: str: The agent role prompt. + """ + prompts = { + "Finance Agent": "You are a seasoned finance analyst AI assistant. Your primary goal is to compose comprehensive, astute, impartial, and methodically arranged financial reports based on provided data and trends.", + + "Travel Agent": "You are a world-travelled AI tour guide assistant. Your main purpose is to draft engaging, insightful, unbiased, and well-structured travel reports on given locations, including history, attractions, and cultural insights.", + + "Academic Research Agent": "You are an AI academic research assistant. Your primary responsibility is to create thorough, academically rigorous, unbiased, and systematically organized reports on a given research topic, following the standards of scholarly work.", + + "Business Analyst Agent": "You are an experienced AI business analyst assistant. Your main objective is to produce comprehensive, insightful, impartial, and systematically structured business reports based on provided business data, market trends, and strategic analysis.", + "Computer Security Analyst Agent": "You are an AI specializing in computer security analysis. Your principal duty is to generate comprehensive, meticulously detailed, impartial, and systematically structured reports on computer security topics. This includes Exploits, Techniques, Threat Actors, and Advanced Persistent Threat (APT) Groups. All produced reports should adhere to the highest standards of scholarly work and provide in-depth insights into the complexities of computer security.", + + "Clinical Medicine Agent": "You are an AI specializing in clinical medicine analysis. Your primary role is to compose comprehensive, well-researched, impartial, and methodically organized reports on various aspects of clinical medicine. This includes in-depth studies on medical conditions, treatments, medical advancements, patient care, and healthcare practices. Your reports should follow the highest standards of medical research and provide critical insights into the complexities of the clinical medicine field. Whether it's analyzing medical data, conducting literature reviews, or evaluating the efficacy of medical interventions, your goal is to deliver insightful and evidence-based reports to assist medical professionals and researchers in making informed decisions.", + + "Basic Medicine Agent": "You are an AI specializing in basic medicine. Your goal is to provide comprehensive, unbiased reports on essential healthcare topics. Deliver clear insights into general health practices, common medical conditions, preventive measures, first aid procedures, and healthy lifestyle choices. Aim to be accessible to non-medical professionals and offer evidence-based recommendations for overall well-being.", + + "Social Science Research Agent": "You are an AI social science research assistant with a focus on providing comprehensive, well-researched, and unbiased reports on various topics within the social sciences. Your primary goal is to delve into the complexities of human behavior, society, and culture to produce insightful and methodically organized reports. Whether it's sociology, psychology, anthropology, economics, or any other social science discipline, you excel in critically analyzing data, academic literature, and historical trends to offer valuable insights into the subject matter. Your reports are crafted to meet the highest standards of scholarly work, adhering to objectivity and academic rigor while presenting information in a clear and engaging manner. With your expertise, you can delve into societal issues, cultural dynamics, economic trends, and other relevant areas within the realm of social sciences.", + + "Default Agent": "You are an AI critical thinker research assistant. Your sole purpose is to write well written, critically acclaimed, objective and structured reports on given text." + } + + return prompts.get(agent, "No such agent") + + +def generate_report_prompt(question, research_summary): + """ Generates the report prompt for the given question and research summary. + Args: question (str): The question to generate the report prompt for + research_summary (str): The research summary to generate the report prompt for + Returns: str: The report prompt for the given question and research summary + """ + + return f'"""{research_summary}""" Using the above information, answer the following'\ + f' question or topic: "{question}" in a detailed report --'\ + " The report should focus on the answer to the question, should be well structured, informative, detailed" \ + " in depth, with facts and numbers if available, a minimum of 2,400 words and with markdown syntax and apa format. "\ + "Write all source urls at the end of the report in apa format." + + +def generate_search_queries_prompt(question): + """ Generates the search queries prompt for the given question. + Args: question (str): The question to generate the search queries prompt for + Returns: str: The search queries prompt for the given question + """ + + return f'Write 5 google search queries to search online that form an objective opinion from the following: "{question}"\n'\ + 'You must respond with a list of strings in the following json format: {"Q1": query1, "Q2": query2, "Q3": query3, "Q4": query4, "Q5": query5}' + + +def generate_resource_report_prompt(question, research_summary): + """Generates the resource report prompt for the given question and research summary. + + Args: + question (str): The question to generate the resource report prompt for. + research_summary (str): The research summary to generate the resource report prompt for. + + Returns: + str: The resource report prompt for the given question and research summary. + """ + return f'"""{research_summary}""" Based on the above information, generate a bibliography recommendation report for the following' \ + f' question or topic: "{question}". The report should provide a detailed analysis of each recommended resource,' \ + ' explaining how each source can contribute to finding answers to the research question.' \ + ' Focus on the relevance, reliability, and significance of each source.' \ + ' Ensure that the report is well-structured, informative, in-depth, and follows Markdown syntax.' \ + ' Include relevant facts, figures, and numbers whenever available.' \ + ' The report should have a minimum length of 1,200 words.' + + +def generate_outline_report_prompt(question, research_summary): + """ Generates the outline report prompt for the given question and research summary. + Args: question (str): The question to generate the outline report prompt for + research_summary (str): The research summary to generate the outline report prompt for + Returns: str: The outline report prompt for the given question and research summary + """ + + return f'"""{research_summary}""" Using the above information, generate an outline for a research report in Markdown syntax'\ + f' for the following question or topic: "{question}". The outline should provide a well-structured framework'\ + ' for the research report, including the main sections, subsections, and key points to be covered.' \ + ' The research report should be detailed, informative, in-depth, and a minimum of 1,200 words.' \ + ' Use appropriate Markdown syntax to format the outline and ensure readability.' + + +def generate_concepts_prompt(question, research_summary): + """ Generates the concepts prompt for the given question. + Args: question (str): The question to generate the concepts prompt for + research_summary (str): The research summary to generate the concepts prompt for + Returns: str: The concepts prompt for the given question + """ + + return f'"""{research_summary}""" Using the above information, generate a list of 5 main concepts to learn for a research report'\ + f' on the following question or topic: "{question}". The outline should provide a well-structured framework'\ + 'You must respond with a list of strings in the following format: ["concepts 1", "concepts 2", "concepts 3", "concepts 4, concepts 5"]' + + +def generate_lesson_prompt(concept): + """ + Generates the lesson prompt for the given question. + Args: + concept (str): The concept to generate the lesson prompt for. + Returns: + str: The lesson prompt for the given concept. + """ + + prompt = f'generate a comprehensive lesson about {concept} in Markdown syntax. This should include the definition'\ + f'of {concept}, its historical background and development, its applications or uses in different'\ + f'fields, and notable events or facts related to {concept}.' + + return prompt + + +def get_report_by_type(report_type): + report_type_mapping = { + 'Research Report': generate_report_prompt, + 'Resource Report': generate_resource_report_prompt, + 'Outline Report': generate_outline_report_prompt + } + return report_type_mapping[report_type] + + +def generate_english_polishing_prompt(content): + """ Generates the english polishing prompt for the given content. + Inspired by project gpt_academic + Args: question (str): + Returns: str: The english polishing prompt for the given content + """ + return f'Below is a paragraph from an academic paper. Polish the writing to meet the academic style and improve the spelling, grammar, clarity, concision, and overall readability. When necessary, rewrite the whole sentence. Furthermore, list all modifications and explain the reasons for doing so in the markdown table. \n {content}' + + +def generate_summarize_prompt(content): + """ Generates the summarize prompt for the given content. + Inspired by project gpt_academic + Args: question (str): + Returns: str: The summarize prompt for the given content + """ + return f'The following information is crawled from the Internet and will be used in writing the research report. Please clear the junk information and summarize the useful information in depth. Include all factual information, numbers, stats etc if available. \n {content}' \ No newline at end of file diff --git a/agent/research_agent.py b/agent/research_agent.py new file mode 100644 index 0000000000000000000000000000000000000000..365d2e562a5a70902f55d1eadf09a6ced1b21684 --- /dev/null +++ b/agent/research_agent.py @@ -0,0 +1,109 @@ +import json +from actions.duck_search import duckduckgo_search +from processing.text import read_txt_files +from agent.llm_utils import llm_response, llm_stream_response +from config import Config +from agent import prompts +import os +import string + +CFG = Config() + + +class ResearchAgent: + def __init__(self, question, agent): + """ Initializes the research assistant with the given question. + Args: question (str): The question to research + Returns: None + """ + + self.question = question + self.agent = agent + self.visited_urls = set() + self.search_summary = "" + self.directory_name = ''.join(c for c in question if c.isascii() and c not in string.punctuation)[:100] + self.dir_path = os.path.dirname(f"./outputs/{self.directory_name}/") + + def call_agent(self, action): + messages = [{ + "role": "system", + "content": prompts.generate_agent_role_prompt(self.agent), + }, { + "role": "user", + "content": action, + }] + return llm_response( + model=CFG.fast_llm_model, + messages=messages, + ) + + def call_agent_stream(self, action): + messages = [{ + "role": "system", + "content": prompts.generate_agent_role_prompt(self.agent), + }, { + "role": "user", + "content": action, + }] + yield from llm_stream_response( + model=CFG.fast_llm_model, + messages=messages + ) + + def create_search_queries(self): + """ Creates the search queries for the given question. + Args: None + Returns: list[str]: The search queries for the given question + """ + result = self.call_agent(prompts.generate_search_queries_prompt(self.question)) + return json.loads(result) + + def search_single_query(self, query): + """ Runs the async search for the given query. + Args: query (str): The query to run the async search for + Returns: list[str]: The async search for the given query + """ + return duckduckgo_search(query, max_search_result=3) + + def run_search_summary(self, query): + """ Runs the search summary for the given query. + Args: query (str): The query to run the search summary for + Returns: str: The search summary for the given query + """ + responses = self.search_single_query(query) + + print(f"Searching for {query}") + query = hash(query) + file_path = f"./outputs/{self.directory_name}/research-{query}.txt" + os.makedirs(os.path.dirname(file_path), exist_ok=True) + with open(file_path, "w") as f: + json.dump(responses, f) + print(f"Saved {query} to {file_path}") + return responses + + def search_online(self): + """ Conducts the search for the given question. + Args: None + Returns: str: The search results for the given question + """ + + self.search_summary = read_txt_files(self.dir_path) if os.path.isdir(self.dir_path) else "" + + if not self.search_summary: + search_queries = self.create_search_queries() + for _, query in search_queries.items(): + search_result = self.run_search_summary(query) + self.search_summary += f"=Query=:\n{query}\n=Search Result=:\n{search_result}\n================\n" + + return self.search_summary + + def write_report(self, report_type): + """ Writes the report for the given question. + Args: None + Returns: str: The report for the given question + """ + # yield "Searching online..." + + report_type_func = prompts.get_report_by_type(report_type) + + yield from self.call_agent_stream(report_type_func(self.question, self.search_online())) diff --git a/agent/toolkits.py b/agent/toolkits.py new file mode 100644 index 0000000000000000000000000000000000000000..29e7ee8ad5d83e2b5a6ca1aba9c689eb8f319641 --- /dev/null +++ b/agent/toolkits.py @@ -0,0 +1,15 @@ +from agent import prompts, llm_utils +from config import Config + +CFG = Config() + +def english_polishing(content): + prompt = prompts.generate_english_polishing_prompt(content) + messages = [{ + "role": "user", + "content": prompt, + }] + + yield from llm_utils.llm_stream_response( + model=CFG.fast_llm_model, + messages=messages) diff --git a/app.py b/app.py new file mode 100644 index 0000000000000000000000000000000000000000..4c70c71c43e62644a49aaac434bd33928f26c763 --- /dev/null +++ b/app.py @@ -0,0 +1,122 @@ +import os +import gradio as gr + +from datetime import datetime, timezone + +from config import check_openai_api_key +from agent.research_agent import ResearchAgent +from agent.toolkits import english_polishing +from statics.style import * + + +check_openai_api_key() +report_history_buffer = "" +report_history_tasks = [] +polish_history_buffer = "" + +REPORT_HISTORY_FILE_PATH = "./statics/report_history_buffer.md" + + +def load_report_history(): + global report_history_buffer + if os.path.exists(REPORT_HISTORY_FILE_PATH): + with open(REPORT_HISTORY_FILE_PATH, "r") as f: + report_history_buffer = f.read() + else: + open(REPORT_HISTORY_FILE_PATH, "w").close() + return report_history_buffer + + +def run_agent(task, agent, report_type): + global report_history_tasks + report_history_tasks.append(task) + assistant = ResearchAgent(task, agent) + yield from assistant.write_report(report_type) + + +with gr.Blocks(theme=gr.themes.Base(), + title="AI Research Assistant", + css=css) as demo: + gr.HTML(top_bar) + with gr.Tab(label="🔦Report"): + with gr.Column(): + gr.HTML(report_html) + report = gr.Markdown(value="  Report will appear here...", + elem_classes="output") + with gr.Row(): + agent_type = gr.Dropdown(label="# Agent Type", + value="Default Agent", + interactive=True, + allow_custom_value=False, + choices=["Default Agent", + "Business Analyst Agent", + "Finance Agent", + "Travel Agent", + "Academic Research Agent", + "Computer Security Analyst Agent", + "Clinical Medicine Agent", + "Basic Medicine Agent", + "Social Science Research Agent"]) + report_type = gr.Dropdown(label="# Report Type", + value="Research Report", + interactive=True, + allow_custom_value=False, + choices=["Research Report", + "Resource Report", + "Outline Report"]) + + input_box = gr.Textbox(label="# What would you like to research next?", placeholder="Enter your question here") + submit_btn = gr.Button("Generate Report", elem_id="primary-btn") + + gr.Examples(["Should I invest in the Large Language Model industry in 2023?", + "Is it advisable to make investments in the electric car industry during the year 2023?", + "What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023?", + "What are the most recent advancements in the domain of superconductors as of 2023?"], + inputs=input_box) + + with gr.Accordion(label="# Report History", elem_id="history", open=False): + report_history = gr.Markdown(value=load_report_history) + + def store_report(content): + global report_history_tasks, report_history_buffer + report_task = report_history_tasks[-1][:min(100, len(report_history_tasks[-1]))] + time_stamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S %P") + new_report = f'
\ + UTC {time_stamp}: \ + {report_task} \ +
{content}
\ +
' + report_history_buffer += new_report + with open("./statics/report_history_buffer.md", "a+") as f: + f.write(new_report) + return report_history_buffer + + submit_btn.click(run_agent, inputs=[input_box, agent_type, report_type], outputs=report)\ + .then(store_report, inputs=[report], outputs=report_history) + + with gr.Tab("✒️English Polishing"): + gr.HTML(english_polishing_html) + polished_result = gr.Markdown("  Polished result will appear here...", elem_classes="output") + sentences = gr.Textbox(label="# What would you like to polish?", placeholder="Enter your sentence here") + + with gr.Row(): + polish_btn = gr.Button("Polish", elem_id="primary-btn") + + with gr.Accordion(label="# Polishing History", elem_id="history", open=False): + polish_history = gr.Markdown() + + def store_polished_result(origin, result): + global polish_history_buffer + polish_history_buffer += f'
\ + {origin} \ +
{result}
\ +
' + return polish_history_buffer + + polish_btn.click(english_polishing, inputs=[sentences], outputs=polished_result) \ + .then(store_polished_result, inputs=[sentences, polished_result], outputs=polish_history) + + with gr.Tab("📑Literature Review"): + gr.HTML(literature_review_html) + +demo.queue().launch() \ No newline at end of file diff --git a/config/__init__.py b/config/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..704ba0f8fd18eac290da02e5b1d22d4be54b235f --- /dev/null +++ b/config/__init__.py @@ -0,0 +1,9 @@ +from config.config import Config, check_openai_api_key +from config.singleton import AbstractSingleton, Singleton + +__all__ = [ + "check_openai_api_key", + "AbstractSingleton", + "Config", + "Singleton", +] diff --git a/config/__pycache__/__init__.cpython-311.pyc b/config/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..165bd58174e76663b605c5ee5f8d229e24bb8273 Binary files /dev/null and b/config/__pycache__/__init__.cpython-311.pyc differ diff --git a/config/__pycache__/__init__.cpython-39.pyc b/config/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d0ca3cf70d859246d918c1055084039a03772852 Binary files /dev/null and b/config/__pycache__/__init__.cpython-39.pyc differ diff --git a/config/__pycache__/config.cpython-311.pyc b/config/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..adfce64030d3315a253b67f0a21334383ba2c5ee Binary files /dev/null and b/config/__pycache__/config.cpython-311.pyc differ diff --git a/config/__pycache__/config.cpython-39.pyc b/config/__pycache__/config.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7db2e57d52019da07128e5652cf8f38627d081ae Binary files /dev/null and b/config/__pycache__/config.cpython-39.pyc differ diff --git a/config/__pycache__/singleton.cpython-311.pyc b/config/__pycache__/singleton.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..562f78dad1cf29f462cf745c966d908b8c08f1bb Binary files /dev/null and b/config/__pycache__/singleton.cpython-311.pyc differ diff --git a/config/__pycache__/singleton.cpython-39.pyc b/config/__pycache__/singleton.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e4ee71f050a9ff565e0fb759f32f3569de319664 Binary files /dev/null and b/config/__pycache__/singleton.cpython-39.pyc differ diff --git a/config/config.py b/config/config.py new file mode 100644 index 0000000000000000000000000000000000000000..97f1d2190585b966e70d5280d968330cd5aec932 --- /dev/null +++ b/config/config.py @@ -0,0 +1,82 @@ +"""Configuration class to store the state of bools for different scripts access.""" +import os + +import openai +from colorama import Fore +from dotenv import load_dotenv + +from config.singleton import Singleton + +load_dotenv(verbose=True) + + +class Config(metaclass=Singleton): + """ + Configuration class to store the state of bools for different scripts access. + """ + + def __init__(self) -> None: + """Initialize the Config class""" + self.debug_mode = False + self.allow_downloads = False + + self.selenium_web_browser = os.getenv("USE_WEB_BROWSER", "chrome") + self.fast_llm_model = os.getenv("FAST_LLM_MODEL", "gpt-3.5-turbo") + self.smart_llm_model = os.getenv("SMART_LLM_MODEL", "gpt-4") + self.fast_token_limit = int(os.getenv("FAST_TOKEN_LIMIT", 8000)) + self.smart_token_limit = int(os.getenv("SMART_TOKEN_LIMIT", 8000)) + self.browse_chunk_max_length = int(os.getenv("BROWSE_CHUNK_MAX_LENGTH", 8192)) + + self.openai_api_key = os.getenv("OPENAI_API_KEY") + self.openai_api_base = os.getenv("OPENAI_API_BASE", openai.api_base) + self.temperature = float(os.getenv("TEMPERATURE", "1")) + + self.user_agent = os.getenv( + "USER_AGENT", + "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36" + " (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36", + ) + + self.memory_backend = os.getenv("MEMORY_BACKEND", "local") + # Initialize the OpenAI API client + openai.api_key = self.openai_api_key + + def set_fast_llm_model(self, value: str) -> None: + """Set the fast LLM model value.""" + self.fast_llm_model = value + + def set_smart_llm_model(self, value: str) -> None: + """Set the smart LLM model value.""" + self.smart_llm_model = value + + def set_fast_token_limit(self, value: int) -> None: + """Set the fast token limit value.""" + self.fast_token_limit = value + + def set_smart_token_limit(self, value: int) -> None: + """Set the smart token limit value.""" + self.smart_token_limit = value + + def set_browse_chunk_max_length(self, value: int) -> None: + """Set the browse_website command chunk max length value.""" + self.browse_chunk_max_length = value + + def set_openai_api_key(self, value: str) -> None: + """Set the OpenAI API key value.""" + self.openai_api_key = value + + def set_debug_mode(self, value: bool) -> None: + """Set the debug mode value.""" + self.debug_mode = value + + +def check_openai_api_key() -> None: + """Check if the OpenAI API key is set in config.py or as an environment variable.""" + cfg = Config() + if not cfg.openai_api_key: + print( + Fore.RED + + "Please set your OpenAI API key in .env or as an environment variable." + ) + print("You can get your key from https://platform.openai.com/account/api-keys") + exit(1) diff --git a/config/singleton.py b/config/singleton.py new file mode 100644 index 0000000000000000000000000000000000000000..55b2aeea120bbe51ca837265fcb7fbff467e55f2 --- /dev/null +++ b/config/singleton.py @@ -0,0 +1,24 @@ +"""The singleton metaclass for ensuring only one instance of a class.""" +import abc + + +class Singleton(abc.ABCMeta, type): + """ + Singleton metaclass for ensuring only one instance of a class. + """ + + _instances = {} + + def __call__(cls, *args, **kwargs): + """Call method for the singleton metaclass.""" + if cls not in cls._instances: + cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) + return cls._instances[cls] + + +class AbstractSingleton(abc.ABC, metaclass=Singleton): + """ + Abstract singleton class for ensuring only one instance of a class. + """ + + pass diff --git a/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research--3231409162574121760.txt b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research--3231409162574121760.txt new file mode 100644 index 0000000000000000000000000000000000000000..dd9c66583bafbb4658ec846b865ff22a3f41dd31 --- /dev/null +++ b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research--3231409162574121760.txt @@ -0,0 +1 @@ +[{"title": "16 Factors To Consider When Budgeting And Forecasting For Next ... - Forbes", "href": "https://www.forbes.com/sites/forbesfinancecouncil/2023/08/11/16-key-factors-to-consider-when-budgeting-and-forecasting-for-the-upcoming-year/", "body": "1. Historical Performance A crucial factor that managers need to consider when budgeting and forecasting for the upcoming year is the company's historical financial performance. Analyzing past..."}, {"title": "The Art and Science of Financial Forecast Reliability: Start Here", "href": "https://beebole.com/blog/financial-forecast-reliability/", "body": "Here are six factors that can affect financial forecast reliability. I'll dive into each one more in-depth below. Accuracy of data: The accuracy of the historical data used to create the forecast is crucial to its reliability. If the data is outdated, incomplete, or otherwise inaccurate, the forecast will not be reliable."}, {"title": "Avoid these 4 common financial forecasting mistakes", "href": "https://www.accountingtoday.com/list/avoid-these-4-common-financial-forecasting-mistakes", "body": "Avoiding these common mistakes ensures CPAs provide the best information and analysis to their clients. Executives with an accurate financial forecast in their tool belts will be able to make strategic plans for their business to grow and thrive. Justin Hatch. CEO, Reach Reporting. Technology Automation Budgets Financial reporting."}] \ No newline at end of file diff --git a/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research--8060411438590947379.txt b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research--8060411438590947379.txt new file mode 100644 index 0000000000000000000000000000000000000000..625ba8523d2866cc4a66455643b8823a57648e72 --- /dev/null +++ b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research--8060411438590947379.txt @@ -0,0 +1 @@ +[{"title": "Five Tips to Improve Your Financial Forecasts", "href": "https://www.morganfranklin.com/insights/company-insight/five-tips-improve-financial-forecasts/", "body": "Many fast-growing companies have trouble producing reliable, accurate financial forecasts. This makes it difficult to reach strategic decisions, as well as manage the expectations of investors and other stakeholders. The following five tips can be used to improve the accuracy and impact of your company's forecasting today. 1."}, {"title": "FP&A Tips: How to Improve Forecasting Accuracy in 2023? - Abacum", "href": "https://www.abacum.io/blog/6-ways-to-improve-forecast-accuracy", "body": "Ultimately, a finance team should strive to build the right data processes to improve forecasting accuracy, conduct variance analysis, adjust plans as needed, and provide greater visibility to senior management. 1. Keep your financial forecasts flexible. A company is constantly evolving. A financial forecast should reflect these changes."}, {"title": "How To Improve Your Financial Forecasting Accuracy in 30 Days", "href": "https://www.venasolutions.com/blog/how-to-improve-financial-forecasting-accuracy", "body": "14 Tips for Improving Your Financial Forecasting Accuracy in 30 Days . We prepared a list of tips below to improve the accuracy of your financial forecasting within 30 days. Many require implementing FP&A software or upgrading your legacy systems. You can also use these tips to periodically fine-tune your forecasting processes. 1."}] \ No newline at end of file diff --git a/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-1461537057981544948.txt b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-1461537057981544948.txt new file mode 100644 index 0000000000000000000000000000000000000000..cb2ac51f60fe1680c5e59fb074d77fbecbe94800 --- /dev/null +++ b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-1461537057981544948.txt @@ -0,0 +1 @@ +[{"title": "Financial Forecasting: How to Do It with Different Methods, Models ...", "href": "https://blog.hubspot.com/sales/financial-forecasting", "body": "1. What is financial forecasting? Forecasting vs. Budgeting 2. Financial Forecasting Models Top-Down Financial Forecasting Delphi Financial Forecasting Statistical Forecasting Bottom-Up Financial Forecasting 3. Financial Forecasting Methods Straight Line Simple Linear Regression Multiple Linear Regression Moving Average 4."}, {"title": "Financial Forecasting Methods and Examples | UOPX | University of Phoenix", "href": "https://www.phoenix.edu/blog/what-is-financial-forecasting.html", "body": "There are four common methods of financial forecasting: straight line, moving average, simple linear regression and multiple linear regression. If you're interested in a career in finance, a bachelor's degree in business with a certificate in finance can provide foundational skills to pursue a role in this field. What is financial forecasting?"}, {"title": "FP&A Tips: How to Improve Forecasting Accuracy in 2023? - Abacum", "href": "https://www.abacum.io/blog/6-ways-to-improve-forecast-accuracy", "body": "Ultimately, a finance team should strive to build the right data processes to improve forecasting accuracy, conduct variance analysis, adjust plans as needed, and provide greater visibility to senior management. 1. Keep your financial forecasts flexible. A company is constantly evolving. A financial forecast should reflect these changes."}] \ No newline at end of file diff --git a/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-23651813665378177.txt b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-23651813665378177.txt new file mode 100644 index 0000000000000000000000000000000000000000..60d2e75a2fe3dc5190d2c1635fc6cc28eb5cba58 --- /dev/null +++ b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-23651813665378177.txt @@ -0,0 +1 @@ +[{"title": "Challenges in creating accurate financial forecasting - Zetran", "href": "https://zetran.com/challenges-in-creating-accurate-financial-forecasting/", "body": "Financial forecasting is performed based on past business data to predict the future. Take an instant that your business average growth as 10% as a stable one for the past 4 years, you could predict your business finance for the next 4 years as 10%. While you use this kind of system wider, then you are on the way to financial forecasting problems."}, {"title": "What are the advantages and disadvantages of financial forecasting ...", "href": "https://countingup.com/resources/what-are-the-advantages-and-disadvantages-of-financial-forecasting/", "body": "One of the big advantages of forecasting is how much it helps with financial planning. If you have an idea of what the next few weeks will look like for your business, it's much easier to plan out things like stock orders. For instance, if your forecast indicates a lot of sales in the near future, you could start planning to expand your business."}, {"title": "16 Factors To Consider When Budgeting And Forecasting For Next ... - Forbes", "href": "https://www.forbes.com/sites/forbesfinancecouncil/2023/08/11/16-key-factors-to-consider-when-budgeting-and-forecasting-for-the-upcoming-year/", "body": "1. Historical Performance. A crucial factor that managers need to consider when budgeting and forecasting for the upcoming year is the company's historical financial performance. Analyzing past ..."}] \ No newline at end of file diff --git a/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-6598159491551235949.txt b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-6598159491551235949.txt new file mode 100644 index 0000000000000000000000000000000000000000..5d96907c81fc5aaffa8e9e9e5f90ae1fbbee8935 --- /dev/null +++ b/outputs/Does accurate and reliable financial forecasting remain an elusive goal/research-6598159491551235949.txt @@ -0,0 +1 @@ +[{"title": "What are the advantages and disadvantages of financial forecasting ...", "href": "https://countingup.com/resources/what-are-the-advantages-and-disadvantages-of-financial-forecasting/", "body": "One of the big advantages of forecasting is how much it helps with financial planning. If you have an idea of what the next few weeks will look like for your business, it's much easier to plan out things like stock orders. For instance, if your forecast indicates a lot of sales in the near future, you could start planning to expand your business."}, {"title": "Financial Forecasting Models: Pros, Cons & Tips from Experts [Free ...", "href": "https://www.highradius.com/resources/treasury/blogs/financial-forecasting-models/", "body": "Introduction Forecasting is like looking into a crystal ball with data instead of magic. It's a strategic tool for risk management, maintaining fiscal discipline, and charting your business's roadmap. However, the secret sauce lies in picking the suitable forecasting model tailored to your business context and updating it at the correct intervals."}, {"title": "Challenges & Limitations of Financial Forecasting | Sapling", "href": "https://www.sapling.com/7876921/challenges-limitations-financial-forecasting", "body": "Projected financial statements also are used to prepare business valuations, which may be needed for financial reporting purposes, estate planning, mergers and acquisitions, or even corporate litigation. Preparing financial forecasts requires complex analyses, which are subject to a number of limitations and challenges."}] \ No newline at end of file diff --git a/outputs/Is Apple stock stable/research--1807787156852143573.txt b/outputs/Is Apple stock stable/research--1807787156852143573.txt new file mode 100644 index 0000000000000000000000000000000000000000..82e70b0276b9b2e3c35c2cc55e538f3df94742f9 --- /dev/null +++ b/outputs/Is Apple stock stable/research--1807787156852143573.txt @@ -0,0 +1 @@ +[{"title": "Apple Inc. (AAPL) Stock Historical Prices & Data - Yahoo Finance", "href": "https://finance.yahoo.com/quote/AAPL/history", "body": "Discover historical prices for AAPL stock on Yahoo Finance. View daily, weekly or monthly format back to when Apple Inc. stock was issued."}, {"title": "Apple - 43 Year Stock Price History | AAPL | MacroTrends", "href": "https://www.macrotrends.net/stocks/charts/AAPL/apple/stock-price-history", "body": "Market Cap. Historical daily share price chart and data for Apple since 1980 adjusted for splits and dividends. The latest closing stock price for Apple as of August 02, 2023 is 192.58. The all-time high Apple stock closing price was 196.45 on July 31, 2023. The Apple 52-week high stock price is 198.23, which is 2.9% above the current share price."}, {"title": "Apple (AAPL) Historical Data | Nasdaq", "href": "https://www.nasdaq.com/market-activity/stocks/aapl/historical", "body": "Back to AAPL Overview. Get up to 10 years of daily historical stock prices & volumes. The \"Close/Last\" is the \"adjust consolidated close price\". Data provided by Edgar Online . The net and ..."}] \ No newline at end of file diff --git a/outputs/Is Apple stock stable/research--5414072335408872885.txt b/outputs/Is Apple stock stable/research--5414072335408872885.txt new file mode 100644 index 0000000000000000000000000000000000000000..8f6875ae0e78b00ef1059a54e10f721274073bd3 --- /dev/null +++ b/outputs/Is Apple stock stable/research--5414072335408872885.txt @@ -0,0 +1 @@ +[{"title": "Is Apple Stock a Buy Now? | The Motley Fool", "href": "https://www.fool.com/investing/2023/06/29/is-apple-stock-a-buy-now/", "body": "Key Points. Apple shares have soared over 40% this year. Apple's history of reliability has led Wall Street to see its stock as a haven during uncertain market conditions. Apple continues to grow ..."}, {"title": "Apple Inc. : Analyst Recommendations and Opinions - MarketScreener.com", "href": "https://www.marketscreener.com/quote/stock/APPLE-INC-4849/news-broker-research/", "body": "Piper Sandler Adjusts Price Target on Apple to $220 From $180, Maintains Overweight Rating. Jul. 31. MT. Bernstein Adjusts Apple's Price Target to $195 From $175, Keeps Market Perform Rating. Jul. 27. MT. Deutsche Bank Adjusts Apple Price Target to $210 From $180, Maintains Buy Rating. Jul. 24."}, {"title": "Apple Outlook: What Analysts Are Saying About AAPL Stock Now", "href": "https://investorplace.com/2023/03/apple-outlook-what-analysts-are-saying-about-aapl-stock-now/", "body": "Some Wall Street experts are enthusiastic about AAPL stock, but the reviews are mixed and investors must consider Apple's pros and cons. ... of expert opinions on Apple, and perhaps arrive at an ..."}] \ No newline at end of file diff --git a/outputs/Is Apple stock stable/research--5887948791887317687.txt b/outputs/Is Apple stock stable/research--5887948791887317687.txt new file mode 100644 index 0000000000000000000000000000000000000000..7ae481d9736074e7681e2ac2898109b377f326b3 --- /dev/null +++ b/outputs/Is Apple stock stable/research--5887948791887317687.txt @@ -0,0 +1 @@ +[{"title": "What Moves Apple's Stock Price? - Investopedia", "href": "https://www.investopedia.com/stock-analysis/061115/what-moves-apples-stock-price-aapl.aspx", "body": "In the meantime, Apple stock prices will likely be driven by the following five factors: iPhone Sales iPhone sales are the largest revenue generator for the company. For 2019, sales of the..."}, {"title": "Apple Stock Predictions: 2023 To 2025 - Forbes", "href": "https://www.forbes.com/sites/qai/2022/12/28/apple-stock-predictions-2023-to-2025/", "body": "There are still many macroeconomic factors impacting major companies and the tech industry. With that said, rumors are swirling that Apple will release a new product category in 2023 in the..."}, {"title": "Investing In Apple: The Risks and Rewards - Investopedia", "href": "https://www.investopedia.com/stock-analysis/021815/investing-apple-risks-rewards-aapl.aspx", "body": "A slowdown in any of the following could materially reduce Apple's multiple and stock price: overall smartphone market growth, iPhone market share growth, or penetration into China."}] \ No newline at end of file diff --git a/outputs/Is Apple stock stable/research--8009323857187544909.txt b/outputs/Is Apple stock stable/research--8009323857187544909.txt new file mode 100644 index 0000000000000000000000000000000000000000..82808098ed72b2c96618d7bd49f8ed1516849f33 --- /dev/null +++ b/outputs/Is Apple stock stable/research--8009323857187544909.txt @@ -0,0 +1 @@ +[{"title": "Apple Stock Predictions: 2023 To 2025 - Forbes", "href": "https://www.forbes.com/sites/qai/2022/12/28/apple-stock-predictions-2023-to-2025/", "body": "Analysts predict that the company's stock should go up in 2023. Strong iPhone and Mac computer sales led to Apple reporting a record quarterly revenue of $90.1 billion during a time when many..."}, {"title": "Apple Analyst Expects Stock To Hit $210 On 2024 Earnings Projections ...", "href": "https://markets.businessinsider.com/news/stocks/apple-analyst-expects-stock-to-hit-210-on-2024-earnings-projections-iphone-delay-1032459668?op=1", "body": "AAPL Price Action: Shares of Apple had declined by 0.36% to $193.03 41.10 at the time of publishing Wednesday. See Also: Apple Settles Into 2 Bullish Patterns Mid-Week: The Bull, Bear Case For The ..."}, {"title": "Where Will Apple Stock Be in 2030? | The Motley Fool", "href": "https://www.fool.com/investing/2022/09/13/where-will-apple-stock-be-in-2030/", "body": "In fiscal 2021, Apple generated $366 billion in annual sales. $297 billion, or 81%, came from its products segment, which includes the iPhone, iPad, and Mac. The other $68 billion, or 19%, came..."}] \ No newline at end of file diff --git a/outputs/Is Apple stock stable/research-1198675951194370776.txt b/outputs/Is Apple stock stable/research-1198675951194370776.txt new file mode 100644 index 0000000000000000000000000000000000000000..60ecf574bf39cdc7bdcc434a2a584000178c1c5a --- /dev/null +++ b/outputs/Is Apple stock stable/research-1198675951194370776.txt @@ -0,0 +1 @@ +[{"title": "Apple Competitors and Alternatives 2023 (NASDAQ:AAPL) - MarketBeat", "href": "https://www.marketbeat.com/stocks/NASDAQ/AAPL/competitors-and-alternatives/", "body": "Should you be buying Apple stock or one of its competitors? The main competitors of Apple include Microsoft (MSFT), Alphabet (GOOG), Alphabet (GOOGL), NVIDIA (NVDA), Meta Platforms (META), Dell Technologies (DELL), Super Micro Computer (SMCI), One Stop Systems (OSS), Socket Mobile (SCKT), and Taiwan Semiconductor Manufacturing (TSM)."}, {"title": "Apple Inc. (AAPL) Key Stats Comparison | Seeking Alpha", "href": "https://seekingalpha.com/symbol/AAPL/peers/comparison", "body": "Apple Inc. (AAPL) key stats comparison: compare with other stocks by metrics: valuation, growth, profitability, momentum, EPS revisions, dividends, ratings."}, {"title": "AAPL - Apple Stock Competitors - Barchart.com", "href": "https://www.barchart.com/stocks/quotes/AAPL/competitors", "body": "About Weighted Alpha. Weighted Alpha is a measure of how much a stock has risen or fallen over a one-year period. The original research was restricted to large cap stocks, so the corresponding rise in the S&P 500 index was subtracted; however, as there are a number of interesting stocks that do not fit well into any category, and others that ..."}] \ No newline at end of file diff --git a/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--1651681628346444407.txt b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--1651681628346444407.txt new file mode 100644 index 0000000000000000000000000000000000000000..c93c3a7e066328dd0beef2fec85ee3a789ab4bc9 --- /dev/null +++ b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--1651681628346444407.txt @@ -0,0 +1 @@ +[{"title": "Trends in electric vehicles: what can we expect in 2023?", "href": "https://evmagazine.com/mobility/trends-in-electric-vehicles-what-can-we-expect-in-2023", "body": "Opinion piece provided by Sammie Eastwood, Guest Editor. A lot has happened in 2022 when it comes to the world of electric vehicles (EVs), and 2023 is set to be even bigger bringing more advancements in the EV market.Technology in the sector is moving in leaps and bounds, and, despite supply chain disruptions putting strain on manufacturers, 2023 is set to be one of the best years for electric ..."}, {"title": "3 Predictions For Electric Vehicles In 2023 - Forbes", "href": "https://www.forbes.com/sites/jamesmorris/2022/12/31/3-predictions-for-electric-vehicles-in-2023/", "body": "Forbes Innovation Sustainability 3 Predictions For Electric Vehicles In 2023 James Morris Contributor I write about the rapidly growing world of electric vehicles Dec 31, 2022,05:00am..."}, {"title": "Issues and Opportunities for the Electric Vehicles Industry in 2023", "href": "https://www.morganlewis.com/pubs/2023/02/issues-and-opportunities-for-the-electric-vehicles-industry-in-2023", "body": "February 27, 2023. Electrification efforts of the US transportation sector are strong and growing. More than 800,000 fully electric vehicles (EVs) were sold in the United States in 2022, nearly 6% of all vehicles sold. In comparison, 3.2% of all vehicles sold in 2021 were fully EVs."}] \ No newline at end of file diff --git a/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8662589002880032977.txt b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8662589002880032977.txt new file mode 100644 index 0000000000000000000000000000000000000000..31e8e30b57deb9fefb06bfae1872d300e3d49f1e --- /dev/null +++ b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8662589002880032977.txt @@ -0,0 +1 @@ +[{"title": "Electric vehicles", "href": "https://www2.deloitte.com/us/en/insights/focus/future-of-mobility/electric-vehicle-trends-2030.html", "body": "Since Deloitte last presented a forecast for electric vehicle (EV) sales, in January 2019, the EV market has made great strides, and not just in terms of sales. OEMs have invested billions to deliver new electrified models, from R&D to factory redesign. Consumer attitudes have evolved. Government interventions have pushed forward and pulled back."}, {"title": "Driving into 2025: The Future of Electric Vehicles | J.P. Morgan", "href": "https://www.jpmorgan.com/insights/research/electric-vehicles", "body": "Comparatively, in 2016 just under 1 million vehicles or 1% of global auto sales came from plug-in electric vehicles (PEVs). 1. By 2025, J.P. Morgan estimates this will rise close to 8.4 million vehicles or a 7.7% market share. While this jump is significant, it doesn't compare to the kind of growth expected in HEVs - cars that combine a fuel ..."}, {"title": "Issues and Opportunities for the Electric Vehicles Industry in 2023", "href": "https://www.morganlewis.com/pubs/2023/02/issues-and-opportunities-for-the-electric-vehicles-industry-in-2023", "body": "February 27, 2023 Electrification efforts of the US transportation sector are strong and growing. More than 800,000 fully electric vehicles (EVs) were sold in the United States in 2022, nearly 6% of all vehicles sold. In comparison, 3.2% of all vehicles sold in 2021 were fully EVs."}] \ No newline at end of file diff --git a/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8816113149947165191.txt b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8816113149947165191.txt new file mode 100644 index 0000000000000000000000000000000000000000..a6e8cd9e003f21322e68772a75362f587d9b00ea --- /dev/null +++ b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research--8816113149947165191.txt @@ -0,0 +1 @@ +[{"title": "Issues and Opportunities for the Electric Vehicles Industry in 2023", "href": "https://www.morganlewis.com/pubs/2023/02/issues-and-opportunities-for-the-electric-vehicles-industry-in-2023", "body": "February 27, 2023 Electrification efforts of the US transportation sector are strong and growing. More than 800,000 fully electric vehicles (EVs) were sold in the United States in 2022, nearly 6% of all vehicles sold. In comparison, 3.2% of all vehicles sold in 2021 were fully EVs."}, {"title": "3 Picks & Shovels Ways to Play the EV Sector in 2023", "href": "https://investorplace.com/2023/08/3-picks-shovels-ways-to-play-the-ev-sector-in-2023/", "body": "There are many ways to profit off of this sector, and here are three of the best. The EV market is one of the best sectors to look into and invest in, and here are three of our picks. Lithium ..."}, {"title": "Inside the $455 billion U.S. investment in electric vehicles", "href": "https://pv-magazine-usa.com/2023/01/17/inside-the-455-billion-u-s-investment-in-electric-vehicles/", "body": "Major automaker announcements have included: Ford - $50 billion announced, EV manufacturing in Kentucky, Michigan, Missouri, Ohio, and Tennessee, and Cologne, Germany. General Motors - $35 billion globally by 2030, EV manufacturing in Indiana, Michigan, Ohio, and Tennessee, Canada, and Mexico."}] \ No newline at end of file diff --git a/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-7102211584855250932.txt b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-7102211584855250932.txt new file mode 100644 index 0000000000000000000000000000000000000000..a950405e8f0c98d30d102c63d846d2e26807ceff --- /dev/null +++ b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-7102211584855250932.txt @@ -0,0 +1 @@ +[{"title": "Car Market Outlook: What To Expect In 2023", "href": "https://www.forbes.com/wheels/features/car-market-outlook-2023/", "body": "Of all the electric (and non-electric) vehicles on the market in 2023, only the Chevrolet Bolt and Bolt EUV had drastic price cuts. Now $6,000 cheaper, both are some of the first genuinely..."}, {"title": "Electric vehicle production set to surge in 2023 despite low sales", "href": "https://www.reuters.com/business/autos-transportation/electric-vehicles-confront-leap-mass-market-2022-12-15/", "body": "Electric vehicle production set to surge in 2023 despite low sales By Joseph White December 15, 20224:02 PM PSTUpdated 8 months ago DETROIT, Dec 15 (Reuters) - The past year was sobering for..."}, {"title": "Four 2023 Electric Vehicle Trends to Watch - Bloomberg", "href": "https://www.bloomberg.com/news/articles/2022-12-31/four-2023-electric-vehicle-trends-to-watch", "body": "The $100,000+ market isn't slowing down. Plenty of swankier SUVs are in the offing in 2023, including a version of GMC's Hummer EV, with a price tag squarely in six-figure territory; the first ..."}] \ No newline at end of file diff --git a/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-8699972586918080875.txt b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-8699972586918080875.txt new file mode 100644 index 0000000000000000000000000000000000000000..cfe901782cf40375028429d8eaafd70abb5f9a68 --- /dev/null +++ b/outputs/Is it advisable to make investments in the electric car industry during the year 2023/research-8699972586918080875.txt @@ -0,0 +1 @@ +[{"title": "Electric vehicle trends | Deloitte Insights", "href": "https://www2.deloitte.com/us/en/insights/focus/future-of-mobility/electric-vehicle-trends-2030.html", "body": "Since Deloitte last presented a forecast for electric vehicle (EV) sales, in January 2019, the EV market has made great strides, and not just in terms of sales. OEMs have invested billions to deliver new electrified models, from R&D to factory redesign. Consumer attitudes have evolved. Government interventions have pushed forward and pulled back."}, {"title": "Electric Vehicle (EV) Trends In 2023 - GreenLancer", "href": "https://www.greenlancer.com/post/ev-market-trends", "body": "The Chevy Silverado EV is set to launch with a price tag of over $100,000. The 2023 Nissan Ariya crossover SUV boasts a range of up to 304 miles. The sleek BMW i5 will have a driving range of 372 miles and a starting cost between $65,000 and $70,000. The futuristic and stylish Hyundai Ioniq 6, with a starting price of $44,000 and a range of 320 ..."}, {"title": "Driving into 2025: The Future of Electric Vehicles | J.P. Morgan", "href": "https://www.jpmorgan.com/insights/research/electric-vehicles", "body": "By 2025, J.P. Morgan estimates this will rise close to 8.4 million vehicles or a 7.7% market share. While this jump is significant, it doesn't compare to the kind of growth expected in HEVs - cars that combine a fuel engine with electric elements. This sector is forecast to swell from just 3% of global market share to more than 25 million ..."}] \ No newline at end of file diff --git a/outputs/Is stock market preditable/research--3587500053730333696.txt b/outputs/Is stock market preditable/research--3587500053730333696.txt new file mode 100644 index 0000000000000000000000000000000000000000..1407f181cd9b317115b8aa559cea9982bd1642ce --- /dev/null +++ b/outputs/Is stock market preditable/research--3587500053730333696.txt @@ -0,0 +1 @@ +[{"title": "Technical Analysis of Stocks and Trends Definition - Investopedia", "href": "https://www.investopedia.com/terms/t/technical-analysis-of-stocks-and-trends.asp", "body": "Technical analysis is the study of historical market data, including price and volume. Using insights from market psychology, behavioral economics, and quantitative analysis, technical..."}, {"title": "Stock Analysis: Different Methods for Evaluating Stocks - Investopedia", "href": "https://www.investopedia.com/terms/s/stock-analysis.asp", "body": "Technical analysis of stocks and trends is the study of historical market data, including price and volume, to predict future market behavior. more Financial Analysis: Definition, Importance ..."}, {"title": "Understanding Trend Analysis and Trend Trading Strategies - Investopedia", "href": "https://www.investopedia.com/terms/t/trendanalysis.asp", "body": "Trend analysis is a technique used in technical analysis that attempts to predict future stock price movements based on recently observed trend data. Trend analysis uses historical..."}] \ No newline at end of file diff --git a/outputs/Is stock market preditable/research--519710563678446545.txt b/outputs/Is stock market preditable/research--519710563678446545.txt new file mode 100644 index 0000000000000000000000000000000000000000..c0f43a980fdc5f09875f05d54249a9d2e2fc8e41 --- /dev/null +++ b/outputs/Is stock market preditable/research--519710563678446545.txt @@ -0,0 +1 @@ +[{"title": "5 Economic Factors That Influence Stocks - U.S. News", "href": "https://money.usnews.com/money/blogs/the-smarter-mutual-fund-investor/slideshows/economic-factors-that-influence-stocks", "body": "While it's impossible to completely predict the stock market, or time the perfect strategy, there are a few indicators to get a feel for what could be coming.Some economic factors influence ..."}, {"title": "Warning! The Stock Market Seems Confused - August 14, 2023", "href": "https://www.nasdaq.com/articles/warning-the-stock-market-seems-confused-august-14-2023", "body": "News & Insights. Warning! The Stock Market Seems Confused - August 14, 2023. Company earnings and the Federal Reserve's monetary policies are the two most significant factors affecting stock ..."}, {"title": "A Study of Stock Market Predictability Based on Financial ... - Hindawi", "href": "https://www.hindawi.com/journals/misy/2022/8077277/", "body": "Introduction In today's globalized economy and financial integration, the stock market is continuously complicated, presenting many deviations that classical financial analysis and economic theory are unable to explain."}] \ No newline at end of file diff --git a/outputs/Is stock market preditable/research-2876401626239259737.txt b/outputs/Is stock market preditable/research-2876401626239259737.txt new file mode 100644 index 0000000000000000000000000000000000000000..d3a61ce8eb39e71aa3557ccfd19bf56e8d663f04 --- /dev/null +++ b/outputs/Is stock market preditable/research-2876401626239259737.txt @@ -0,0 +1 @@ +[{"title": "Experts Predict How the Stock Market Will Perform for the Rest of 2023", "href": "https://finance.yahoo.com/news/experts-predict-stock-market-perform-130011212.html", "body": "Experts Predict How the Stock Market Will Perform for the Rest of 2023 Jamela Adam July 24, 2023 at 9:00 AM \u00b7 5 min read Jackie Niam / Getty Images/iStockphoto The stock market..."}, {"title": "Opinion: The worst is over for the stock market | CNN", "href": "https://www.cnn.com/2023/01/05/opinions/stock-market-prediction-zandi/index.html", "body": "CNN \u2014. The worst is over for the stock market, in my view. I base that prediction on the expectation that the Federal Reserve is close to the end of its interest rate hikes and that a full-blown ..."}, {"title": "Stock market outlook for 2023: Here's what experts predict amid ...", "href": "https://finance.yahoo.com/news/stock-market-outlook-2023-experts-141100877.html", "body": "Stock market outlook for 2023: Here's what experts predict amid recession fears James Royal, Bankrate January 14, 2023 at 9:11 AM \u00b7 8 min read Michael M. Santiago\u2014Getty Images This article..."}] \ No newline at end of file diff --git a/outputs/Is stock market preditable/research-4011667556710041182.txt b/outputs/Is stock market preditable/research-4011667556710041182.txt new file mode 100644 index 0000000000000000000000000000000000000000..8c3b318cb7a604baf212e519730b2d044b419263 --- /dev/null +++ b/outputs/Is stock market preditable/research-4011667556710041182.txt @@ -0,0 +1 @@ +[{"title": "Predicting stock market using machine learning: best and ... - Springer", "href": "https://link.springer.com/article/10.1007/s13198-022-01811-1", "body": "Predicting stock market using machine learning: best and accurate way to know future stock prices | SpringerLink Home Article REVIEW PAPER Published: 09 January 2023 Predicting stock market using machine learning: best and accurate way to know future stock prices Dhruhi Sheth & Manan Shah"}, {"title": "Stock Market Prediction via Deep Learning Techniques: A Survey", "href": "https://arxiv.org/abs/2212.12717", "body": "Existing surveys on stock market prediction often focus on traditional machine learning methods instead of deep learning methods. This motivates us to provide a structured and comprehensive overview of the research on stock market prediction."}, {"title": "A Study of Stock Market Predictability Based on Financial ... - Hindawi", "href": "https://www.hindawi.com/journals/misy/2022/8077277/", "body": "1. Introduction In today's globalized economy and financial integration, the stock market is continuously complicated, presenting many deviations that classical financial analysis and economic theory are unable to explain."}] \ No newline at end of file diff --git a/outputs/Is stock market preditable/research-4190053158498481238.txt b/outputs/Is stock market preditable/research-4190053158498481238.txt new file mode 100644 index 0000000000000000000000000000000000000000..0f9bf4f708b057794a3ec4228ed4de69f2ebc58b --- /dev/null +++ b/outputs/Is stock market preditable/research-4190053158498481238.txt @@ -0,0 +1 @@ +[{"title": "Efficient Market Hypothesis (EMH): Definition and Critique - Investopedia", "href": "https://www.investopedia.com/terms/e/efficientmarkethypothesis.asp", "body": "Investopedia / Theresa Chiechi What Is the Efficient Market Hypothesis (EMH)? The efficient market hypothesis (EMH), alternatively known as the efficient market theory, is a hypothesis..."}, {"title": "Stock Market Predictability: Is it There? A Critical Review - CiteSeerX", "href": "https://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.137.7294", "body": "Thus, stock market predictability is now taken almost as a feature of the data. However, there is less consensus on what drives this predictability. It may reflect time-varying risk premiums, it may reflect irrational behavior on the part of market participants, or it may simply not present in the data \u2014 a statistical fluke due to poor ..."}, {"title": "Why You Shouldn't Predict the Market | Towards Data Science", "href": "https://towardsdatascience.com/quit-trying-to-predict-the-market-27d77149a709", "body": "This is precisely why almost every source imaginable shows that buy and hold strategies are far more time-efficient and lucrative than trying to time or predict the market. Now, with this being said, you can technically create a model that factors in all the known factors that have moved the markets before. However, the vast majority of market ..."}] \ No newline at end of file diff --git a/outputs/Should I invest in the Large Language Model industry in 2023/research--2012672616352147449.txt b/outputs/Should I invest in the Large Language Model industry in 2023/research--2012672616352147449.txt new file mode 100644 index 0000000000000000000000000000000000000000..fe91b31cee0a902133c777d9f70f680fe0d70901 --- /dev/null +++ b/outputs/Should I invest in the Large Language Model industry in 2023/research--2012672616352147449.txt @@ -0,0 +1 @@ +[{"title": "Top Investing Trends For 2023 - Forbes Advisor", "href": "https://www.forbes.com/advisor/investing/top-investing-trends-2023/", "body": "With 2022 drawing to a close, the S&P 500 has clawed its way out of bear market territory but remains down 17% as of this writing. As we look ahead to 2023, here are nine investing trends that can ..."}, {"title": "Global Risks Report 2023: the biggest risks facing the world", "href": "https://www.weforum.org/agenda/2023/01/these-are-the-biggest-risks-facing-the-world-global-risks-2023/", "body": "Davos 2023. The World Economic Forum's latest Global Risks Report identifies the key risks facing the world over the next decade. In the next two years, the cost-of-living crisis is seen as the biggest risk, while over the next 10 years environmental risks dominate. The interconnectedness of global risks and crises is giving rise to the threat ..."}, {"title": "Global Risks Report 2023: We know what the risks are - here's what ...", "href": "https://www.weforum.org/agenda/2023/01/global-risks-report-2023-experts-davos2023/", "body": "The urgency of a cost of living crisis dominates 2023's Global Risks Report, which is in danger of deprioritizing other risks. Experts at the World Economic Forum give their insights into how their sectors are seeking to manage risks, build resilience and use new opportunities to shore up defences in 2023."}] \ No newline at end of file diff --git a/outputs/What are Traditional Financial Forecasting Models/research--1406000685271303455.txt b/outputs/What are Traditional Financial Forecasting Models/research--1406000685271303455.txt new file mode 100644 index 0000000000000000000000000000000000000000..2a85ac40d232f509e1cbc27353c676c8fb34b302 --- /dev/null +++ b/outputs/What are Traditional Financial Forecasting Models/research--1406000685271303455.txt @@ -0,0 +1 @@ +[{"title": "Challenges & Limitations of Financial Forecasting | Sapling", "href": "https://www.sapling.com/7876921/challenges-limitations-financial-forecasting", "body": "Projected financial statements also are used to prepare business valuations, which may be needed for financial reporting purposes, estate planning, mergers and acquisitions, or even corporate litigation. Preparing financial forecasts requires complex analyses, which are subject to a number of limitations and challenges."}, {"title": "What are the advantages and disadvantages of financial forecasting ...", "href": "https://countingup.com/resources/what-are-the-advantages-and-disadvantages-of-financial-forecasting/", "body": "One of the big advantages of forecasting is how much it helps with financial planning. If you have an idea of what the next few weeks will look like for your business, it's much easier to plan out things like stock orders. For instance, if your forecast indicates a lot of sales in the near future, you could start planning to expand your business."}, {"title": "Financial Forecasting Models: Pros, Cons & Tips from Experts [Free ...", "href": "https://www.highradius.com/resources/treasury/blogs/financial-forecasting-models/", "body": "Introduction Forecasting is like looking into a crystal ball with data instead of magic. It's a strategic tool for risk management, maintaining fiscal discipline, and charting your business's roadmap. However, the secret sauce lies in picking the suitable forecasting model tailored to your business context and updating it at the correct intervals."}] \ No newline at end of file diff --git a/outputs/What are Traditional Financial Forecasting Models/research-2141250224339014177.txt b/outputs/What are Traditional Financial Forecasting Models/research-2141250224339014177.txt new file mode 100644 index 0000000000000000000000000000000000000000..0348bc77e2022299a10b65c894e439b730c6235c --- /dev/null +++ b/outputs/What are Traditional Financial Forecasting Models/research-2141250224339014177.txt @@ -0,0 +1 @@ +[{"title": "5 Financial Forecasting Models and Examples of Use Cases", "href": "https://baremetrics.com/blog/5-financial-forecasting-models-and-examples-of-use-cases", "body": "You can use this to see that your current revenue is 200 \u00d7 $25 = $5,000 and will increase by 5 \u00d7 $25 = $125 per month. 3. Delphi forecasting models. The Delphi method is a model where you get your forecast from a group of experts, leveraging a facilitator and continuously collaboratively iterating on hypotheses and analyses to reach a ..."}, {"title": "Financial Forecasting: How to Do It with Different Methods, Models ...", "href": "https://blog.hubspot.com/sales/financial-forecasting", "body": "1. What is financial forecasting? Forecasting vs. Budgeting 2. Financial Forecasting Models Top-Down Financial Forecasting Delphi Financial Forecasting Statistical Forecasting Bottom-Up Financial Forecasting 3. Financial Forecasting Methods Straight Line Simple Linear Regression Multiple Linear Regression Moving Average 4."}, {"title": "6 Types of Financial Forecasting Models (Plus Importance)", "href": "https://www.indeed.com/career-advice/career-development/financial-forecasting-models", "body": "Decision-making: Financial forecasting models help the management understand the business position and make short-and long-term decisions. You can learn from the past and accurately predict the future, such as foreseeing competition and market changes."}] \ No newline at end of file diff --git a/outputs/What are Traditional Financial Forecasting Models/research-2615488845037326777.txt b/outputs/What are Traditional Financial Forecasting Models/research-2615488845037326777.txt new file mode 100644 index 0000000000000000000000000000000000000000..2d176f06f01ffe2af8f263908ba5e4fd7a13dece --- /dev/null +++ b/outputs/What are Traditional Financial Forecasting Models/research-2615488845037326777.txt @@ -0,0 +1 @@ +[{"title": "Forecasting Methods in Finance | Annual Review of Financial Economics", "href": "https://www.annualreviews.org/doi/abs/10.1146/annurev-financial-110217-022713", "body": "Our review highlights some of the key challenges in financial forecasting problems and opportunities arising from the unique features of financial data. We analyze the difficulty of establishing predictability in an environment with a low signal-to-noise ratio, persistent predictors, and instability in predictive relations arising from ..."}, {"title": "Rolling Forecast Model vs. Traditional budget: Pros and Cons", "href": "https://www.talentia-software.com/en/traditional-budget-vs-rolling-forecast-pros-and-cons/", "body": "1. Anticipate industry trends Rolling forecasts allow you to review your original budget and make adjustments to future periods. They are particularly useful for fast-growing and dynamic businesses that may have difficulty nailing down future financial predictions. A traditional budget may be sufficient for small businesses."}, {"title": "Financial Forecasting vs. Financial Modeling: What's the Difference?", "href": "https://www.investopedia.com/ask/answers/difference-between-financial-forecasting-and-financial-modeling/", "body": "Financial Forecasting vs. Financial Modeling: An Overview. Financial forecasting is the process by which a company thinks about and prepares for the future. Forecasting involves determining the ..."}] \ No newline at end of file diff --git a/outputs/What are Traditional Financial Forecasting Models/research-3706249024069042673.txt b/outputs/What are Traditional Financial Forecasting Models/research-3706249024069042673.txt new file mode 100644 index 0000000000000000000000000000000000000000..f00084493630897561f493f137ccb197f7b3a7e2 --- /dev/null +++ b/outputs/What are Traditional Financial Forecasting Models/research-3706249024069042673.txt @@ -0,0 +1 @@ +[{"title": "What are the advantages and disadvantages of financial forecasting ...", "href": "https://countingup.com/resources/what-are-the-advantages-and-disadvantages-of-financial-forecasting/", "body": "One of the big advantages of forecasting is how much it helps with financial planning. If you have an idea of what the next few weeks will look like for your business, it's much easier to plan out things like stock orders. For instance, if your forecast indicates a lot of sales in the near future, you could start planning to expand your business."}, {"title": "Financial Forecasting vs. Financial Modeling: What's the Difference?", "href": "https://www.investopedia.com/ask/answers/difference-between-financial-forecasting-and-financial-modeling/", "body": "Financial forecasting is the process in which a company determines the expectations of future results. Financial modeling takes the financial forecasts and builds a predictive model that helps a ..."}, {"title": "Financial Forecasting - Understand the Importance & Methodology to ...", "href": "https://finmodelslab.com/blogs/blog/financial-forecasting", "body": "By forecasting cash flows and income, organizations can better anticipate their financial needs and make decisions based on current and projected market conditions. Financial forecasting also helps organizations to minimize risks and maximize their long-term success."}] \ No newline at end of file diff --git a/outputs/What are Traditional Financial Forecasting Models/research-4363871688954188453.txt b/outputs/What are Traditional Financial Forecasting Models/research-4363871688954188453.txt new file mode 100644 index 0000000000000000000000000000000000000000..9fa47dd23e4065143a8c360547004b61080a19ba --- /dev/null +++ b/outputs/What are Traditional Financial Forecasting Models/research-4363871688954188453.txt @@ -0,0 +1 @@ +[{"title": "Financial Forecasting vs. Financial Modeling: What's the Difference?", "href": "https://www.investopedia.com/ask/answers/difference-between-financial-forecasting-and-financial-modeling/", "body": "Financial forecasting is the process in which a company determines the expectations of future results. Financial modeling takes the financial forecasts and builds a predictive model that helps a ..."}, {"title": "Financial Forecasting vs. Financial Modeling: Key Differences", "href": "https://www.netsuite.com/portal/resource/articles/financial-management/financial-forecasting-financial-modeling.shtml", "body": "Financial forecasting is the process of projecting how a business will perform during a future reporting period. Financial modeling is the process of gathering information from forecasts and other data, then simulating discrete scenarios to analyze what impact they might have on the company's financial health. Business planning teams often ..."}, {"title": "Financial Forecasting vs Financial Modeling: 5 Key Differences", "href": "https://www.insightsforprofessionals.com/finance/accounting/financial-forecasting-vs-financial-modeling", "body": "1. Modeling plays a bigger role in decisions. It's in the company's decision-making process that arguably the most important difference between financial forecasting and financial modeling becomes clear. While the former focuses on predicting future performance and results, the latter uses this information to create a model the business will ..."}] \ No newline at end of file diff --git a/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--2821165325009188188.txt b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--2821165325009188188.txt new file mode 100644 index 0000000000000000000000000000000000000000..129501663dfdee57d662cb0835d6786b73d81a09 --- /dev/null +++ b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--2821165325009188188.txt @@ -0,0 +1 @@ +[{"title": "Physicists discover a new switch for superconductivity - ScienceDaily", "href": "https://www.sciencedaily.com/releases/2023/06/230622120822.htm", "body": "June 22, 2023 Source: Massachusetts Institute of Technology Summary: A study sheds surprising light on how certain superconductors undergo a 'nematic transition' -- unlocking new,..."}, {"title": "Physicists discover a new switch for superconductivity", "href": "https://news.mit.edu/2023/physicists-discover-new-switch-superconductivity-0622", "body": "June 22, 2023 Press Inquiries Caption When some ultrathin materials undergo a \"nematic transition,\" their atomic lattice structure stretches in ways that unlock superconductivity (as this conceptual image shows). MIT physicists have identified how this essential nematic switch occurs in one class of superconductors. Credits Image: iStock"}, {"title": "New Room-Temperature Superconductor Discovered by Scientists - The New ...", "href": "https://www.nytimes.com/2023/03/08/science/room-temperature-superconductor-ranga-dias.html", "body": "New Room-Temperature Superconductor Discovered by Scientists - The New York Times New Room-Temperature Superconductor Offers Tantalizing Possibilities The breakthrough could one day..."}] \ No newline at end of file diff --git a/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--5111118754196914265.txt b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--5111118754196914265.txt new file mode 100644 index 0000000000000000000000000000000000000000..ffcab6950339ab7537b85e4f7947beea9ac3f4b6 --- /dev/null +++ b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--5111118754196914265.txt @@ -0,0 +1 @@ +[{"title": "LK-99 superconductor breakthrough could mark 'new era' - New York Post", "href": "https://nypost.com/2023/08/02/lk-99-superconductor-breakthrough-could-mark-new-era/", "body": "LK-99 superconductor research breakthrough could mark 'new era for humankind'. Imagine riding a levitating train at speeds of 14,000 miles per hour \u2014 cutting the trip from New York to Los ..."}, {"title": "Superconductor Breakthrough Findings Replicated, Twice, in Preliminary ...", "href": "https://www.tomshardware.com/news/superconductor-breakthrough-replicated-twice", "body": "August 1, 2023 See more But in what's perhaps the most definite sign of a verification, Chinese researchers with the Huazhong University of Science and Technology have claimed to have successfully..."}, {"title": "Research breakthrough could be significant for quantum ... - ScienceDaily", "href": "https://www.sciencedaily.com/releases/2023/06/230628130347.htm", "body": "Summary: Scientists using one of the world's most powerful quantum microscopes have made a discovery that could have significant consequences for the future of computing. Researchers have..."}] \ No newline at end of file diff --git a/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--7173058848746146304.txt b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--7173058848746146304.txt new file mode 100644 index 0000000000000000000000000000000000000000..31804312c3ade9be4247501e54ede09691864bc9 --- /dev/null +++ b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research--7173058848746146304.txt @@ -0,0 +1 @@ +[{"title": "LK-99 superconductor breakthrough could mark 'new era' - New York Post", "href": "https://nypost.com/2023/08/02/lk-99-superconductor-breakthrough-could-mark-new-era/", "body": "Updated Imagine riding a levitating train at speeds of 14,000 miles per hour \u2014 cutting the trip from New York to Los Angeles to just 20 minutes. A team of South Korean researchers say the science..."}, {"title": "Physicists discover a new switch for superconductivity", "href": "https://news.mit.edu/2023/physicists-discover-new-switch-superconductivity-0622", "body": "Publication Date June 22, 2023 Press Inquiries Caption When some ultrathin materials undergo a \"nematic transition,\" their atomic lattice structure stretches in ways that unlock superconductivity (as this conceptual image shows). MIT physicists have identified how this essential nematic switch occurs in one class of superconductors. Credits"}, {"title": "New Room-Temperature Superconductor Discovered by Scientists - The New ...", "href": "https://www.nytimes.com/2023/03/08/science/room-temperature-superconductor-ranga-dias.html", "body": "This week's announcement is the latest attempt in that effort, but it comes from a team that faces wide skepticism because a 2020 paper that described a promising but less practical superconducting..."}] \ No newline at end of file diff --git a/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research-1874061891885786097.txt b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research-1874061891885786097.txt new file mode 100644 index 0000000000000000000000000000000000000000..1b0567a0b2766ac32a223072387353a54eb93ae3 --- /dev/null +++ b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research-1874061891885786097.txt @@ -0,0 +1 @@ +[{"title": "New Room-Temperature Superconductor Discovered by Scientists - The New ...", "href": "https://www.nytimes.com/2023/03/08/science/room-temperature-superconductor-ranga-dias.html", "body": "Scientists announced this week a tantalizing advance toward the dream of a material that could effortlessly convey electricity in everyday conditions. Such a breakthrough could transform almost any..."}, {"title": "Physicists discover a new switch for superconductivity", "href": "https://phys.org/news/2023-06-physicists-superconductivity.html", "body": "Editors' notes Physicists discover a new switch for superconductivity by Jennifer Chu, Massachusetts Institute of Technology Credit: CC0 Public Domain Under certain conditions\u2014usually..."}, {"title": "Physicists discover a new switch for superconductivity", "href": "https://news.mit.edu/2023/physicists-discover-new-switch-superconductivity-0622", "body": "June 22, 2023 Press Inquiries Caption When some ultrathin materials undergo a \"nematic transition,\" their atomic lattice structure stretches in ways that unlock superconductivity (as this conceptual image shows). MIT physicists have identified how this essential nematic switch occurs in one class of superconductors. Credits Image: iStock"}] \ No newline at end of file diff --git a/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research-6554312988458864116.txt b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research-6554312988458864116.txt new file mode 100644 index 0000000000000000000000000000000000000000..57c998327d072c312a137a961573ff2869b0b60d --- /dev/null +++ b/outputs/What are the most recent advancements in the domain of superconductors as of 2023/research-6554312988458864116.txt @@ -0,0 +1 @@ +[{"title": "Korea Superconductor Experts Seek to Test Breakthrough Claims", "href": "https://www.bloomberg.com/news/articles/2023-08-03/korea-superconductor-experts-seek-to-test-breakthrough-claims", "body": "August 3, 2023 at 4:23 AM EDT. South Korean experts created a committee to verify claims about a potential breakthrough in superconductor technology that have been driving both excitement and ..."}, {"title": "Viral New Superconductivity Claims Leave Many Scientists Skeptical ...", "href": "https://www.scientificamerican.com/article/viral-new-superconductivity-claims-leave-many-scientists-skeptical/", "body": "By Dan Garisto on July 27, 2023. Demonstration of superconductivity, special material cooled with liquid nitrogen. Credit: Forance/Alamy Stock Photo. If rumor has wings, extraordinary..."}, {"title": "What's an Ambient Superconductor and Why the Buzz About LK-99?", "href": "https://www.washingtonpost.com/business/energy/2023/08/03/room-temperature-superconductor-and-lk-99-what-to-know/ec47ab44-31ce-11ee-85dd-5c3c97d6acda_story.html", "body": "Superconductivity is having a moment. The concept of developing techniques for transporting electricity with no resistance is tantalizing because it has the potential to revolutionize the energy ..."}] \ No newline at end of file diff --git a/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research--1921511018874273162.txt b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research--1921511018874273162.txt new file mode 100644 index 0000000000000000000000000000000000000000..b61ad44a313d2bdaf871117691e6f19459838660 --- /dev/null +++ b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research--1921511018874273162.txt @@ -0,0 +1 @@ +[{"title": "Is Bitcoin Legal? - Investopedia", "href": "https://www.investopedia.com/ask/answers/121515/bitcoin-legal-us.asp", "body": "As of June 2021, bitcoin was legal in the U.S., Japan, the U.K., and most other developed countries. In general, it is necessary to look at bitcoin laws in specific countries. In the U.S., the IRS ..."}, {"title": "Can Government Regulation Affect Bitcoin Prices? - Investopedia", "href": "https://www.investopedia.com/news/can-government-regulation-affect-bitcoin-prices/", "body": "Government regulation might be one of them. In a June note, analysts at Morgan Stanley suggested that government regulation might be a factor influencing bitcoin prices. According to them ..."}, {"title": "How legal is Bitcoin and Crypto Currencies? - CryptoCompare", "href": "https://www.cryptocompare.com/coins/guides/how-legal-is-bitcoin-and-crypto-currencies", "body": "The use, trading and mining of Bitcoins is considered legal and the Australian Taxation office has announced its intention to incorporate guidelines on capital gains tax and VAT taxes. New Zealand - The Kiwi stance to Bitcoin can be gleamed from the Governor of the Central Banks belief that digital currencies have the potential to supplant cash."}] \ No newline at end of file diff --git a/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research--7815519697487258378.txt b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research--7815519697487258378.txt new file mode 100644 index 0000000000000000000000000000000000000000..32ee79578862dc126e7963d1161ed11a451edc35 --- /dev/null +++ b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research--7815519697487258378.txt @@ -0,0 +1 @@ +[{"title": "Bitcoin Is In For A Wild Ride In 2023: Here Are The Predictions - Forbes", "href": "https://www.forbes.com/sites/qai/2023/01/05/bitcoin-is-in-for-a-wild-ride-in-2023-here-are-the-predictions/", "body": "Getty Images Key takeaways Bitcoin price predictions range from $250,000 all the way down to $5,000. Inflation is a key factor in Bitcoin's price in 2023. Some believe that this year could..."}, {"title": "Bitcoin (BTC) mid-year update: Market experts predict prices for 2023", "href": "https://www.cnbc.com/2023/07/18/bitcoin-btc-mid-year-update-market-experts-predict-prices-for-2023.html", "body": "After an 80% rally for bitcoin, market experts predict where it's going next in 2023. Published Mon, Jul 17 20238:04 PM EDT Updated Wed, Jul 26 20232:06 PM EDT. Ryan Browne @Ryan_Browne_. Share ..."}, {"title": "Bitcoin Prediction: Will Bitcoin Rise Even More in 2023? - U.S. News", "href": "https://money.usnews.com/investing/cryptocurrency/articles/bitcoin-prediction-will-bitcoin-rise-even-more-in-2023", "body": "As usual, with a closer look at any period of market asset volatility, some context is required. \"Yes, Bitcoin is up 41% between Jan. 1, 2023, and Feb. 28, 2023,\" says Jordan Taylor, an ..."}] \ No newline at end of file diff --git a/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-3771585635681793337.txt b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-3771585635681793337.txt new file mode 100644 index 0000000000000000000000000000000000000000..fda1955932bcfc6d3a3c58077a57ec46f49eef1f --- /dev/null +++ b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-3771585635681793337.txt @@ -0,0 +1 @@ +[{"title": "The Biggest Risks Of Investing In Bitcoin - Forbes", "href": "https://www.forbes.com/sites/forbesbusinesscouncil/2021/06/17/the-biggest-risks-of-investing-in-bitcoin/", "body": "Bitcoin isn't money. Another reason that Bitcoin is so risky is that it is a tradeable asset but it is not backed by anything. Bitcoin has value only because the people who are trading it say it ..."}, {"title": "The Top 10 Risks Of Bitcoin Investing (And How To Avoid Them) - Forbes", "href": "https://www.forbes.com/sites/forbesfinancecouncil/2018/12/05/the-top-10-risks-of-bitcoin-investing-and-how-to-avoid-them/", "body": "With a currency that is 100% technology-based, bitcoin owners are more vulnerable to cyberthreats, online fraud and a system that can be shut down. 5. Block Withholding. New bitcoins are created ..."}, {"title": "Here Are Bitcoin's 3 Biggest Risks | The Motley Fool", "href": "https://www.fool.com/investing/2022/05/11/here-are-bitcoins-3-biggest-risks/", "body": "The threat of regulation. Unsurprisingly, perhaps the single largest risk facing Bitcoin, and cryptocurrencies more generally, is the threat of tighter regulation. In 2021, China, the world's ..."}] \ No newline at end of file diff --git a/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-6414966712890420499.txt b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-6414966712890420499.txt new file mode 100644 index 0000000000000000000000000000000000000000..eee0adba5ec1f067be5abcaf50593ccd4a940db9 --- /dev/null +++ b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-6414966712890420499.txt @@ -0,0 +1 @@ +[{"title": "Key Considerations for Corporate Investment in Bitcoin - MicroStrategy", "href": "https://www.microstrategy.com/en/bitcoin/documents/key-considerations-for-corporate-investment-in-bitcoin", "body": "Download this playbook for a summary of key considerations corporations should keep in mind when investing in bitcoin.---MicroStrategy Bitcoin Initiative - Open Source Documents These documents are being provided to serve as a resource to help as you navigate a corporate bitcoin strategy."}, {"title": "Factors to Consider While Investing in Crypto - The Top Coins", "href": "https://thetopcoins.com/blog/factors-consider-while-investing-crypto", "body": "This blog can be used as a guideline better to assess the current market and potential risks and opportunities. Generally, when you are looking for the best cryptocurrencies to invest in, two main factors that should lure you in: 1) Market capitalisation: 153,000,000 (BTC's Market Cap) 2) Liquidity level: High/Good."}, {"title": "How To Invest In Bitcoin For Beginners", "href": "https://www.forbes.com/sites/qai/2023/02/14/how-to-invest-in-bitcoin-for-beginners/", "body": "getty Key takeaways As cryptocurrency's popularity grows, more and more retail investors have considered adding bitcoin to their portfolios Cryptocurrencies offer unique diversification and..."}] \ No newline at end of file diff --git a/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-7910004084663060634.txt b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-7910004084663060634.txt new file mode 100644 index 0000000000000000000000000000000000000000..c89646e73f282b868409cc86cc067e7dc2f5a708 --- /dev/null +++ b/outputs/What constitutes the optimal approach for investing in the Bitcoin industry during the year 2023/research-7910004084663060634.txt @@ -0,0 +1 @@ +[{"title": "How To Invest In Bitcoin For Beginners", "href": "https://www.forbes.com/sites/qai/2023/02/14/how-to-invest-in-bitcoin-for-beginners/", "body": "Investing in bitcoin as a beginner requires time and research to understand the asset and set up a crypto wallet If you want to learn how to invest in bitcoin for beginners, Q.ai's Crypto Kit..."}, {"title": "Exploring Bitcoin As a Retirement Investment Avenue", "href": "https://www.entrepreneur.com/finance/exploring-bitcoin-as-a-retirement-investment-avenue/456912", "body": "Market Conditions. When exploring Bitcoin as a retirement investment option, it's essential to carefully analyze the existing market landscape. Bitcoin, renowned for its substantial price ..."}, {"title": "How The Bitcoin Ecosystem Works - Forbes", "href": "https://www.forbes.com/sites/digital-assets/article/how-the-bitcoin-ecosystem-works/", "body": "The most important stakeholders in the decentralized bitcoin ecosystem include node operators, who distribute blockchain data, bitcoin miners, who confirm bitcoin transactions in exchange for..."}] \ No newline at end of file diff --git a/outputs/What should I do to improve my writing skill/research--1929572254396490612.txt b/outputs/What should I do to improve my writing skill/research--1929572254396490612.txt new file mode 100644 index 0000000000000000000000000000000000000000..b705311c1d26a299bdd1c48379b2b8cb2b7a8822 --- /dev/null +++ b/outputs/What should I do to improve my writing skill/research--1929572254396490612.txt @@ -0,0 +1 @@ +[{"title": "7 Ways to Improve Your Writing Skills | Coursera", "href": "https://www.coursera.org/articles/writing-skills", "body": "How to improve your writing skills Writing, like any other skill, is something we can get better at with time and practice. Here are some strategies for developing your own written communication: 1. Review grammar and spelling basics. Grammar and spelling form the foundation of good writing."}, {"title": "How to Improve Writing Skills in 15 Easy Steps | Grammarly", "href": "https://www.grammarly.com/blog/how-to-improve-writing-skills/", "body": "8 Stick with simple words. Bestselling author John Grisham said, \"There are three types of words: (1) words we know; (2) words we should know; (3) words nobody knows. Forget those in the third category and use restraint with those in the second.\". There's a difference between having a rich vocabulary and dropping million-dollar words into ..."}, {"title": "5 Steps to Improve Writing Skills - Purdue University Global", "href": "https://www.purdueglobal.edu/blog/general-education/5-steps-improve-writing-skills/", "body": "Step 3: Consider Using a Writing Improvement App. One place to begin improving basic writing skills is using a writing improvement app or add-on such as ProWritingAid, ZohoWriter, or Writing Assistant. Writing improvement apps help people identify and improve basic writing skills deficits while they complete everyday tasks such as emails, texts ..."}] \ No newline at end of file diff --git a/outputs/What should I do to improve my writing skill/research--2846960322830385893.txt b/outputs/What should I do to improve my writing skill/research--2846960322830385893.txt new file mode 100644 index 0000000000000000000000000000000000000000..4e5d36e59c9293b05d6d4804fac7e9a64ae6e6fe --- /dev/null +++ b/outputs/What should I do to improve my writing skill/research--2846960322830385893.txt @@ -0,0 +1 @@ +[{"title": "How to Practice Writing: 10 Tips for Honing Your Writing Skills", "href": "https://www.masterclass.com/articles/how-to-practice-writing", "body": "How to Practice Writing: 10 Tips for Honing Your Writing Skills - 2023 - MasterClass Writing How to Practice Writing: 10 Tips for Honing Your Writing Skills Written by MasterClass Last updated: Sep 6, 2021 \u2022 3 min read Professional authors make the act of writing a regular occurrence\u2014often a daily routine."}, {"title": "How to Improve Writing Skills in 15 Easy Steps | Grammarly", "href": "https://www.grammarly.com/blog/how-to-improve-writing-skills/", "body": "8 Stick with simple words. Bestselling author John Grisham said, \"There are three types of words: (1) words we know; (2) words we should know; (3) words nobody knows. Forget those in the third category and use restraint with those in the second.\". There's a difference between having a rich vocabulary and dropping million-dollar words into ..."}, {"title": "6 Writing Exercises to Practice and Improve Your Writing Skills", "href": "https://www.masterclass.com/articles/writing-exercises-to-practice-and-improve-your-writing-skills", "body": "6 Writing Exercises to Practice and Improve Your Writing Skills. A good writer doesn't become a great writer overnight. Improving your writing skills requires hard work and constant practice on a regular basis. Even the best writers perform various writing exercises to keep their abilities sharp and the creativity flowing."}] \ No newline at end of file diff --git a/outputs/What should I do to improve my writing skill/research-1235174067265827772.txt b/outputs/What should I do to improve my writing skill/research-1235174067265827772.txt new file mode 100644 index 0000000000000000000000000000000000000000..c3d1e1ae5bab519a14e05b4a639b700eb0fc5b86 --- /dev/null +++ b/outputs/What should I do to improve my writing skill/research-1235174067265827772.txt @@ -0,0 +1 @@ +[{"title": "7 Ways to Improve Your Writing Skills | Coursera", "href": "https://www.coursera.org/articles/writing-skills", "body": "1. Review grammar and spelling basics. Grammar and spelling form the foundation of good writing. Writing with proper grammar and spelling communicates your professionality and attention to detail to your reader. It also makes your writing easier to understand."}, {"title": "How to Improve Writing Skills in 15 Easy Steps | Grammarly", "href": "https://www.grammarly.com/blog/how-to-improve-writing-skills/", "body": "8 Stick with simple words. Bestselling author John Grisham said, \"There are three types of words: (1) words we know; (2) words we should know; (3) words nobody knows. Forget those in the third category and use restraint with those in the second.\". There's a difference between having a rich vocabulary and dropping million-dollar words into ..."}, {"title": "8 Awesome Resources to Help You Improve Your Writing Skills - TakeLessons", "href": "https://takelessons.com/blog/improve-writing-skills", "body": "There are so many resources out there to help you improve writing skills and vocabulary! Check out our favorites here."}] \ No newline at end of file diff --git a/outputs/What should I do to improve my writing skill/research-5995941590975656206.txt b/outputs/What should I do to improve my writing skill/research-5995941590975656206.txt new file mode 100644 index 0000000000000000000000000000000000000000..953b4334650ae8ae7ca982a9144cf973f3fddb6e --- /dev/null +++ b/outputs/What should I do to improve my writing skill/research-5995941590975656206.txt @@ -0,0 +1 @@ +[{"title": "How to Improve Writing Skills in 15 Easy Steps | Grammarly", "href": "https://www.grammarly.com/blog/how-to-improve-writing-skills/", "body": "8 Stick with simple words. Bestselling author John Grisham said, \"There are three types of words: (1) words we know; (2) words we should know; (3) words nobody knows. Forget those in the third category and use restraint with those in the second.\". There's a difference between having a rich vocabulary and dropping million-dollar words into ..."}, {"title": "7 Ways to Improve Your Writing Skills | Coursera", "href": "https://www.coursera.org/articles/writing-skills", "body": "1. Review grammar and spelling basics. Grammar and spelling form the foundation of good writing. Writing with proper grammar and spelling communicates your professionality and attention to detail to your reader. It also makes your writing easier to understand."}, {"title": "What Are Writing Skills and How Do You Improve Them? | The Muse", "href": "https://www.themuse.com/advice/writing-skills-examples-how-to-improve", "body": "Even if you're not in a job where writing is a core component of your professional duties, you probably use your writing skills every day to communicate with others through text (whether it's over email or Slack, in a monthly or quarterly report, in the form of a project update, or otherwise)."}] \ No newline at end of file diff --git a/outputs/What should I do to improve my writing skill/research-698422812247046689.txt b/outputs/What should I do to improve my writing skill/research-698422812247046689.txt new file mode 100644 index 0000000000000000000000000000000000000000..04b1a372a5392c0c0778e54ced057878d1537bde --- /dev/null +++ b/outputs/What should I do to improve my writing skill/research-698422812247046689.txt @@ -0,0 +1 @@ +[{"title": "How to Become a Better Writer: 20 Hacks and Tips - Reedsy", "href": "https://blog.reedsy.com/how-to-become-a-better-writer/", "body": "1. Start by spending more time writing. In Outliers, Malcolm Gladwell famously claims that it takes 10,000 hours of practice to achieve greatness in any skill. Even if you only put in two hours more per week than usual, any increase in the time you spend writing will accelerate your improvement."}, {"title": "How To Become a Better Writer: 11 Steps for Success", "href": "https://www.indeed.com/career-advice/career-development/how-to-become-a-better-writer", "body": "Amber Krosel Updated February 3, 2023 If you're a new or seasoned writer, improving your writing skill set may help you master your craft, find more job opportunities and create a reputation for quality writing. Writing can take some time to master, but with the right steps, you can start improving your writing almost immediately."}, {"title": "7 Ways to Improve Your Writing Skills | Coursera", "href": "https://www.coursera.org/articles/writing-skills", "body": "Here are some strategies for developing your own written communication: 1. Review grammar and spelling basics. Grammar and spelling form the foundation of good writing. Writing with proper grammar and spelling communicates your professionality and attention to detail to your reader. It also makes your writing easier to understand."}] \ No newline at end of file diff --git a/outputs/Why is feature engineering important in financial forecasting/research--7260079429866833403.txt b/outputs/Why is feature engineering important in financial forecasting/research--7260079429866833403.txt new file mode 100644 index 0000000000000000000000000000000000000000..20fbf143588208a91768a3a94b165e10a5ddb57b --- /dev/null +++ b/outputs/Why is feature engineering important in financial forecasting/research--7260079429866833403.txt @@ -0,0 +1 @@ +[{"title": "Survey of feature selection and extraction techniques for stock market ...", "href": "https://jfin-swufe.springeropen.com/articles/10.1186/s40854-022-00441-7", "body": "In stock market forecasting, the identification of critical features that affect the performance of machine learning (ML) models is crucial to achieve accurate stock price predictions. Several review papers in the literature have focused on various ML, statistical, and deep learning-based methods used in stock market forecasting. However, no survey study has explored feature selection and ..."}, {"title": "Feature Engineering for Predictive Modeling: A Guide - LinkedIn", "href": "https://www.linkedin.com/advice/3/how-do-you-use-feature-engineering-improve", "body": "Encoding, scaling, binning, aggregation, and transformation are some common techniques for creating features. For example, one-hot encoding or label encoding can be used to encode categorical..."}, {"title": "Financial Forecasting: How to Do It with Different Methods, Models ...", "href": "https://blog.hubspot.com/sales/financial-forecasting", "body": "1. What is financial forecasting? Forecasting vs. Budgeting 2. Financial Forecasting Models Top-Down Financial Forecasting Delphi Financial Forecasting Statistical Forecasting Bottom-Up Financial Forecasting 3. Financial Forecasting Methods Straight Line Simple Linear Regression Multiple Linear Regression Moving Average 4."}] \ No newline at end of file diff --git a/outputs/Why is feature engineering important in financial forecasting/research--7937428013352407195.txt b/outputs/Why is feature engineering important in financial forecasting/research--7937428013352407195.txt new file mode 100644 index 0000000000000000000000000000000000000000..81753ae0790dd04a4f686b83705b6d3c587b35bc --- /dev/null +++ b/outputs/Why is feature engineering important in financial forecasting/research--7937428013352407195.txt @@ -0,0 +1 @@ +[{"title": "A Step-by-Step Guide to Feature Engineering for Multivariate Time ...", "href": "https://towardsdatascience.com/a-step-by-step-guide-to-feature-engineering-for-multivariate-time-series-162ccf232e2f", "body": "Automated Feature Engineering. Feature engineering involves extracting and curating explanatory variables. It is a key stage in any data science project. The quality of the features is a central aspect of the performance of models. Because of this, data scientists spend a lot of time in this process. Yet, feature engineering is often an ad-hoc ..."}, {"title": "FP&A Tips: How to Improve Forecasting Accuracy in 2023? - Abacum", "href": "https://www.abacum.io/blog/6-ways-to-improve-forecast-accuracy", "body": "According to FP&A trends, \"The forecast is accurate if the actuals tend to match the forecast within \"small\" variances.\" Another definition they highlighted states, \"The forecast is accurate when all the assumptions and decisions are sound, correctly captured, sized and timed to.\""}, {"title": "A Comparative Study of Demand Forecasting Models for a Multi-Channel ...", "href": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9514716/", "body": "A hybrid genetic algorithm-based XGBoost forecasting methodology is developed. This study empirically demonstrates the significance of feature engineering in forecasting the prices of stocks: Wang et al. To overcome the challenges of predicting rental bike demand on an hourly basis, a data mining technique is used."}] \ No newline at end of file diff --git a/outputs/Why is feature engineering important in financial forecasting/research--8497491436117821687.txt b/outputs/Why is feature engineering important in financial forecasting/research--8497491436117821687.txt new file mode 100644 index 0000000000000000000000000000000000000000..3412ee73de6e0cf27c2e5fc711322e4022e61831 --- /dev/null +++ b/outputs/Why is feature engineering important in financial forecasting/research--8497491436117821687.txt @@ -0,0 +1 @@ +[{"title": "Feature Engineering for Predictive Modeling: A Guide - LinkedIn", "href": "https://www.linkedin.com/advice/3/how-do-you-use-feature-engineering-improve", "body": "Learn more \u2014 The LinkedIn Team Last updated on Apr 27, 2023 Feature engineering is a crucial step in predictive modeling, where you transform raw data into meaningful and useful features for..."}, {"title": "Survey of feature selection and extraction ... - Financial Innovation", "href": "https://jfin-swufe.springeropen.com/articles/10.1186/s40854-022-00441-7", "body": "Different types of technical in- dicators, such as stochastic oscillator, moving averages, and relative strength index (RSI), are used in prediction models, and the effectiveness of these input features for future stock market forecasting is studied."}, {"title": "Discrete Wavelet Transform-based feature engineering for ... - Springer", "href": "https://link.springer.com/article/10.1007/s41870-023-01157-2", "body": "CSO is used for the feature selection and to get the optimal feature set. As per the authors' best knowledge none of the existing studies had used CSO for feature selection in financial TS analysis. The proposed feature engineering component is named as DWT-CSO. For stock market trend prediction, ML and DL models are used."}] \ No newline at end of file diff --git a/outputs/Why is feature engineering important in financial forecasting/research--8811703707667059559.txt b/outputs/Why is feature engineering important in financial forecasting/research--8811703707667059559.txt new file mode 100644 index 0000000000000000000000000000000000000000..80980a0525cb282733cf4292ee94938092cd222c --- /dev/null +++ b/outputs/Why is feature engineering important in financial forecasting/research--8811703707667059559.txt @@ -0,0 +1 @@ +[{"title": "Survey of feature selection and extraction ... - Financial Innovation", "href": "https://jfin-swufe.springeropen.com/articles/10.1186/s40854-022-00441-7", "body": "In stock market forecasting, the identification of critical features that affect the performance of machine learning (ML) models is crucial to achieve accurate stock price predictions. Several review papers in the literature have focused on various ML, statistical, and deep learning-based methods used in stock market forecasting."}, {"title": "(PDF) Feature Selection for Forecasting - ResearchGate", "href": "https://www.researchgate.net/publication/369035848_Feature_Selection_for_Forecasting", "body": "This work investigates the importance of feature selection for improving the forecasting performance of machine learning algorithms for financial data. Artificial neural networks (ANN ..."}, {"title": "Stock index trend prediction based on TabNet feature selection ... - PLOS", "href": "https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0269195", "body": "Fig 4 shows feature importance masks mask[i] that indicates feature ... Cui L. Deep learning-based feature engineering for stock price movement prediction. Knowledge-Based Systems. 2019; 164: 163-173. ... Ming LJ, Sumei R, Shuping Z. A hybrid model for financial time series forecasting\u2014integration of EWT, ARIMA with the improved ABC ..."}] \ No newline at end of file diff --git a/outputs/Why is feature engineering important in financial forecasting/research-6645279715195215869.txt b/outputs/Why is feature engineering important in financial forecasting/research-6645279715195215869.txt new file mode 100644 index 0000000000000000000000000000000000000000..726cfd41baffcac05692c01522a920e529996b49 --- /dev/null +++ b/outputs/Why is feature engineering important in financial forecasting/research-6645279715195215869.txt @@ -0,0 +1 @@ +[{"title": "Feature Engineering: Processes, Techniques & Benefits in 2023", "href": "https://research.aimultiple.com/feature-engineering/", "body": "In this article, we'll explore what feature engineering is, what are its techniques, and how you can improve feature engineering efficiency. ... Features that are relevant to the problem and appropriate for the model would increase model accuracy. Irrelevant features, on the other hand, would result in \"Garbage in-Garbage out\" situation ..."}, {"title": "Feature Engineering | Snowflake", "href": "https://www.snowflake.com/guides/feature-engineering", "body": "Regardless of how much algorithms continue to improve, feature engineering continues to be a difficult process that requires human intelligence with domain expertise. In the end, the quality of feature engineering often drives the quality of a machine learning model. ... Financial Services. Healthcare & Life Sciences. Manufacturing. Public ..."}, {"title": "What Is Feature Engineering and why should it be automated?", "href": "https://www.explorium.ai/blog/what-is-feature-engineering/", "body": "What is feature engineering, and why should you automate it? In this blog post, we answer these questions and more. Platform. External Data Platform; Integrations; API. Overview; ... working out which features are most relevant to your dataset and which have the biggest impact on the accuracy of your model. It will then present around 50-100 ..."}] \ No newline at end of file diff --git a/processing/__init__.py b/processing/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/processing/__pycache__/__init__.cpython-311.pyc b/processing/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f38bba09ed46e0ff90e3bd08f28681a96d7fb26 Binary files /dev/null and b/processing/__pycache__/__init__.cpython-311.pyc differ diff --git a/processing/__pycache__/__init__.cpython-39.pyc b/processing/__pycache__/__init__.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7869baaaa5fd5d516a3833e9ac027b9f6ae0e43 Binary files /dev/null and b/processing/__pycache__/__init__.cpython-39.pyc differ diff --git a/processing/__pycache__/html.cpython-311.pyc b/processing/__pycache__/html.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..985cfa4f0d9f93fd9865d217660d30946b17190b Binary files /dev/null and b/processing/__pycache__/html.cpython-311.pyc differ diff --git a/processing/__pycache__/html.cpython-39.pyc b/processing/__pycache__/html.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..43df0c711cbfa35be98f5aec9dcdf94638d6380b Binary files /dev/null and b/processing/__pycache__/html.cpython-39.pyc differ diff --git a/processing/__pycache__/text.cpython-311.pyc b/processing/__pycache__/text.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4a05d3e26dc1d595a531d0e4963d13f86c4a4927 Binary files /dev/null and b/processing/__pycache__/text.cpython-311.pyc differ diff --git a/processing/__pycache__/text.cpython-39.pyc b/processing/__pycache__/text.cpython-39.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a68d99d52f255a341574af4074a799b17cf6bf11 Binary files /dev/null and b/processing/__pycache__/text.cpython-39.pyc differ diff --git a/processing/text.py b/processing/text.py new file mode 100644 index 0000000000000000000000000000000000000000..1431f5a358471025eae12aaf6f4d23264b682dcd --- /dev/null +++ b/processing/text.py @@ -0,0 +1,18 @@ +"""Text processing functions""" +from typing import Dict, Generator + +from config import Config +import os + +CFG = Config() + + +def read_txt_files(directory): + all_text = '' + + for filename in os.listdir(directory): + if filename.endswith('.txt'): + with open(os.path.join(directory, filename), 'r') as file: + all_text += file.read() + '\n' + + return all_text diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..11cd16d7e02889809b13a8d8a1e32238297abc6e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +beautifulsoup4==4.12.2 +colorama==0.4.6 +gradio==3.38.0 +openai==0.27.8 +python-dotenv==1.0.0 +Requests==2.31.0 +duckduckgo-search==3.8.4 diff --git a/statics/README_zh.md b/statics/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..085e72d90959000940039aff30c11b584b3c9150 --- /dev/null +++ b/statics/README_zh.md @@ -0,0 +1,41 @@ +
+ +
+ +受[gpt-researcher](https://github.com/assafelovic/gpt-researcher)启发,本项目提供了一种利用第三方API而不是官方API生成研究报告的替代方法。要访问此第三方API,请参阅[chimeragpt](https://chimeragpt.adventblocks.cc/)或者[GPT-API-free](https://github.com/chatanywhere/GPT_API_free)。一旦获得API密钥,您就可以使用它来访问chimeragpt API。因此,在运行项目之前,请确保您设置了环境变量`OPENAI_API_KEY`和`OPENAI_API_BASE`。 + +```shell +$ export OPENAI_API_KEY = your_api_key +$ export OPENAI_API_BASE = your_api_base +``` + +或者您可以在`.env`文件中设置api密钥和基础。 + +## 安装 + +1. 克隆存储库 + + ```shell + $ git clone git@github.com:paradoxtown/ai_research_assistant.git + $ cd ai_research_assistant + ``` + +2. 安装依赖项 + + ```shell + $ pip install -r requirements.txt + ``` + +3. 导出环境变量 + + ```shell + $ export OPENAI_API_KEY = your_api_key + $ export OPENAI_API_BASE = your_api_base + ``` + 或修改`.env`文件。 + +4. 运行项目 + + ```shell + $ python app.py + ``` \ No newline at end of file diff --git a/statics/__pycache__/Seafoam.cpython-311.pyc b/statics/__pycache__/Seafoam.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b3792c2f1e9207e82d459c595d862163bffc3bf Binary files /dev/null and b/statics/__pycache__/Seafoam.cpython-311.pyc differ diff --git a/statics/__pycache__/style.cpython-311.pyc b/statics/__pycache__/style.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e53f84e8c348de7f949633253bf59bc68b5b5ce5 Binary files /dev/null and b/statics/__pycache__/style.cpython-311.pyc differ diff --git a/statics/example1-1.png b/statics/example1-1.png new file mode 100644 index 0000000000000000000000000000000000000000..422b2e116db8dc34797eae6871f247a7fca0dbe1 Binary files /dev/null and b/statics/example1-1.png differ diff --git a/statics/example1-2.png b/statics/example1-2.png new file mode 100644 index 0000000000000000000000000000000000000000..8ac64ca72b22d9705074065633be2966c8dbfb4d Binary files /dev/null and b/statics/example1-2.png differ diff --git a/statics/example1-3.png b/statics/example1-3.png new file mode 100644 index 0000000000000000000000000000000000000000..b6feb0d89f0ed49ef606fb7ba8e96c44b603faaf Binary files /dev/null and b/statics/example1-3.png differ diff --git a/statics/favicon.ico b/statics/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..601b3fb6ff6faed31c52e18dcbadb817234f06aa Binary files /dev/null and b/statics/favicon.ico differ diff --git a/statics/report_history_buffer.md b/statics/report_history_buffer.md new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/statics/style.py b/statics/style.py new file mode 100644 index 0000000000000000000000000000000000000000..caaee0acc5b20c4ea9d5795c64fa5125f3da6de0 --- /dev/null +++ b/statics/style.py @@ -0,0 +1,117 @@ +css = """ + .top-bar { + padding-bottom: 10px; + background-color: transparent; + } + + .top-bar .in-bar-title { + background-image: linear-gradient(45deg, #8B5FBF, #D6C6E1, #ffffff); + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; + font-family: Gelion, "Open Sans", Helvetica, "Helvetica Neue", Arial; + font-size: 2rem; + font-weight: bold; + text-align: left; + display: block; + } + + .top-bar .in-bar-subtitle { + font-family: 'Crimson Pro'; + color: #878787; + font-size: 1.4rem; + margin-top: -5px; + display: block; + } + + .main { + max-width: 800px; + min-width: min(100%, 800px); + align-self: center; + } + + .output { + padding: 10px; + min-height: 300px; + border: 1.5px solid #AC7DD280; + border-radius: 10px; + margin-bottom: 10px; + transition: opacity .1s ease-in-out; + background: var(--block-background-fill); + } + + #history { + padding: 10px !important; + border: 1.5px dashed #AC7DD2 !important; + border-radius: 10px !important; + } + + #primary-btn { + border: 1.5px solid #AC7DD2; + font-size: 20px; + } + + summary { + font-size: 14px; + font-weight: bold; + } + + #history_box { + border-bottom: 1.5px dashed #9A73B5; + padding: 10px; + } + + .tab-nav { + border-bottom: 1.5px solid #9A73B5 !important; + } + + button.selected { + border: 1.5px solid #9A73B5 !important; + border-bottom: none !important; + } + + .tabitem { + border: 1.5px solid #9A73B5 !important; + border-top: none !important; + } +""" + +# #809A73B5 + +top_bar = """ + + + + + + + +
+
+ + AI Research Assistant + + + + + Your personal free GPT researcher +
+
+ +""" + +report_html = """ + # Report +""" + +english_polishing_html = """ + # Polished Result +""" + +history_result_html = """ + # History Result +""" + +literature_review_html = """ + under construction... +""" \ No newline at end of file diff --git a/statics/title.svg b/statics/title.svg new file mode 100644 index 0000000000000000000000000000000000000000..a50cce80909917ee385ea7d7ba98a52d50ea4357 --- /dev/null +++ b/statics/title.svg @@ -0,0 +1,44 @@ + + +
+ + +
+
+ + AI Research Assistant + + + + + Your personal free GPT researcher +
+
+
+
+
\ No newline at end of file diff --git a/test/__pycache__/test.cpython-311.pyc b/test/__pycache__/test.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..879152a314ee1e24c3220220a3ec14e5d2c8ffd1 Binary files /dev/null and b/test/__pycache__/test.cpython-311.pyc differ diff --git a/test/__pycache__/test2.cpython-311.pyc b/test/__pycache__/test2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd5b7b57cfa5c88e0986b45b61a2eb2fd0297a24 Binary files /dev/null and b/test/__pycache__/test2.cpython-311.pyc differ diff --git a/test/__pycache__/test3.cpython-311.pyc b/test/__pycache__/test3.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eba6ced1bb3641217e1a337f876eb125cc2eb71d Binary files /dev/null and b/test/__pycache__/test3.cpython-311.pyc differ diff --git a/test/__pycache__/test_refresh.cpython-311.pyc b/test/__pycache__/test_refresh.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..54d5b039ace99948a56d7632c7e0a77d55812e89 Binary files /dev/null and b/test/__pycache__/test_refresh.cpython-311.pyc differ diff --git a/test/test.py b/test/test.py new file mode 100644 index 0000000000000000000000000000000000000000..8f6a0cb9cc00b9e4dc375aada19771e2f5d691cc --- /dev/null +++ b/test/test.py @@ -0,0 +1,17 @@ +import gradio as gr +import test2 as test2 +import test3 as test3 + +theme = gr.themes.Soft( + font_mono=[gr.themes.GoogleFont('Fira Code'), 'ui-monospace', 'Consolas', 'monospace'], +).set( + embed_radius='*radius_md' +) + +with gr.Blocks(theme=theme, title="AI Research Assistant") as demo: + output = gr.Textbox(label="Output") + button = gr.Button("Start") + button.click(fn=test2.generator_, outputs=output) + +demo.queue() +demo.launch() \ No newline at end of file diff --git a/test/test2.py b/test/test2.py new file mode 100644 index 0000000000000000000000000000000000000000..81ff95ebc30ac1c8b744ebfe3bea58dce8f8ffcb --- /dev/null +++ b/test/test2.py @@ -0,0 +1,4 @@ +import test3 as test3 + +def generator_(): + yield from test3.generator() \ No newline at end of file diff --git a/test/test3.py b/test/test3.py new file mode 100644 index 0000000000000000000000000000000000000000..b19587e7b045df07ae61eaec8949524850600394 --- /dev/null +++ b/test/test3.py @@ -0,0 +1,21 @@ +import openai + +openai.api_key = "sk-DQ1nFYzAVzGMznofdi0nig7MebfA9PWrTxCHlLIZIqc4X8xu" +openai.api_base = "https://api.chatanywhere.cn/v1" + +def generator(): + messages = [{ + "role": "user", + "content": "What is the meaning of life?", + }] + response = "" + for chunk in openai.ChatCompletion.create( + model="gpt-3.5-turbo", + messages=messages, + temperature=0.9, + stream=True, + ): + content = chunk["choices"][0].get("delta", {}).get("content") + if content: + response += content + yield response \ No newline at end of file diff --git a/test/test4.py b/test/test4.py new file mode 100644 index 0000000000000000000000000000000000000000..d9f6c140d753757ba78d021bac903ee8b6726be9 --- /dev/null +++ b/test/test4.py @@ -0,0 +1,6 @@ +def test(): + yield 1 + return 2 + +a, b = test() +print(a, b) \ No newline at end of file diff --git a/test/test_duck_go.py b/test/test_duck_go.py new file mode 100644 index 0000000000000000000000000000000000000000..a873c444df05bfafd69c0c58f2e1be008785e30d --- /dev/null +++ b/test/test_duck_go.py @@ -0,0 +1,5 @@ +from duckduckgo_search import DDGS + +with DDGS() as ddgs: + for r in ddgs.answers("sun"): + print(r) \ No newline at end of file diff --git a/test/test_refresh.py b/test/test_refresh.py new file mode 100644 index 0000000000000000000000000000000000000000..5353d8a952d6c2d61848c20fd1cdd6815dcc5504 --- /dev/null +++ b/test/test_refresh.py @@ -0,0 +1,15 @@ +import gradio as gr +import time + +def get_time(): + return time.ctime() + +md = gr.Markdown(get_time) + +def refresh(): + print("refresh") + md.update() + return md.value + +iface = gr.Interface(fn=refresh, inputs=[], outputs=md) +iface.launch() \ No newline at end of file