In this article, we will explore the following: Introduction to Embedding Models. Loading data using DocumentReaders. Storing embeddings in VectorStores. Implementing RAG (Retrieval-Augmented Generation), a.k.a. Prompt Stuffing. Sample Code Repository You can find the sample code for this article in the GitHub repository Large Language Models(LLMs) like OpenAI, Azure Open AI, Google Vertex, etc are trained on large datasets. But those models are not trained on your private data, so they may not be able to answer questions specific to your domain.
Continue reading »Getting Started with Spring AI and Open AI
In this article, we will explore the following: Introduction to Spring AI. Interacting with Open AI using Spring AI. Using PromptTemplates. Using OutputConverters. Sample Code Repository You can find the sample code for this article in the GitHub repository Introduction to Open AI and Spring AI ChatGPT took the world by storm when it was released by OpenAI. It was the first time that a language model was able to generate human-like responses to prompts.
Continue reading »LangChain4j Retrieval-Augmented Generation (RAG) Tutorial
In this article, we will explore the following: Understand the need for Retrieval-Augmented Generation (RAG). Understand EmbeddingModel, EmbeddingStore, DocumentLoaders, EmbeddingStoreIngestor. Working with different EmbeddingModels and EmbeddingStores. Ingesting data into EmbeddingStore. Querying LLMs with data from EmbeddingStore. Sample Code Repository You can find the sample code for this article in the GitHub repository LangChain4j Tutorial Series You can check out the other articles in this series: Part 1: Getting Started with Generative AI using Java, LangChain4j, OpenAI and Ollama Part 2: Generative AI Conversations using LangChain4j ChatMemory Part 3: LangChain4j AiServices Tutorial Part 4: LangChain4j Retrieval-Augmented Generation (RAG) Tutorial Understand the need for Retrieval-Augmented Generation (RAG) In the previous articles, we have seen how to ask questions and get responses from the AI models.
Continue reading »LangChain4j AiServices Tutorial
In this article, we will explore the following: Using LangChain4j AiServices to interact with LLMs. How to ask questions and map responses to different formats? Summarizing the given text in different formats. Analyzing the sentiment of the given text. Sample Code Repository You can find the sample code for this article in the GitHub repository In the previous article, we have seen how to have a conversation using LangChain4j ChatMemory and ConversationalChain.
Continue reading »Generative AI Conversations using LangChain4j ChatMemory
In this article, we will explore the following: How to use LangChain4j ChatMemory and ConversationalChain to implement conversation style interaction? How to ask questions using PromptTemplate? In the previous article, we have seen how to interact with OpenAI using Java and LangChain4j. LangChain4j Tutorial Series You can check out the other articles in this series: Part 1: Getting Started with Generative AI using Java, LangChain4j, OpenAI and Ollama Part 2: Generative AI Conversations using LangChain4j ChatMemory Part 3: LangChain4j AiServices Tutorial Part 4: LangChain4j Retrieval-Augmented Generation (RAG) Tutorial Sample Code Repository
Continue reading »Getting Started with Generative AI using Java, LangChain4j, OpenAI and Ollama
In this article, we will explore the following: Brief introduction to Generative AI? How to interact with Open AI APIs using Java? How to use LangChain4j to interact with OpenAI? How to run a LLM model locally using Ollama? Working with Ollama using LangChain4j and Testcontainers. LangChain4j Tutorial Series You can check out the other articles in this series: Part 1: Getting Started with Generative AI using Java, LangChain4j, OpenAI and Ollama Part 2: Generative AI Conversations using LangChain4j ChatMemory Part 3: LangChain4j AiServices Tutorial Part 4: LangChain4j Retrieval-Augmented Generation (RAG) Tutorial Introduction to Generative AI Unless you are living under a rock, you might have heard about Generative AI.
Continue reading »Should you use Lombok? Or, is it bad for you?
I’m a happy Lombok library user. I found this library a decade ago, and I’ve been using it ever since. I don’t remember facing any major problems with it so far. However, I see few people that I greatly admire and learn from, often complain that Lombok is very bad, and you should avoid it. Obviously, I am curious to know what am I missing? I know a couple of scenarios where using Lombok brings some challenges.
Continue reading »Announcing My "SpringBoot - The Missing Guide" Video Series on YouTube
TLDR; I am happy to announce that I am starting the SpringBoot - The Missing Guide video series on my SivaLabs YouTube Channel. This SpringBoot - The Missing Guide video series is for those who need help understanding SpringBoot’s magic. In this series, I will explain the core concepts used in Spring and SpringBoot with practical examples. Also, I will give a deep-dive explanation of SpringBoot’s AutoConfiguration and how to customize the default configuration.
Continue reading »Why I think Go is more verbose than Java
Few months ago I asked on Twitter “why you think Java is complex?” to understand others perspective. I'm really surprised looking at so many people assuming #Java is complex than other languages. I worked with mostly Java and in recent years I worked with Go, NodeJS too. But I feel Java is less complex and more productive. Any specific points why you think Java is complex? — Siva (@sivalabs) April 1, 2022 And, I got many responses(opinions, insights) and I compiled all the responses into this blog post My attempt to understand why people perceive Java as complex.
Continue reading »My Plans for 2023
First of all, Wish you a very happy new year and I hope this year will bring more joy and happiness into your lives. I would like to share how was 2022 for me and what my plans are for 2023. Highlights of 2022 The year 2022 is very eventful for me and lots of interesting things happened. 1. “How to Become a Software Architect” series with in28minutes and JavaBrains I collaborated with in28minutes Ranga and JavaBrains Koushik and did a “How to Become a Software Architect” series
Continue reading »