JAVA-SPRINGAI
New Introduction to Using Spring AI
Description
Integrating artificial intelligence into modern applications is becoming increasingly important, and Spring AI offers efficient and easy-to-use solutions for this purpose. As part of the Spring ecosystem, the Spring AI module allows developers to seamlessly and declaratively integrate various AI providers—such as OpenAI, Perplexity, Ollama, or Groq—into Java-based applications. Whether it's text generation, image analysis, or working with language models, Spring AI delivers the familiar Spring experience, enabling developers to quickly and effectively build intelligent solutions.
This training aims to introduce the core capabilities, structure, and usage of Spring AI through practical examples. We will explore how to integrate AI providers, handle prompts, and process streaming responses. Throughout the course, we will work with Spring Boot-based applications, allowing participants to build on their existing knowledge and effectively incorporate AI solutions into enterprise environments.
Outline
- Introduction to the World of AI Applications
- Using Artificial Intelligence in Enterprise Applications
- Use Cases
- The Role of LLMs and Generative AI
- Overview of AI APIs and Providers
- Models
- Prompt and Prompt Engineering
- Zero-shot and Few-shot Prompting
- Tokenization, Token Usage, Context Window
- Spring AI Fundamentals
- The Purpose of Spring AI and Its Role in the Spring Ecosystem
- Supported Providers (OpenAI, Azure OpenAI, Hugging Face, etc.)
- Configuration in Spring Boot
- Managing API Keys Securely
- Text Generation in Practice
- Handling Prompts from Java
- Distinguishing Between System / User / Assistant Prompts
- Prompt Best Practices
- Using PromptTemplate with Variables, Template DSL (variables, branching, and loops)
- Chat Conversation Memory
- Handling Streamed Responses with Spring WebFlux and Server-Sent Events UI
- Advisor
- Moderation
- Scope
- Structured Output
- Structured Output
- JSON, JSON Schema
- Response Metadata
- Using Real-Time Data
- Tool Calling
- Tool Specification
- Tool Execution
- RAG
- Document Loading, ETL (
DocumentReader,DocumentTransformer,DocumentWriter) - Chunking Strategies
- Handling Different Formats (JSON, Text, HTML, Markdown, PDF)
- Embedding
- Vector Databases
- Similarity Search and Relevance Ranking
- Querying
- Metadata Filtering
- Document Loading, ETL (
- Text to Image
- Image Generation
- Audio Handling
- Audio Transcription
- Text to Speech
- Testing and Best Practices
- Prompt Testing and Validation
- Making AI Responses Deterministic (temperature, top-p)
- Efficiency, Cost, and Logging Management
- Optimization
- Observability
- Error Handling and Fallback Strategies
Prerequisites
Basic knowledge of Java programming.