Java-RAG
A framework-free, pure-Java implementation of a retrieval-augmented-generation pipeline, with a visual playground for uploading documents, asking grounded questions, and inspecting the retrieved passages behind each answer.
Java-RAG implements the full RAG data flow, from parsing and chunking a document through embedding, retrieval, building a grounded prompt from the top-ranked context, and returning an answer alongside the evidence behind it. It is aimed at developers who want to learn how RAG works internally, embed RAG into an existing Java system, or swap out individual providers without adopting a mandatory application framework such as Spring Boot.
A bundled React three-panel workspace shows the knowledge base, a grounded chat, and the retrieval evidence side by side, started together with the Java backend through Docker Compose. The default mode runs fully locally with no API key or model download required, and an optional profile swaps in a local Ollama model in place of the built-in extractive demo generator.
It supports Java 8 and newer, and is licensed under Apache-2.0.