This project is a retrieval-augmented generation application designed to answer questions from uploaded PDF documents. It functions as a document question-answering engine and a streaming AI chat interface that provides responses backed by specific source citations.
The system utilizes a state-machine workflow orchestrator to coordinate multi-step document ingestion and retrieval pipelines. This orchestration allows for step-by-step visualization and debugging of the process as documents are parsed and processed.
The application manages the full lifecycle of document interaction, including PDF-to-text chunking, vector-based embedding for semantic search, and session-based message history to track individual conversation threads. It employs server-sent events to stream partial tokens from the language model to the client in real time.