Skip to content

nevermindOleg/chat-findata

 
 

Repository files navigation

💼 ChatFinData

This repo is aimed to be an implementation of a locally hosted chatbot specifically focused on question answering over the financial data. Built with LangChain and FastAPI.

✅ Running locally

  1. Install dependencies: pip install -r requirements.txt
  2. Run the app: make start
    1. To enable tracing, make sure langchain-server is running locally and pass tracing=True to get_chain in main.py. You can find more documentation here.
  3. Open localhost:9000 in your browser.

📚 Technical description

There are two components: ingestion and question-answering.

Ingestion has the following steps:

  1. Pull pdf from Federal Reserve
  2. Load pdf with LangChain's PyPDFLoader Loader
  3. Split documents with LangChain's TextSplitter
  4. Create a vectorstore of embeddings, using LangChain's vectorstore wrapper (with OpenAI's embeddings and FAISS vectorstore).

Question-Answering has the following steps, all handled by ChatVectorDBChain:

  1. Given the chat history and new user input, determine what a standalone question would be (using GPT-3).
  2. Given that standalone question, look up relevant documents from the vectorstore.
  3. Pass the standalone question and relevant documents to GPT-3 to generate a final answer.

🚀 Roadmap

  • Implement LangChain + GPT-3.5 for Federal Speeches application
  • Unstructured file access based on langchain
    • [ ].md ?
    • [x].pdf
    • [ ].docx ?
    • [ ].txt ?
  • Add support for other LLM models
  • Move a vectorstore (chromadb?) to a client/server mode (this offers better performance and scalability than the in-memory mode)
  • Implement analysis in time
    • create data structure using time as namespaces?
    • show graphs
    • allign with graphs

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 65.6%
  • HTML 33.8%
  • Makefile 0.6%