NPC RAG Dialogue System

A composable, state-driven NPC dialogue engine using LangGraph and RAG.

Python Python Advanced LangGraph LangGraph Intermediate Pandas Pandas Intermediate Google Cloud Google Cloud Novice Vector Databases Vector Databases Beginner RAG RAG Beginner

A modular dialogue system for NPCs built on LangGraph's graph-based pipeline. The dialogue system integrates RAG capabilities with a graph-based world knowledge system to make each NPC have a realistic understanding of the world.

Key Highlights

  • Built a composable, state-driven NPC dialogue engine using LangGraph's graph pipeline.
  • RAG integration that is combined with a graph-based world knowledge system to make each NPC have a realistic understanding of the world.
  • This is to keep the world consistent but also remove omnipotence of NPCS.
  • Designed each conversation stage as an independent, testable node with a typed DialogueState
  • Wrapped LLM calls in a provider abstraction for easy swapping between APIs and models
  • Maintained clean separation of concerns across dedicated node, provider, and config modules

Gallery