Introduction
Welcome to the documentation for the Yu-Gi-Oh! Ruling AI Chatbot project. This document provides an overview, setup instructions, and usage guides.
Key Features
- Accurate Ruling Responses: Provides precise answers for Yu-Gi-Oh! Goat Format rulings using a RAG approach.
- AI-Powered Chatbot: Combine AI reasoning and relevant context for comprehensive answers.
- Dockerized Environment: Ensures easy, consistent setup.
- Turborepo Monorepo: Efficiently manages project packages and applications.
Technologies Used
- Next.js: React framework for the chatbot.
- Vercel AI SDK: Integrates with AI models.
- OpenAI: Used for embeddings and AI models.
- Pinecone: Vector database for ruling embeddings.
- Tailwind CSS: Utility-first CSS.
- shadcn/ui: Reusable UI components.
- Turborepo: Monorepo management.
- ESLint & Prettier: Code linting and formatting.
- Cheerio: Web scraping library for server-side jQuery.
- Nextra: Documentation framework.
- Docker/docker-compose: Containerization.
- TypeScript: For type safety.
Retrieval-Augmented Generation (RAG)
This project uses RAG for accurate Yu-Gi-Oh! ruling answers. Instead of just using the AI’s general knowledge, RAG retrieves relevant ruling info from Pinecone’s vector database.
How it works:
- Question Embedding: User question is converted to an embedding using OpenAI.
- Retrieval: Embedding searches Pinecone for similar ruling embeddings.
- Augmentation: Retrieved ruling text provides context to the AI model.
- Generation: AI uses retrieved context and its reasoning to generate an accurate answer.
Here’s a fantastic blog about RAG and why it’s used for more information.
Last updated on