Getting started with langchain4j and Llama Model

This article is a step-by-step guide to introduce you to Large Language Models (LLMs) in Java applications using LangChain4j. We will learn how to install the latest version (June 2025) of CodeLlama on a local machine and how to connect and use it from a Java application.

Read more

Categories AI

Using AI in Java applications with WildFly

This guide shows how to integrate a lightweight AI assistant into a Java application running on WildFly. We’ll use the LangChain4j library to interact with a language model (like LLaMA via Ollama), and expose it through a simple HTML interface using Jakarta REST and CDI. No hype, no magic—just a working example.

Read more

Categories AI

Getting Started with DeepSeek AI and Java

DeepSeek AI is a powerful AI model that can be integrated into Java applications using LangChain4j. This tutorial will guide you through setting up a simple chatbot in Java using DeepSeek AI and LangChain4j, leveraging the Ollama API for local execution. DeepSeek AI Model Variants and Differences Before we dive into an example on how … Read more

Categories AI

Getting Started with Quarkus and Langchain4j

Quarkus is a lightweight, cloud-native Java framework optimized for GraalVM and Kubernetes. When combined with Langchain4j, it allows developers to integrate AI capabilities into Java applications efficiently. In this tutorial, we’ll explore how to use Langchain4j with Ollama’s Llama model, creating a simple Command-line application.

Read more

Categories AI

Using RAG with Langchain4j and Ollama3

Retrieval-Augmented Generation (RAG) is a framework that enhances the capabilities of generative language models by incorporating relevant information retrieved from a large corpus of documents. This combination helps improve the accuracy and relevance of the generated responses. In this article we will learn how to use RAG with Langchain4j.

Read more