
Learn to set up spring ai and use image and speech generation, image recognition, and vector databases to build ai features like a photo-based calorie counter.
Learn to switch between code bases using git clone, forks, and GitHub, and navigate branches with checkout in IntelliJ. Follow lessons with or without GitHub to work through each topic.
Define artificial intelligence as the simulation of human intelligence by machines. Describe three types—natural, general, and superintelligent, including narrow AI as the current mainstream.
Explore how large language models use deep learning to process and generate human-like text. Learn how tokenization, embeddings, and transformers enable tasks from text completion to translation.
Register an OpenAI key to enable Spring AI to access the OpenAI API, including logging in, navigating to API keys, creating a secret key, and saving it securely.
Download the project from GitHub or create a spring project via start.spring.io. Choose Java Maven, Spring Boot, jar packaging with Java 21, unzip, and add open api, Spring Web, Lombok.
Learn to integrate OpenAI with Spring AI by configuring the API key via environment variables, build a simple dto, and expose a rest endpoint that returns AI responses.
Explore prompts and messages in Spring AI: define prompts as inputs guiding AI, learn message types—user, system, assistant, tool—and how prompts produce chat responses and token usage.
Learn how the prompt template class constructs user and system messages in Spring, using string templates and resources to support prompts, with a model map for placeholder values.
Learn to format AI responses with the bean output converter, producing structured JSON like actor films, by passing parameters, using output converters, and mapping JSON to a DTO.
Learn how to configure a chat client with default advisors, log requests and responses, switch models such as GPT-4 and GPT-3.5 turbo, and adjust runtime and startup chat options.
Discover function calling in Spring AI insights, where the AI invokes predefined functions to fetch data, perform calculations, or query external APIs.
Master prompt engineering to design prompts that guide AI to deliver precise results in your applications. Learn techniques and best practices to optimize prompts for chatbots, recommendations, and automation.
Download the GitHub project or build with start.spring.io, add Spring Web and Lombok, and configure the OpenAI API key as an environment variable to run.
Learn zero shot prompting, which uses no examples, and few shot prompting with demonstrations to guide in-context learning for tasks like text classification and drafting job descriptions.
Explore chain of thought and prompting techniques, including few-shot prompting, to guide AI through multi-step reasoning, logical deduction, and complex problem solving with step-by-step thinking.
Learn to build a chat bot using Spring AI that delivers conversational, human-like responses. Understand that AI models don't remember prior questions by default, guiding user-friendly dialogue design.
Create a new Spring project via start.spring.io, select Java Maven and the latest Spring Boot, configure group and artifact for a ChatGPT application, and add OpenAI, Spring Web, and Lombok.
Set up the OpenAI API key via an environment variable in a Spring app, then create dtos for question and answer and expose a post endpoint to ask questions.
Learn to implement chat memory in Spring AI with in-memory and Cassandra options, using chat memory advisors to persist and manage conversation history, TTL, and scalable storage.
Configure chat memory using conversation ids to manage multiple chats, pass a conversation id as a parameter, and control history with a window size that retrieves the last messages.
Build a calorie counting app with AI image recognition in Spring AI that uploads food images, identifies banana or pizza, and estimates calories via retrieval augmented generation.
Download the GitHub project and create a new Spring Boot project with start.spring.io, Java Maven, latest Spring Boot, and dependencies OpenAI, Spring Web, and Lombok for a calorie counter app.
Learn to generate images with Spring AI, using a unified image model interface and OpenAI's dalle model, plus build services and controllers to return image URLs or bytes.
Explore how AI can generate speech from text using TTS models in Spring AI, including OpenAI's speech options, and implement a speech generation service with a post endpoint.
Master retrieval augmented generation (RAG) to boost AI accuracy by retrieving external data and generating context-aware answers. Use vector databases, data chunks, and similarity search to target nutrition information.
convert data into embeddings and vectors for use in a vector database. explore cosine similarity as the measure of semantic closeness between words and phrases.
Build an API for calorie counting that analyzes a food photo, retrieves nutrition data, and uses GPT-4 to summarize calories and nutrients for the user.
Unlock the full potential of generative AI in your Java applications with Spring AI. This comprehensive course, "Spring AI: From AI Fundamentals to Spring AI Insights" is designed to guide Java and Spring developers through the process of integrating powerful AI technologies directly into their projects using the Spring Framework.
We start with a solid introduction to the fundamentals of artificial intelligence, covering key concepts that lay the foundation for understanding how AI and large language models (LLMs) work. This initial segment ensures that even those new to AI can grasp the essential principles before diving deeper.
From there, we guide you through the process of setting up your development environment by cloning a GitHub project, and you’ll learn how to register and manage your OpenAI API key to enable seamless integration. As you progress, you’ll explore the powerful capabilities of Spring AI, understanding how to build projects that utilize OpenAI models effectively. We will delve into practical applications, showing you how to work with Prompts and Messages, create and customize Prompt Templates, and use essential components like BeanOutputConverter. Additionally, you’ll learn to configure ChatClient and ChatOptions, as well as implement Function Calling to expand the functionalities of your applications.
You will discover techniques for crafting effective Prompts that guide AI models, including methods like Zero-shot and Few-shot prompting, and Chain-of-Thought reasoning, which significantly improves the accuracy and relevance of responses. This will help you to not only instruct the AI models but also optimize their behavior for different contexts.
We also focus on building practical, real-world projects, including a robust chat application. You’ll gain hands-on experience in creating chat APIs, utilizing ChatMemory and ChatMemoryAdvisors, and setting Chat Memory Parameters to enhance user interaction. These projects will provide you with the practical skills to build responsive chat systems that can be integrated into various applications.
We will introduce you to more advanced AI capabilities, including Image Generation and Speech Synthesis. You’ll also learn about cutting-edge techniques such as Retrieval-Augmented Generation (RAG), the use of Embeddings, Vector Databases, and the application of Cosine Similarity, all of which will enhance your ability to create sophisticated, intelligent applications.
Towards the end of the course, you will have the opportunity to develop a comprehensive AI-powered Calorie Counter Application using Image Recognition, RAG and Vector DB.
No prior experience in AI is required; all you need is a familiarity with Java and Spring, and this course will guide you through everything else you need to succeed.