Creating a Board Game Chatbot with Postgres, AI, and RAG
summary
A working chatbot uses PostgreSQL plus pgvector to store paragraph-chunked rule text, embeddings from Gemini (about 700-dimension vectors) and Document AI to extract PDFs; a RAG pipeline generates a question embedding, runs a similarity search (top 5 by CAIN distance, with optional HNSW/IVF indexes or quantization) and builds a prompt for Gemini. It handles realtime inserts, overcomes a 2,000‑token embedding limit, and correctly answers fresh games like Castle Combo in the demo.
AI-written summary · about
chapters (14)
- 0:00Introduction and motivation
- 3:09Understanding RAG limitations
- 9:11Four-step RAG implementation plan
- 13:44Chunking strategy for rules
- 16:46Generating embeddings with Postgres
- 17:27Similarity search with PG Vector
- 19:57Prompt engineering best practices
- 24:18Live demo of the chatbot
- 27:09Improving performance and accuracy
- 29:35Indexation methods for vectors
- 33:54Quantization techniques
- 37:25Hybrid search with full-text
- 39:56Key takeaways and future
- 41:24Q&A session
related talks
28mWhat the RAG? Demystifying Retrieval Augemented Generation
45mFrom ChatGPT User to RAG Implementer: A Developer's Journey
58mDemystifying GenAI: Build a ChatGPT App with Vector Store
25mLets Build A Node.js ChatGPT-Like Bot With AI APIs
27mBuild a ChatGPT RAG Data Pipeline
49mBuild ChatGPT RAG Data Pipeline with RisingWave Stream Processor & Vector Store
51mEvent Driven AI: Supercharging ChatGPT with RAG & LangStream
15mRAG Beyond Chatbots
