# LangGraph Advanced RAG

A companion HR policy question-answering example that reimplements the same guarded RAG workflow as an explicit LangGraph state graph, with visible per-node execution traces instead of a linear chain.

LangGraph Advanced RAG reimplements the same HR-policy RAG assistant as a companion project using LangGraph's StateGraph and conditional edges instead of a linear chain, splitting the flow into distinct nodes for extracting the question, classifying whether it is HR-related, retrieving from a local FAISS index, composing the prompt, generating the answer, and denying out-of-scope questions, so that state changes, execution order, and branch paths can be explicitly observed.

The README is explicit that the "graph" here is an application execution flow graph, not a knowledge graph, and that this project is neither GraphRAG nor a multi-agent system, since the knowledge base remains plain Markdown chunks embedded and stored in FAISS, and there is no autonomous planning or tool-selection loop. Compared to a naive RAG pipeline, it adds history-aware scope classification, explicit intermediate state, conditional branching, and a returned node-execution trace that the frontend highlights in order.

It provides the same FastAPI backend, web UI, and automated-test setup as its LCEL-based companion project, built from the same underlying notebook teaching case.

Website: https://github.com/marc-ing/langgraph-advanced-rag
