RagWiser
БесплатноНе проверенRagWiser is a Retrieval Augmented Generation (RAG) system built with Spring Boot that enables users to upload PDF documents, process them, and ask questions abo
Описание
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
Установка RagWiser
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/RobertoDure/RagWiserFAQ
RagWiser MCP бесплатный?
Да, RagWiser MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для RagWiser?
Нет, RagWiser работает без API-ключей и переменных окружения.
RagWiser — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить RagWiser в Claude Desktop, Claude Code или Cursor?
Открой RagWiser на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: 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
автор: xuzexin-hzCompare RagWiser with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
