# DeepBlue Brain

A white-box, self-hosted platform for learning and inspecting retrieval-augmented generation, showing the whole pipeline: document ingestion, chunking, embedding, vector and BM25 retrieval, prompt assembly and citation tracing, backed by its own benchmark data.

DeepBlue Brain is a research and teaching platform for retrieval-augmented generation (RAG) that exposes each stage of the pipeline instead of only showing a final answer. As a question comes in, a live panel streams retrieval events over server-sent events: how the question was rewritten, whether retrieval used vector search, BM25 or a hybrid of both, which documents matched and with what scores, and when generation starts; document uploads stream through parsing, chunking, embedding and indexing the same way.

A prompt inspector shows the exact prompt sent to the model, including the rewritten question, retrieved passages, citation instructions and conversation history, and cited answers link back to the original source chunk. Retrieval choices, such as whether to combine BM25 with vector search, are backed by the project's own benchmark measurements on a public Chinese dataset, including negative results, rather than by claims alone. It accepts Markdown, TXT, PDF and DOCX uploads.

The frontend is Vue 3, TypeScript and Tailwind CSS; the backend is FastAPI with ChromaDB, sentence-transformers, rank-bm25 and jieba, deployed with Docker Compose.

Website: http://deepblue-brain.cn/
