# How to Make a RAG Application With LangChain4j

DevFeed: [How to Make a RAG Application With LangChain4j](<https://devfeed.tech/articles/how-to-make-a-rag-application-with-langchain4j-21836.md>)

Original publisher: [Read original article](<https://www.thepolyglotdeveloper.com/blog/2025/05/how-to-make-a-rag-application-with-langchain4j/>)

Author: Tim Kelly

Published: 2025-05-03T12:00:00Z

Content type: tutorial

Language: en

Sources: [Nic Raboy](<https://devfeed.tech/sources/nic-raboy.md>)

Topics: [Retrieval-Augmented Generation](<https://devfeed.tech/topics/retrieval-augmented-generation.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Development](<https://devfeed.tech/topics/development.md>), [Embeddings](<https://devfeed.tech/topics/embeddings.md>), [Java](<https://devfeed.tech/topics/java.md>), [Library](<https://devfeed.tech/topics/library.md>), [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [AI Development](<https://devfeed.tech/topics/ai-development.md>), [Chat Bot](<https://devfeed.tech/topics/chatbot.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [chatbots](<https://devfeed.tech/tags/chatbots.md>), [database](<https://devfeed.tech/tags/database.md>), [embeddings](<https://devfeed.tech/tags/embeddings.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [langchain4j](<https://devfeed.tech/tags/langchain4j.md>), [library](<https://devfeed.tech/tags/library.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [rag](<https://devfeed.tech/tags/rag.md>)

## AI overview

This tutorial explains how to build a retrieval-augmented generation Q&A chatbot with LangChain4j. It describes retrieving data from MongoDB Atlas, storing documents as vector embeddings, and using the retrieved data to augment LLM prompts.

## Source excerpt

Retrieval-augmented generation, or RAG, introduces some serious capabilities to your large language models (LLMs). These applications can answer questions about your specific corpus of knowledge, whil... The post How to Make a RAG Application With LangChain4j appeared first on DEV.