An intelligent Q&A system specifically designed for game documentation, lore, and mechanics. Built as part of the NSK AI RAG Bootcamp Phase 1 project.
- Multi-format Document Support: Text, PDF, and website content
- Intelligent Retrieval: Hybrid dense + sparse retrieval with domain filtering
- Persona-based Responses: Multiple assistant personalities (Guide, Sage, Expert, Casual)
- Difficulty Levels: Adjustable response detail from brief to comprehensive
- Sample Data: Pre-loaded example documents for immediate testing
- User-Friendly Interface: Clean Streamlit UI with guided onboarding
- Deployment Ready: Optimized for cloud deployment
https://gamingragassistant-xlr8.streamlit.app/
- Clone the repository
git clone https://github.com/your-username/game-rag-assistant.git
cd game-rag-assistant- Install dependencies
pip install -r requirements.txt- Run the application
streamlit run gameRAG.py- Open your browser to
http://localhost:8501
Create a requirements.txt file with the necessary requirements similar to the ones in the repo
- Framework: LangChain + Streamlit
- Embeddings: HuggingFace Sentence Transformers (all-MiniLM-L6-v2)
- Vector Store: FAISS (with Chroma fallback)
- Retrieval: Hybrid (Dense + BM25 sparse retrieval)
- Optional LLM: OpenAI GPT-3.5-turbo
- Document Processing: LangChain loaders for PDF, text, web content
- Click "🚀 Initialize System" to set up the RAG pipeline
- Optionally configure OpenAI API key for enhanced answers
Choose from three methods:
📝 Text Documents
- Paste your game documentation directly
- Perfect for mechanics, lore, and character descriptions
📄 PDF Files
- Upload game design documents, manuals, or guides
- Automatically extracts and processes all pages
🌐 Websites
- Load content from game wikis or documentation sites
- Great for community-maintained content
- Use natural language queries about your game content
- Adjust persona and detail level in the sidebar
- Filter by content domain (lore, mechanics, code, assets)
After loading sample data or your own documents, try:
- "How does the combat system work?"
- "Tell me about the fantasy world setting"
- "What are the main character classes?"
- "Explain the magic system"
- "How do I unlock new areas?"
- Lore: World-building, characters, story
- Mechanics: Game rules, systems, progression
- Code: Technical documentation, APIs
- Assets: Art guides, audio, resources
- General: Mixed or uncategorized content
- Helpful Guide: Clear, professional explanations
- Wise Sage: Mystical, thoughtful responses
- Tech Expert: Developer-focused technical details
- Casual Gamer: Friendly, gaming-focused language
- Very Brief: One sentence answers
- Brief: Short paragraphs
- Balanced: Moderate detail (default)
- Detailed: Comprehensive explanations
- Very Detailed: In-depth analysis
# Optional: For enhanced answers
OPENAI_API_KEY=your_openai_api_key_here- Push code to GitHub repository
- Connect to Streamlit Cloud
- Deploy directly from your repository
- Set environment variables in Streamlit Cloud settings
game-rag-assistant/
├── game_rag.py # Main application
├── requirements.txt # Python dependencies
├── README.md # This file
├── packages.txt # For necessary FAISS packages
└── .streamlit/
└── config.toml # Streamlit configuration
- Document Ingestion: Loads and processes various document formats
- Text Chunking: Splits documents into semantic chunks with overlap
- Embedding: Converts chunks to vector representations
- Indexing: Stores in FAISS vector database with BM25 sparse index
- Retrieval: Hybrid search combining dense and sparse methods
- Generation: Uses LLM or extractive summarization for answers
- Context: Provides source citations and metadata
- PDF processing may struggle with complex layouts
- Website loading depends on site structure and accessibility
- Large documents may require chunking parameter adjustment
- OpenAI integration requires valid API key and credits
This project was created for the NSK AI RAG Bootcamp. Feel free to fork and enhance for your own games!
MIT License - Feel free to use for your own game projects.
- NSK AI Community for the excellent bootcamp content
- LangChain team for the comprehensive RAG framework