Content
<div align="right">
<details>
<summary >🌐 Language</summary>
<div>
<div align="center">
<a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=en">English</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=zh-CN">Simplified Chinese</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=zh-TW">Traditional Chinese</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=ja">Japanese</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=ko">Korean</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=hi">Hindi</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=th">Thai</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=fr">French</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=de">German</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=es">Spanish</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=it">Italian</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=ru">Russian</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=pt">Portuguese</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=nl">Dutch</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=pl">Polish</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=ar">Arabic</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=fa">Persian</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=tr">Turkish</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=vi">Vietnamese</a>
| <a href="https://openaitx.github.io/view.html?user=jhlucc&project=pokemon-chat&lang=id">Indonesian</a>
</div>
</div>
</details>
</div>
📘 English | [English](./README.en.md)
<img src="resources/picture/11.png" alt="icon" style="width: 27%;" />
# KeMo <img src="resources/picture/brain-removebg-preview.png" alt="icon" style="width: 11%;" /> Pokémon Chat Assistant Based on Knowledge Base and Knowledge Graph








---
## 📋 Update Log
<details>
<summary>[2025/02/01] v0.4.0 Release</summary>
### New Features
- Multi-agent collaboration: Supervisor + Workers (RAG/Web/Graph/Stats/MCP) execute in parallel
- Rule-based priority routing, local Pokémon data supports deterministic answers (no LLM call required)
- New DeepDoc document parser, supports complex formats like PDF/Word
- Knowledge base workstation: batch import, retrieval testing, and block management
- New Rotom-Dex OS theme, supports dark mode
### Optimizations
- Integrated CRAG, Self-RAG, HyDE and other advanced RAG technologies
- Parallel sub-query retrieval + adaptive Top-K
- SQLite persistent embedded cache
- Unified LLM factory function, supports multi-provider switching
### Fixes
- Fixed multiple crashes in Agent mode (tool_calls check, closure binding, and race conditions)
- Fixed knowledge base search parameter not taking effect, L2 distance display error
- Fixed Neo4j connection failure without password
- Fixed Milvus sparse vector compatibility
### Breaking Changes
- Removed old GraphRAG, replaced with LightRAG
- Frontend refactoring, removed old components
</details>
<details>
<summary>[2025/11/05] v0.3.0 Release</summary>
- Fully adapted to LangChain/LangGraph v1 features, using create_agent to create agent entry
- Document parsing upgrade, adapted to mineru-2.6 and mineru-api
- More agent development kits: middleware, sub-agents, simpler and easier to use
</details>
---
## 📝 Project Introduction
Pokémon, as one of the most influential IPs globally, has a vast worldview setting and massive character data. After years of accumulation in games, anime, trading cards, and movies, its knowledge system is complex and highly structured, making it suitable for knowledge graph modeling and intelligent Q&A scenarios.
With the development of large language models (LLMs) and knowledge-enhanced technologies, it becomes possible to construct the Pokémon universe as a **multi-modal, structured, and interactive AI system**. This project builds a knowledge graph covering Pokémon characters, attributes, skills, regions, evolution paths, and other elements based on data sources like Baidu Tieba and Wikipedia. Combining large model capabilities, it creates an **intelligent dialogue assistant exclusive to the Pokémon world** - "KeMo".
On this basis, we integrate **LangGraph inference process orchestration**, **LightRAG retrieval enhancement technology**, and **knowledge graph visualization exploration capabilities**, allowing users to obtain precise answers through natural language questions and intuitively explore the Pokémon world through graphs. It also supports map location-based functions, mapping Pokémon world locations to real-world coordinates, and achieving **spatial visualization of Pokémon location knowledge**.
This project aims to create a **domain-specific intelligent assistant template system** that is migratable, scalable, and oriented towards enthusiasts. You can easily migrate it to other roles to create domain-specific intelligent assistants by replacing the knowledge source and graph structure, enabling high-quality semantic Q&A and visual knowledge exploration experiences.
---
## 🚀 New Features
- **LangChain & LangGraph**: Refactored to LangChain 1.x and LangGraph 1.0 multi-agent dialogue assistant
- **LightRAG Integration**: Supports LightRAG efficient retrieval graph construction
- **Advanced RAG**: Integrated Self-RAG, CRAG, HyDE, and Query Decomposition advanced RAG
- **Agentic Memory**: Has user preference adaptive long-term memory and time planning capabilities
- **MCP Service**: Supports Model Context Protocol to connect real-world geographic data
- **Performance**: Built-in Semantic Cache and Speculative RAG accelerate generation
---
## 🎯 System Architecture
Through the implementation of this project, we not only completed a complete project of vue3+fastapi but also built an intelligent Q&A system based on the Pokémon knowledge graph. We accumulated rich practical experience in semantic structure modeling, such as bert+tf-idf+rule matching mechanism, and graph fusion and generative Q&A. The system supports precise Q&A for Pokémon's evolution relationships, attribute restraints, skill characteristics, geographic distribution, and other content, greatly improving the user experience in interactive exploration.
Core Architecture:
- **Hybrid Retrieval**: Vector Retrieval (Milvus) + Graph Retrieval (Neo4j) + Keyword Retrieval (BM25)
- **Agent Orchestration**: LangGraph1.x state machine manages complex task flows
- **Knowledge Enhancement**: GraphRAG extracts entity relationships
Here is the core technical architecture diagram of our project:
<img src="resources/picture/now.png" alt="icon" style="width: 100%;" />
## 🎯 Project Features
1. Fine-tuned a Pokémon-specific large model - [KeMo](https://huggingface.co/qwqqwq/qwen2.5-14b-instruct-pokemon-int4) based on crawled data.
2. Constructed a Pokémon knowledge graph (Wikipedia) based on crawled data.
3. Automated annotation and training of NER data using roberta+TF-IDF+rule matching to hit entities and attributes in the graph.
4. Implemented ASR function using FunASR (open-source speech recognition by Alibaba Damo Academy).
5. Realized MCP service, supporting the mapping query of Pokémon world and real-world geographic coordinates.
6. Extracted DeepDoc from RAGflow to enhance the parsing and extraction capabilities of the knowledge base.
7. Implemented multi-agent collaboration using LangGraph (RAG + Search + Graph + MCP).
8. Encapsulated the agent base class to achieve multi-agent functionality.
9. Supports knowledge graph search, web search, knowledge base search, MCP search, and voice search, which can be integrated or selected individually.
---
## 🐳 Docker Compose
```bash
# 1. Clone the repository
git clone https://github.com/skygazer42/pokemon-chat.git
cd pokemon-chat
# 2. Configure environment variables (backend reads from the root directory `.env` file, Docker Compose also loads this file)
cp .env.example .env
# Edit .env, fill in LLM API KEY (e.g., llm_api_key / SILICONFLOW_API_KEY)
# Optional: enable retrieval/tool capabilities (example)
# enable_knowledge_graph=true # Neo4j knowledge graph
# enable_knowledge_base=true # Milvus knowledge base
# enable_web_search=true # Web search (requires tavily_api_key)
# enable_mcp=true # MCP (usually used with `--profile infra --profile mcp`)
# Optional: enable speech recognition (FunASR) -> enable_asr=true, funasr_url=ws://funasr:10095 (Docker)
# Optional: limit CORS origins (recommended for production environment) -> cors_allow_origins=http://localhost:3100
# 3. Start the service
cd docker
# Default only starts App (API + Web).
docker compose up -d --build
# Optional: start Infra (Neo4j/MySQL/Milvus, etc.) + automatically import Neo4j graph data (neo4j-bootstrap)
# docker compose --profile infra up -d --build
# Optional: start MCP SSE service (requires MySQL, usually enabled with infra)
# docker compose --profile infra --profile mcp up -d --build
# Optional: start speech recognition (FunASR)
# docker compose --profile asr up -d --build
```
Access:
- **Web UI**: http://localhost:3100/
- **API Documentation**: http://localhost:5050/api/docs
### 📦 Data Initialization (first run)
When you start with `--profile infra`, it will automatically import Neo4j graph data. Data sources:
- `resources/data/kg_data/entities.json`
- `resources/data/kg_data/relations.json`
> Optional: MySQL map data import (execute when map function is needed).
> Due to significant environmental differences, this step is not automatically executed by default to avoid affecting "one-click startup".
```bash
cd docker
docker compose exec api python scripts/import_pokemon_map.py
```
If you want to completely clear data (Neo4j/Milvus/MySQL, etc.) and start again (requires you to start with `--profile infra`):
```bash
cd docker
docker compose down
# Delete data directory (Linux/macOS/WSL)
rm -rf volumes/neo4j/data volumes/neo4j/logs volumes/milvus volumes/mysql/data
docker compose --profile infra up -d --build
# Neo4j graph data will be re-imported automatically by neo4j-bootstrap
```
Windows PowerShell:
```powershell
cd docker
docker compose down
Remove-Item -Recurse -Force .\volumes\neo4j\data, .\volumes\neo4j\logs, .\volumes\milvus, .\volumes\mysql\data
docker compose --profile infra up -d --build
```
---
## 🔭 Reference Projects
- https://github.com/xerrors/Yuxi-Know
- https://github.com/BinNong/meet-libai
## 📄 License
This project follows the **MIT License**, which can be used freely for commercial or personal projects. Please retain the original author and source information for secondary development.
Connection Info
You Might Also Like
awesome-mcp-servers
A collection of MCP servers.
git
A Model Context Protocol server for Git automation and interaction.
cc-switch
All-in-One Assistant for Claude Code, Codex & Gemini CLI across platforms.
Appwrite
Build like a team of hundreds
TrendRadar
TrendRadar: Your hotspot assistant for real news in just 30 seconds.
oh-my-opencode
Background agents · Curated agents like oracle, librarians, frontend...