GithubHelp home page GithubHelp logo

dfavenfre / llmrobofund Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 264.58 MB

LLMRoboFund is a powerful chatbot empowered with Multi-document RAG. The chatbot is equipped with RetrievalQA and SQL Agents to ease the investment research

License: Apache License 2.0

Python 31.30% Jupyter Notebook 68.70%
chatbot langchain llm multi-document retreivalqa sql-agent vector-database

llmrobofund's Introduction

LLMRoboFund Empowered with Retrieval-Augmented Generation

Conducting investment research requires obtaining access to various platforms to become well-informed about investment strategies, financial risks involved, or even financial data about a fund or ETFs. Traditional chatbots, also called 'Robo-Funds,' offer mere hard-coded pre-defined choices based on your answers, being unable to generate or answer questions with real-time information or data. LLM-backed chatbots can easily eliminate the need for standalone research with dedicated hours.

LLMRoboFund presents a novel approach for chatting with an LLM to get informed about funds/ETFs and obtain financial data with up-to-date documents. To enable the LLM with real-time information, Retrieval-Augmented Generation (Lewis et al., 2020) method is deployed to update the knowledge base using dense vector and SQL databases.

The data used to update the knowledge base of the LLM include Turkey Electronic Fund Trading Platform and Public Disclosure Platform. TEFT platform provide diverse financial information, such as management fee, outstanding number of shares, initial and current price, return data up-to 5 year, percentage distribution of the invested instruments, and so on. PDP share documents related to the funds/ETFs available at TEFT platform, such as investor information documents, which are the foundation of LLMRoboFund.

The list below include the available QA:

  • Investment strategies
  • Investment purpose and policy
  • Managing company of the fund
  • Buy/Sell policy of the fund
  • Financial data, such as applied/bylaw management fees, return data up-to 5 year, number of initial and current shares. Basically all available financial information at Turkey Electronic Fund Trading Platform

Disclosure

Neither the content or LLM responses should be used to obtain investment idea or strategy, as the LLM responses are refined by diverse prompt engineering techniques and chain methods in accordance with my preferences.

Requirements

 streamlit==1.28.0
 tefas-crawler==0.3.4
 openai==0.28.1
 streamlit-dynamic-filters==0.1.3
 faiss-cpu==1.7.4
 streamlit==1.28.0
 cohere==4.36
 langchain==0.0.348
 pypdf==3.17.1
 chromadb==0.4.18
 pinecone-client==2.2.4
 psutil==5.9.6
 gputil==1.4.0
 tiktoken==0.5.2
 selenium==4.16.0
 chardet==5.2.0
 streamlit_option_menu==0.3.6
 streamlit_chat==0.1.1
 plotly==5.18.0
 tiktoken==0.5.2
   $Streamlit run Application/app.py

Pinecone Schema

image

LangChain Schema

image

LLMRoboFund

Investment Chatbot

streamlit-app-2023-12-08-16-12-37.webm

Interactive Dashboard

streamlit-app-2023-12-04-12-12-38.webm

llmrobofund's People

Contributors

dfavenfre avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

07rjain

llmrobofund's Issues

[Q] how to setup the Secrets.toml streanlite

i have got a problem with Setup the Toml file some argments i don't know what are means

Traceback (most recent call last):
  File "/home/vscode/.local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
    exec(code, module.__dict__)
  File "/workspaces/LLMRoboFund/Application/app.py", line 2, in <module>
    from agent import run_robofund_agent
  File "/workspaces/LLMRoboFund/Application/agent.py", line 14, in <module>
    sql_tool = query_from_sql()
               ^^^^^^^^^^^^^^^^
  File "/workspaces/LLMRoboFund/Application/tools.py", line 28, in query_from_sql
    with open(st.secrets.SQL_PROMPT, "r") as file:
              ^^^^^^^^^^^^^^^^^^^^^
  File "/home/vscode/.local/lib/python3.11/site-packages/streamlit/runtime/secrets.py", line 296, in __getattr__
    raise AttributeError(_missing_attr_error_message(key))
AttributeError: st.secrets has no attribute "SQL_PROMPT". Did you forget to add it to secrets.toml or the app settings on Streamlit Cloud? More info: https://docs.streamlit.io/streamlit-cloud/get-started/deploy-an-app/connect-to-data-sources/secrets-management

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.