One of the most powerful applications of Spring AI is RAG. RAG allows you to augment an AI model's knowledge with your own private data. This is achieved by:
| Pitfall | How the GitHub Repo Helps | | :--- | :--- | | | Look at application.properties samples. Use spring.ai.openai.api-key=$OPENAI_API_KEY | | Model version mismatches | The repo uses specific, tested versions (e.g., gpt-3.5-turbo ). Stick to those. | | Function calling not working | Check the FunctionCallbackWrapper examples in spring-ai-examples . You must register the function as a Spring bean. | | Vector store connection | The spring-ai-examples includes docker-compose files for Pgvector – run docker-compose up first. |
: A newer repository intended for future updates and clean example code once the book is fully released to printers. habuma/spring-ai-examples