Skip to content

10mudassir007/knowledge-dungeon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฐ Knowledge Dungeon ๐Ÿฐ

A gamified Q&A adventure built using Streamlit, CrewAI, and LangChain with a LLM-powered cast of agents guiding the player through trivia challenges. Players battle through levels, collect points, and survive with limited livesโ€”all while being guided by a virtual narrator and hint system.


๐Ÿš€ Features

  • โœ… Dynamic Question Generation based on player level using LLMs.
  • ๐Ÿง  Semantic Answer Checking using sentence embeddings (MiniLM) for flexible answer matching.
  • ๐Ÿ’ก Hint System for each question.
  • ๐Ÿ“œ Narrator Agent for immersive storytelling.
  • ๐ŸŽฎ Gamified Progression: 10 levels, limited lives, and point tracking.
  • ๐Ÿ’พ Persistent Question History to avoid repetition across sessions.

๐Ÿ› ๏ธ Tech Stack

  • Streamlit โ€“ UI framework.
  • LangChain with Groq โ€“ LLM agent orchestration.
  • CrewAI โ€“ Agent management.
  • sentence-transformers โ€“ Embedding-based answer validation.
  • LLM Used: meta-llama/llama-4-maverick-17b-128e-instruct (via ChatGroq).

๐ŸŽฎ How to Play

  1. Launch the app:

    streamlit run app.py
  2. Read the narrator's introduction.

  3. Answer general knowledge questions.

    • Use the hint if you're stuck (once per question).
    • Be carefulโ€”wrong answers cost a life!
  4. Score points for each correct answer.

    • Every 3 correct answers = level up.
    • Reach Level 10 to win!

๐Ÿ“ File Overview

File Purpose
app.py Main game logic
history.txt Stores asked questions (avoid repeats)
README.md You are reading it ๐Ÿ™‚

๐Ÿง  Agents Breakdown

Agent Role
NarratorAgent Welcomes the player with story context
QuestionAgent Creates fresh, level-based trivia questions
HintAgent Generates helpful but vague hints
AnswerCheckerAgent Validates answers with semantic comparison

๐Ÿ“ฆ Dependencies

Install with:

pip install streamlit langchain crewai sentence-transformers scikit-learn

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages