Skip to content

gweakliem/WolfRichterChatbot

 
 

Repository files navigation

UnofficialWolf Street Chatbot

Real-time Wolf Street Article Updater

WolfStreet Chatbot

What does this bot know?

The bot knows about Wolf Richter, Wolf Street, and the Wolf Street articles listed in data.json. The oldest known article dates back to 05 Apr 2024.

How was this bot built?

  • Wolf Street articles were saved as markdown files, split into smaller chunks, and embedded in a Chroma database.
  • On (almost) every query, the bot embeds your query, identifies the 7 most similar article chunks and 0-3 most relevant article summaries and places them into GPT's context to answer your question. This technique is known as Retreival-Augmented Generation (RAG).
  • RAG is far from perfect! I used the open-sourced all-MiniLM-L6-v2 model to create the embeddings. I used it because it's free (I'm cheap) and has good speed and performance for what you're getting.
  • I removed all those markdown Wolf Street articles from this repo out of respect to Wolf Richter.

data.py is a mess of a codebase that shows how I retrieved, chunked, and embedded the Wolf Street articles

chatbot.py is the UI logic for the Streamlit chatbot.

chatbot_helper.py is the helper functions for the Streamlit chatbot. This is where the magic happens with the GPT chat completions.

Who built this bot?

This bot was built by Gordon Weakliem. He's been a Wolf Street reader for about 4 years and donates to the site. He wanted to learn more about AI chatbots and RAG and this code was forked from the StratecheryChatbot, a GPT bot that uses RAG to answer questions about the Stratechery weblog.

Disclaimer: This app is not affiliated with, endorsed by, or approved by Wolf Richter or Wolf Street.

About

An LLM app that allows you to chat with WolfStreet articles

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.6%
  • CSS 1.4%