Istaroth is a Retrieval-Augmented Generation (RAG) system for Genshin Impact that extracts, cleans, and structures textual content to answer lore questions about the world of Teyvat.
Special thanks to Dimbreath for his wonderful work on AnimeGameData!
Istaroth extracts and structures text from AnimeGameData, plus a third-party lore manual:
- Quests (main, story, world, and event questlines)
- Dialogue (in-game talks, talk groups, hangout events, cutscene subtitles)
- Characters (character stories, voicelines)
- World & lore (living beings, anecdotes, achievements, events, rich ore reserves)
- Items & readables (readables, books, weapons, artifact sets, wings, costumes, material types)
- Shishu (诗漱) lore manual (third-party)
Requires Python 3.14 (see .python-version) and uv.
uv sync # creates .venv and installs all dependenciesBy default, uv sync installs CPU-only PyTorch from the pytorch-cpu index (~200MB on Linux instead of ~4GB of CUDA wheels). Local embedding builds use ISTAROTH_TRAINING_DEVICE=cpu by default; override via .env.common if needed.
If you plan on doing development, see DEVELOPMENT.md for pre-commit hooks and dependency management.
A checkpoint currently mainly consists of the vectorstore and various other data stores containing cleaned game texts. You can either grab a pre-trained checkpoint from the release page, or build your own following the instructions in DEVELOPMENT.md. If you grab a pre-trained checkpoint, be sure to use it with the corresponding Git commit hash.
Istaroth ships a web UI for exploring Teyvat's lore: ask lore questions in Chinese or English and get answers grounded in the game text with source citations, or browse the underlying corpus (quests, characters, readables, and more) in the library view.
See DEVELOPMENT.md for instructions on launching the web UI via Docker Compose.
Istaroth provides an MCP (Model Context Protocol) server that lets Claude query the RAG system directly, with Docker, local (stdio), and remote (HTTP) deployment options. See MCP.md for setup and example queries.
