DISCOVER THE FUTURE OF AI AGENTSarrow_forward

Pokemon-Chat

calendar_todayAdded Feb 23, 2026
categoryAgent & Tooling
codeOpen Source
PythonKnowledge BaseMulti-Agent SystemLangGraphLangChainRAGAI AgentsWeb ApplicationAgent & ToolingOtherKnowledge Management, Retrieval & RAG

A Pokémon-themed intelligent chat assistant powered by LangGraph multi-agent orchestration and GraphRAG technologies. Integrates Neo4j knowledge graph, Milvus vector search, and multi-source hybrid retrieval for precise Q&A with complex relationship reasoning. Also serves as a transferable template for domain-specific knowledge systems.

Overview#

Pokemon-Chat (可萌) is a domain-specific intelligent Q&A system for Pokémon enthusiasts, featuring LangGraph multi-agent orchestration and GraphRAG technologies. It addresses the limitations of general-purpose LLMs in vertical domains, including knowledge gaps and hallucination issues. The project provides a complete Docker Compose deployment solution and serves as a transferable template for domain-specific knowledge systems.

Core Features#

Intelligent Q&A and Retrieval#

  • Knowledge Graph Q&A: Built on Neo4j, supporting structured relationship queries including evolution chains, type effectiveness, move pools, and geographic distribution
  • Multi-source Hybrid Retrieval: Combines Milvus vector search, Neo4j graph retrieval, and BM25 keyword search
  • Advanced RAG Strategies: Self-RAG/CRAG for reflection and retrieval correction, HyDE for hypothetical document embeddings, Query Decomposition for complex questions, Reranker for result re-ranking
  • GraphRAG (LightRAG): Integrated HKU-DS LightRAG for enhanced graph construction and retrieval
  • Rule-first Routing: Deterministic data (e.g., base stats) returned directly via rules without LLM calls

Multi-Agent Architecture#

Supervisor-Workers pattern implementation:

  • Supervisor Agent: Intent recognition and task distribution
  • RAG Worker: Document and knowledge base retrieval
  • Web Worker: Tavily web search
  • Graph Worker: Neo4j Cypher graph queries
  • Stats Worker: Numerical statistics analysis
  • MCP Worker: External tools and map services

Knowledge Processing#

  • Domain Model: Fine-tuned Pokémon domain model based on Qwen2.5-14B-Instruct (INT4 quantization)
  • Entity Recognition (NER): Triple guarantee with RoBERTa + TF-IDF + Rule matching
  • Document Parsing: DeepDoc (from RAGflow) supporting complex layouts like PDF/Word
  • Knowledge Base Workbench: Batch import, chunk management, retrieval testing

UI and Interaction#

  • Rotom-Dex OS Theme: Authentic Pokémon game-style UI with dark mode support
  • Voice Input: Integrated Alibaba DAMO Academy FunASR streaming speech recognition
  • Map Visualization: MCP service for Pokémon geographic distribution display
  • Graph Visualization: Neo4j relationship network visualization

Performance Optimization#

  • Semantic Cache for reducing redundant computation
  • Speculative RAG acceleration
  • SQLite persistence for dialogue state and embedding cache

Deployment Guide#

Prerequisites#

  • Docker & Docker Compose
  • Node.js ≥ 18 (frontend local development)
  • Python ≥ 3.11 (backend local development)

Quick Start#

# Clone repository
git clone https://github.com/skygazer42/pokemon-chat.git
cd pokemon-chat

# Configure environment
cp .env.example .env
# Edit .env and add LLM API Key (e.g., SILICONFLOW_API_KEY)

# Start core services
cd docker
docker compose up -d --build

# Start full infrastructure (with Neo4j/MySQL/Milvus)
docker compose --profile infra up -d --build

# Optional: Enable MCP service
docker compose --profile infra --profile mcp up -d --build

# Optional: Enable ASR service
docker compose --profile infra --profile asr up -d --build

Access Points#

Data Initialization#

When started with --profile infra, the neo4j-bootstrap container automatically imports:

  • resources/data/kg_data/entities.json
  • resources/data/kg_data/relations.json

Map data import:

docker compose exec api python scripts/import_pokemon_map.py

Configuration#

The project uses root .env file for unified configuration management, automatically loaded by Docker Compose.

Key Feature Toggles#

SettingDescription
enable_knowledge_baseEnable Milvus vector retrieval
enable_knowledge_graphEnable Neo4j graph retrieval
enable_web_searchEnable Tavily web search (requires tavily_api_key)
enable_mcpEnable MCP tool service
enable_rerankerEnable reranker model
enable_ner_bertEnable local BERT NER
enable_asrEnable FunASR speech recognition
allow_dangerous_graph_requestsAllow dynamic Cypher (recommend false for production)

Model Configuration#

  • LLM: llm_api_key, llm_api_base, llm_model_name, llm_temperature, llm_max_tokens
  • Embedding: embedding_provider, embedding_api_key, embedding_model_name, embedding_dimension
  • Reranker: reranker_model_name, reranker_top_k, reranker_threshold

Database Configuration#

  • Neo4j: neo4j_uri (e.g., bolt://neo4j:7687), neo4j_username, neo4j_password
  • Milvus: milvus_uri (e.g., http://milvus:19530)
  • MySQL: mysql_host, mysql_port, mysql_user, mysql_password, mysql_database

Core Workflow#

  1. Input Processing: Voice/Text → ASR (FunASR) → Text → NER entity extraction
  2. Intent Routing: Supervisor Agent analyzes intent, decides direct rule-based response or worker dispatch
  3. Retrieval Execution:
    • RAG Worker → Vector search + reranking
    • Graph Worker → Neo4j Cypher query
    • Web Worker → Tavily search
  4. Generation & Synthesis: Worker results aggregation → LLM generates final response → Frontend rendering

Extension and Migration#

The architecture supports rapid migration to other vertical domains:

  1. Replace knowledge source data (entities.json, relations.json)
  2. Adjust Neo4j graph schema
  3. Update domain-specific configurations and prompts
  4. Optional: Fine-tune domain-specific model

Applicable scenarios: Financial Q&A, legal consulting, government services, and other domain applications requiring precise knowledge retrieval and relationship reasoning.

Related Projects

View All arrow_forward

STAY UPDATED

Get the latest AI tools and trends delivered straight to your inbox. No spam, just intelligence.

rocket_launch