Skip to content

Conversation

smadil997
Copy link

This PR introduces a complete example of a Retrieval-Augmented Generation (RAG) pipeline using:

Spring AI

PGVector (running via Docker)

Ollama for embedding and chat models

Instead of installing a local PGVector DB manually, this setup runs it using Docker Compose (compose.yaml). Please ensure the database is running before starting the Spring Boot application.

⚙️ Key Features

Uses Ollama locally for LLM (gemma:3b) and embedding (nomic-embed-text:latest) models

PDF file upload endpoint at POST /upload for document ingestion

Validates PDFs for table of contents (TOC) – required by default reader

Embeds paragraphs from the PDF and stores them in a vector store using PGVector

Auto-creates vector_store table if not specified

Uses initialize-schema: true in application.yaml to recreate the schema on every app run (can be customized)

Copy link
Author

@smadil997 smadil997 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Mohdadil [email protected]

@smadil997 smadil997 force-pushed the feature/add-rag-with-pgvectore-example branch from cccd658 to a06b769 Compare September 4, 2025 11:18
@smadil997
Copy link
Author

Hi @tzolov please have look on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant