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 »