keerthikumarn/springboot-vectordb-rag ? reverse-engineered prompt

Reverse engineered prompt

Build me a Spring Boot app that does retrieval augmented chat with PostgreSQL acting as the vector database.

I want to be able to send a message to an endpoint like /ai/rag and get back an answer that uses stored document chunks plus the chat model, instead of only guessing. Please include the part that creates and searches embeddings, and make it work with PostgreSQL vector support, including the table for stored content and metadata. It should use a locally run embeddings model, and a chat model for the actual response. If you need current setup details or library docs, look them up online and wire it up in a simple way.

Make it easy to run locally with Java 21 and Maven, and keep the code straightforward so I can test it with a curl request right after starting the app.