RagWiser
FreeNot checkedRagWiser is a Retrieval Augmented Generation (RAG) system built with Spring Boot that enables users to upload PDF documents, process them, and ask questions abo
About
RagWiser is a Retrieval Augmented Generation (RAG) system built with Spring Boot that enables users to upload PDF documents, process them, and ask questions about their content using natural language.
README
RagWiser is a Retrieval Augmented Generation (RAG) system built with Spring Boot that enables users to upload PDF documents, process them, and ask questions about their content using natural language.
Project Overview
RagWiser uses Spring AI and PGVector to create an advanced document question-answering system. It processes PDF documents, stores their vectorized representation in a PostgreSQL database with pgvector extension, and answers user queries by retrieving relevant context and generating responses using OpenAI's GPT models.
Features
- PDF Document Upload: Upload and process PDF documents through a REST API
- Document Vectorization: Automatically extracts text from PDFs, splits it into chunks, and stores embeddings
- Semantic Search: Query documents using natural language
- RAG-powered Response Generation: Get accurate answers based on the content of your documents
- Spring AI Integration: Leverages Spring AI for vector stores and LLM integration
- Docker Support: Containerized PostgreSQL with pgvector extension
UI
RagWiser uses React for its user interface, providing a simple and intuitive way to interact with the RAG system. The UI allows users to upload PDF documents, ask questions, and view answers in a user-friendly manner.

Technology Stack
- Java 21
- Spring Boot 3.3.2
- Spring AI 1.0.0-M1
- PostgreSQL with pgvector extension
- Docker
- OpenAI GPT-4
- React
Getting Started
Prerequisites
- Java Development Kit (JDK) 21
- Docker and Docker Compose
- OpenAI API Key
- NodeJS
Setup and Installation
Clone the repository:
git clone https://github.com/RobertoDure/RagWiser.git cd RagWiserConfigure your OpenAI API key in
src/main/resources/application.yaml:spring: ai: openai: api-key: YOUR_OPENAI_API_KEYStart the PostgreSQL database with pgvector:
docker-compose up -dBuild and run backend springboot application:
./mvnw spring-boot:runRun frontend react application:
cd frontend npm install npm start
API Endpoints
Upload a PDF Document
POST /api/rag/upload
Content-Type: multipart/form-data
Parameters:
file: PDF file (required)
Ask a Question
GET /api/rag?question=YOUR_QUESTION_HERE
Parameters:
question: The question to be answered (default: "List all the Articles in the Irish Constitution")
How It Works
Document Processing:
- PDF documents are uploaded via the
/api/rag/uploadendpoint - The application uses
PagePdfDocumentReaderto extract text from PDFs - Text is split into chunks using
TokenTextSplitter - Text chunks are embedded and stored in the vector database
- PDF documents are uploaded via the
Question Answering:
- User submits a question via the
/api/questionendpoint - The system retrieves the most relevant document chunks using vector similarity search
- A prompt template combines the question and retrieved documents
- OpenAI's GPT model generates an answer based on the context
- User submits a question via the
MCP Integration:
- The application also provides a Tool-based integration for RAG capabilities using Spring AI's Tool Callbacks
- This enables the RAG functionality to be used as a tool by other AI systems
Database Schema
The application uses a PostgreSQL database with the pgvector extension for storing document embeddings:
CREATE TABLE vector_store (
id uuid DEFAULT uuid_generate_v4() PRIMARY KEY,
content text,
metadata json,
embedding vector(1536)
);
CREATE INDEX ON vector_store USING HNSW (embedding vector_cosine_ops);
Configuration
Key configuration options in application.yaml:
spring:
datasource:
url: jdbc:postgresql://localhost:5432/rag_db
username: postgres
password: postgres
ai:
openai:
api-key: YOUR_OPENAI_API_KEY
chat:
options:
model: gpt-4
vectorstore:
pgvector:
index-type: HNSW
distance-type: COSINE_DISTANCE
dimensions: 1536
servlet:
multipart:
enabled: true
max-file-size: 100MB
max-request-size: 100MB
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgements
- Spring AI Team for their excellent framework
- PostgreSQL and pgvector for vector storage capabilities
- OpenAI for their powerful language models
Installing RagWiser
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/RobertoDure/RagWiserFAQ
Is RagWiser MCP free?
Yes, RagWiser MCP is free — one-click install via Unyly at no cost.
Does RagWiser need an API key?
No, RagWiser runs without API keys or environment variables.
Is RagWiser hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install RagWiser in Claude Desktop, Claude Code or Cursor?
Open RagWiser on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare RagWiser with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
