MCPSERV.CLUB
RobertoDure

RagWiser

MCP Server

PDF‑to‑QA with Retrieval Augmented Generation

Stale(55)
0stars
1views
Updated Jun 8, 2025

About

RagWiser is a Spring Boot RAG system that lets users upload PDFs, vectorizes the content with pgvector, and answers natural language questions using OpenAI GPT models. It provides REST APIs and a React UI for document upload, semantic search, and contextual QA.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

RagWiser UI Screenshot

Overview

RagWiser is a Retrieval Augmented Generation (RAG) server that turns static PDF documents into conversational knowledge bases. By leveraging Spring Boot, Spring AI, and PostgreSQL with the pgvector extension, it automatically extracts text from uploaded PDFs, converts that text into high‑dimensional embeddings, and stores the embeddings in a vector database. When a user poses a natural‑language question, RagWiser performs a semantic similarity search to pull the most relevant document chunks and feeds them into an OpenAI GPT‑4 prompt. The result is a precise, contextually grounded answer that reflects the content of the original documents rather than generic model knowledge.

What Problem Does It Solve?

Developers often need to build AI assistants that can answer questions about proprietary or domain‑specific documents—legal contracts, technical manuals, research papers, or internal policy guides. Traditional LLMs lack direct access to such data and can hallucinate facts. RagWiser bridges this gap by providing a turnkey pipeline that ingests documents, indexes them efficiently, and exposes a simple REST API (and Tool‑based MCP integration) for querying. This eliminates the need to build custom ingestion, embedding, and retrieval logic from scratch.

Core Capabilities

  • Document Ingestion: A REST endpoint accepts PDF uploads, automatically parses pages, and splits the text into manageable chunks using token‑aware splitters.
  • Vector Storage: Each chunk is embedded with a chosen LLM and stored in PostgreSQL via pgvector, enabling fast similarity searches using HNSW indexes.
  • Semantic Search & RAG: Incoming queries trigger a nearest‑neighbor lookup, retrieve the top‑scoring chunks, and compose them into a prompt that GPT‑4 processes to generate an answer anchored in the source material.
  • MCP Tool Integration: The server exposes its RAG functionality as a tool callback, allowing other AI assistants to invoke it within their own workflows without direct HTTP calls.
  • Docker‑ready: The stack includes a Docker Compose setup for PostgreSQL, simplifying deployment in CI/CD pipelines or cloud environments.

Real‑World Use Cases

  • Legal Assistance: Law firms can upload statutes, case law, and client contracts; lawyers then query the system for specific clauses or precedents.
  • Technical Support: Product teams store engineering manuals and release notes, enabling support agents to retrieve precise troubleshooting steps.
  • Academic Research: Researchers upload research papers and ask for summaries or cross‑references, accelerating literature reviews.
  • Compliance Monitoring: Organizations can ingest internal policy documents and automatically answer compliance questions to ensure regulatory adherence.

Integration with AI Workflows

Because RagWiser follows the MCP model, an AI assistant like Claude can request its RAG tool as part of a larger reasoning chain. The assistant sends a structured tool call containing the user’s question; RagWiser returns a contextual answer, which the assistant can then incorporate into its final response. This seamless integration reduces latency and eliminates the need for intermediate data handling, making it ideal for production‑grade conversational agents.

Unique Advantages

  • Zero‑Code Ingestion: No custom parsing or embedding logic—everything is handled by Spring AI’s built‑in components.
  • Scalable Vector Search: pgvector with HNSW indexes delivers sub‑millisecond retrieval times even as the corpus grows.
  • Full Stack in Java: Developers familiar with Spring Boot can extend or customize the server without learning new ecosystems.
  • OpenAI GPT‑4 Powered: Leveraging the latest LLM ensures high‑quality, up‑to‑date responses while still grounding them in your own documents.

RagWiser therefore provides a robust, developer‑friendly foundation for building AI assistants that can reliably answer questions based on specific, user‑supplied documents.