GithubHelp home page GithubHelp logo

somyaranjan26 / mango10k Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chubbyman2/mango10k

0.0 0.0 0.0 816 KB

Vector search-based chatbot to help retail investors analyze company 10K and 10Q filings.

License: MIT License

Python 100.00%

mango10k's Introduction

Mango10K

Introduction

Your friendly neighbourhood vector search-based chatbot, here to help retail investors navigate the complex and tedious task of analyzing company 10K and 10Q filings!

Getting Started

To get started, you'll need a MongoDB Atlas cluster, OpenAI API key, Langchain API key, and a Nomic API key. See .env.example for more information.

Vector Search Index

Once you have your MongoDB Atlas cluster, database, and collection, you'll need to apply a vector search index to it. See these instructions for the exact steps. We used the following configuration:

{
  "fields": [
    {
      "numDimensions": 768,
      "path": "embedding",
      "similarity": "cosine",
      "type": "vector"
    }
  ]
}

Prerequisites

gradio==4.25.0
langchain==0.1.14
langchain-community==0.0.31
langchain-nomic==0.0.2
openai==1.16.2
pydantic==2.6.4
pymongo==4.6.3
python-dotenv==1.0.1
sec_cik_mapper==2.1.0
unstructured==0.13.2

Embeddings and Vector Search

To try an example, run seed.py to generate and store the vector embeddings from the most recent 10K's and 10Q's from AAPL and TSLA. Make sure you have your vector search index configured! Then, you can run frontend.py to launch the Gradio web app, and ask some questions regarding the financials of Tesla and Apple!

Technologies

MongoDB Atlas

MongoDB Atlas was used to store the vector embeddings generated, as well as return results from vector search.

OpenAI

OpenAI's gpt-3.5-turbo was used to generate coherent responses based on the retrieved embeddings from MongoDB Atlas, in order to answer the user's question.

Nomic

Nomic's model was used for the actual vector embeddings. Specifically, we used the nomic-embed-text-v1.5 model.

LangChain

LangChain was used to load the HTML documents, perform the vector store and vector search, as well as generate the actual response. The backend model was OpenAI's, but the module used was LangChain.

Gradio

Gradio was used to create the web app which users can interact with in order to use our application.

Team

Special thanks to Daniel, Shah, Somyaranjan, Calvin, and Charles of team MangoDB!

License

This project is licensed under the MIT License - see the LICENSE file for details.

mango10k's People

Contributors

chubbyman2 avatar somyaranjan26 avatar dchen024 avatar shahjacobb avatar shiweihe0713 avatar

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.