Rag with ChatGPT and ChromaDB for BG3 using Langchain

30 January 2023
Cover image

Why?

In recent weeks, I've been delving into GenAI while also enjoying the fantastic game Baldur's Gate 3 (BG3). For a bit of fun and learning, I thought: why not combine the two? The result? A ChatGPT game assistant for BG3 🎮✨ using OpenAI + VectorDB. Learning and gaming—sometimes they just go hand in hand!

I'm using ChatGPT as the LLM and BAAI/bge-base-en as the embedding model. I'm currently experimenting with prompts to achieve better results!

📖 Chatting with Docs: A Learning Journey with AI

Hey there! I've been dabbling with Langchain and ChromaDB to chat about some documents, and I thought I'd share my experiments here. It's all pretty new to me, but I'm excited about where it's headed.

This project serves as an ultra-simple example of how Langchain can be used for RetrievalQA for documents, currently using ChatGPT as a LLM.

While there are numerous detailed articles and YouTube videos that guide you step by step, this post isn't intended as a comprehensive guide. Instead, it's a brief entry to share the entertaining PoC I've been working on.

✨ Current Features:

  • Langchain Chats: I've been playing with Langchain to chat about some docs, and it's pretty fun!
  • Models: I am using ChatGPT as LLM model and bge-base-en as the embedding model.
  • VectorDB Storage: I'm using ChromaDB to keep the document vectors. It seems to work well for this purpose.
  • My Little and Simple Scrapers: Right now, I've got a couple of simple scrapers for AWS FAQs and Baldur’s Gate 3 a great game. Just the start of my data adventures!

🌱 What's Next?

Honestly, I'm still figuring things out. But I do hope to add a few more scrapers and see where this goes.

If you're curious or have some friendly tips, feel free to drop a message or a suggestion. Always happy to learn and chat! 😄

Concepts

Langchain

A framework designed for developing context-aware and reasoning applications, LangChain offers modular components and off-the-shelf chains, simplifying the integration of powerful language models into your projects. It's where ease meets functionality in language model application development!"

VectorDB

Database management system empowers applications with swift and efficient similarity search capabilities. Whether we are managing multimedia data, documents, or embedding in your machine learning endeavors, VectorDB stands out as our go-to solution for managing, querying, and retrieving vector data with ease and precision.

RAG

RAG, or Retrieval-Augmented Generation, serves as an innovative AI framework designed to extract factual information from an external knowledge base. This framework is essential for grounding large language models (LLMs) in the most accurate and current information available on specific subjects. By doing so, it ensures that the generated content is not only relevant but also reliable and well-informed.

rag

Repo

Simple demo

As I mentioned, this is just a fun side project very generic and simple but using BG3 data for entertainment while I am learning about Gen-AI.

If you have any cool tips, improvements, or suggestions for better prompts, I'm all ears! 😄

https://github.com/douglasmakey/chatting-with-docs

Share article