<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>LangChain4j on foojay.io - Friends of OpenJDK</title><link>https://foojayio.github.io/website/today/category/langchain4j/</link><description>Recent content in LangChain4j on foojay.io - Friends of OpenJDK</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 06 Jun 2026 11:23:18 +0000</lastBuildDate><atom:link href="https://foojayio.github.io/website/today/category/langchain4j/index.xml" rel="self" type="application/rss+xml"/><item><title>Tiberius: A Security Testing Framework for LLM Applications in Java</title><link>https://foojayio.github.io/website/today/tiberius-a-security-testing-framework-for-llm-applications-in-java/</link><pubDate>Thu, 04 Jun 2026 20:09:09 +0000</pubDate><guid>https://foojayio.github.io/website/today/tiberius-a-security-testing-framework-for-llm-applications-in-java/</guid><description>&lt;p&gt;&lt;em&gt;How do you write a regression test for a system that is non-deterministic by design?&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li&gt;The Problem {#h2-0-1-the-problem}&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;p&gt;Large Language Models have moved from research artifacts to production infrastructure. Java applications are embedding them into customer-facing services via Spring Boot, and e.g. LangChain4J &amp;mdash; for document summarization, customer support, healthcare assistance, and financial guidance, to name just a few. The deployment surface is growing faster than the security tooling.&lt;/p&gt;
&lt;p&gt;The vulnerability landscape is empirically well-established. Horlacher, Vifian, and Zagidullina (2026) &lt;strong&gt;[4]&lt;/strong&gt; red-teamed &lt;code&gt;gpt-oss-20b&lt;/code&gt; and found that adversarial techniques achieved alarmingly high Attack Success Rates, while non-adversarial probing exposed pervasive stereotypical defaults &amp;mdash; both consistent across English and Swiss German. Their conclusion: &lt;em&gt;&amp;ldquo;current alignment mechanisms have not fully resolved jailbreaks and inherent bias, posing critical challenges for automated decision-making.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;</description></item><item><title>JC-AI Newsletter #15</title><link>https://foojayio.github.io/website/today/jc-ai-newsletter-15/</link><pubDate>Fri, 20 Mar 2026 07:56:01 +0000</pubDate><guid>https://foojayio.github.io/website/today/jc-ai-newsletter-15/</guid><description>&lt;p&gt;Over the past two weeks, the field of artificial intelligence has continued its remarkable pace of advancement. As AI becomes increasingly woven into the fabric of daily life, shaping how we work, communicate, and make decisions, it is both timely and valuable to step back and understand the broader trajectory of this technology. Whether the developments around us feel promising or challenging, one truth remains clear: AI is not simply leaving. It is here to stay, and understanding its evolution is essential from many perspectives.&lt;/p&gt;</description></item><item><title>Bring AI into your Jakarta EE apps with LangChain4J-CDI</title><link>https://foojayio.github.io/website/today/bring-ai-into-your-jakarta-ee-apps-with-langchain4j-cdi/</link><pubDate>Sat, 24 Jan 2026 17:20:02 +0000</pubDate><guid>https://foojayio.github.io/website/today/bring-ai-into-your-jakarta-ee-apps-with-langchain4j-cdi/</guid><description>&lt;p&gt;&lt;strong&gt;Goal&lt;/strong&gt; : This article will demonstrate how to add AI features to a Jakarta EE / MicroProfile application using &lt;strong&gt;LangChain4J‑CDI&lt;/strong&gt;, with simple to implement examples that runs on Payara, WildFly, Open Liberty, Helidon, Quarkus or any CDI 4.x compatible runtime.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Note:&lt;/strong&gt; This is an updated article to the one published on the &lt;a href="https://javapro.io/2025/10/28/04-2025-java-25-special-edition/" target="_blank" rel="noopener noreferrer"&gt;JAVAPRO&amp;rsquo;s magazine - &amp;ldquo;04-2025 | Java 25 - Special Edition&amp;rdquo;&lt;/a&gt;
. Since the release of LangChain4J-CDI version 1.0.0, there&amp;rsquo;s been minor changes, but the fundamental architecture and usage of the library is the same.&lt;/em&gt;&lt;/p&gt;</description></item><item><title>JC-AI Newsletter #6</title><link>https://foojayio.github.io/website/today/jc-ai-newsletter-6/</link><pubDate>Wed, 01 Oct 2025 17:18:16 +0000</pubDate><guid>https://foojayio.github.io/website/today/jc-ai-newsletter-6/</guid><description>&lt;p&gt;&lt;strong&gt;Fourteen days have passed, and it is time to present a fresh collection of readings that could influence developments in the field of artificial intelligence.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Beyond opinion pieces and Java focused tutorials that can enhance your understanding of AI applications, this newsletter concentrates on Hallucination, Security, RAG and LLM benchmarking methodologies designed to ensure models accuracy and competency in handling complex contextual information.&lt;/p&gt;
&lt;p&gt;The world influenced by LLM is changing very quickly, let&amp;rsquo;s start&amp;hellip;&lt;/p&gt;</description></item><item><title>JC-AI Newsletter #4</title><link>https://foojayio.github.io/website/today/jc-ai-newsletter-4/</link><pubDate>Tue, 02 Sep 2025 20:27:52 +0000</pubDate><guid>https://foojayio.github.io/website/today/jc-ai-newsletter-4/</guid><description>&lt;p&gt;14 days have passed and it&amp;rsquo;s time for a new batch of readings that could shape developments in the field of artificial intelligence.&lt;/p&gt;
&lt;p&gt;The current newsletter vol. 4 offers us a closer look at several different areas of artificial intelligence. We start with the topic of energy consumption and the environmental impact of systems serving artificial intelligence, and continue with automation, how we obtain data for RAG, robustness of GenAI systems, vibe-coding and more.&lt;/p&gt;</description></item><item><title>AI Applications with LangChain4j Guardrails and Spring Boot</title><link>https://foojayio.github.io/website/today/building-robust-ai-applications-with-langchain4j-guardrails-and-spring-boot/</link><pubDate>Tue, 29 Jul 2025 11:16:31 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-robust-ai-applications-with-langchain4j-guardrails-and-spring-boot/</guid><description>&lt;p&gt;&lt;strong&gt;As AI applications become increasingly complex, ensuring that language models behave predictably and safely is paramount. LangChain4j&amp;rsquo;s guardrails feature provides a powerful framework for validating both the inputs and outputs of your AI services.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This article demonstrates how to implement comprehensive guardrails in a Spring Boot application, with practical examples that you can adapt to your use cases.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;📦 &lt;strong&gt;Complete source code available at&lt;/strong&gt; : &lt;a href="https://github.com/rokon12/guardrails-demo" target="_blank" rel="noopener noreferrer"&gt;github.com/rokon12/guardrails-demo&lt;/a&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="h2-0-understanding-langchain4j-guardrails"&gt;Understanding LangChain4j Guardrails&lt;/h2&gt;
&lt;p&gt;In LangChain4j, guardrails are validation mechanisms that operate exclusively on AI Services, the framework&amp;rsquo;s high-level abstraction for interacting with language models. Unlike simple validators, guardrails provide sophisticated control over the entire AI interaction lifecycle.&lt;/p&gt;</description></item><item><title>Foojay Podcast #74: JCON Report, Part 3 – AI, ChatGPT, LLM, ML, RAG, MCP, GenAI, and more</title><link>https://foojayio.github.io/website/today/foojay-podcast-74/</link><pubDate>Mon, 30 Jun 2025 06:47:00 +0000</pubDate><guid>https://foojayio.github.io/website/today/foojay-podcast-74/</guid><description>&lt;p&gt;&lt;strong&gt;Let&amp;rsquo;s have an AI Bingo and talk about ChatGPT, LLM, ML, RAG, MCP, GenAI, and more!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is part 3 of the interviews recorded at the JCON conference in May. In the previous parts, you learned more about how to be a better Java developer and how Java has evolved and continues to evolve. Of course, Artificial Intelligence and large language models were hot topics at the conference.&lt;/p&gt;
&lt;p&gt;This episode collects all the interviews on the AI topic. You will learn more about the different technologies we can use in our Java projects. We also checked with our guests to see how they compare Java to Python for AI-related development.&lt;/p&gt;</description></item><item><title>Sentiment Analysis with Java, Quarkus, LangChain4j, and Local LLMs</title><link>https://foojayio.github.io/website/today/build-a-sentiment-analysis-api-in-java-with-quarkus-and-local-llms/</link><pubDate>Wed, 25 Jun 2025 12:20:26 +0000</pubDate><guid>https://foojayio.github.io/website/today/build-a-sentiment-analysis-api-in-java-with-quarkus-and-local-llms/</guid><description>&lt;p&gt;&lt;img src="https://foojayio.github.io/website/today/build-a-sentiment-analysis-api-in-java-with-quarkus-and-local-llms/49de875e-fe8c-40d2-9613-61a6c8270eb3_1536x1024-700x467.webp" alt="Abstract image" loading="lazy"&gt;
&lt;/p&gt;
&lt;p&gt;In a world full of opinions, tweets, reviews, chats, emails, understanding the tone behind words is crucial. Whether you&amp;rsquo;re building a feedback system, monitoring brand reputation, or adding emotion detection to a chatbot, sentiment analysis plays a key role. It turns raw text into actionable signals: Is the customer happy? Frustrated? Neutral?&lt;/p&gt;
&lt;p&gt;Traditionally, this kind of natural language processing (NLP) required cloud APIs or heavyweight ML stacks. But now, thanks to modern Java frameworks like &lt;a href="https://quarkus.io/" target="_blank" rel="noopener noreferrer"&gt;Quarkus&lt;/a&gt;
, local Large Language Models (LLMs), and the &lt;a href="https://docs.quarkiverse.io/quarkus-langchain4j/dev/index.html" target="_blank" rel="noopener noreferrer"&gt;LangChain4j&lt;/a&gt;
 library, you can build a sentiment analyzer that runs entirely on your machine&amp;mdash;no cloud account, no API keys, no surprise billing.&lt;/p&gt;</description></item><item><title>Ensuring Safe and Reliable AI Interactions with LLM Guardrails</title><link>https://foojayio.github.io/website/today/ensuring-safe-and-reliable-ai-interactions-with-llm-guardrails/</link><pubDate>Tue, 17 Jun 2025 07:11:24 +0000</pubDate><guid>https://foojayio.github.io/website/today/ensuring-safe-and-reliable-ai-interactions-with-llm-guardrails/</guid><description>&lt;p&gt;&lt;strong&gt;Integrating Large Language Models (LLMs) into our applications is becoming increasingly popular. These models are extremely useful for creating content, searching documentation, and solving more complex problems. However, with great power comes great responsibility.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We know that LLMs can and will make mistakes, and while enriching your prompts with the proper context can help align results with your documents and information, risks still remain. Along with the rise of LLMs, new attack vectors are surfacing. Clever prompt injections can lead to misinformation and‌ escalate privacy-sensitive information.&lt;/p&gt;</description></item><item><title>What is RAG, and How to Secure It</title><link>https://foojayio.github.io/website/today/what-is-rag-and-how-to-secure-it/</link><pubDate>Fri, 16 May 2025 11:48:16 +0000</pubDate><guid>https://foojayio.github.io/website/today/what-is-rag-and-how-to-secure-it/</guid><description>&lt;p&gt;Integrating large language models (LLMs) into your application is more accessible than ever. With a few API calls to OpenAI, Anthropic, or Cohere, you can instantly add &lt;a href="https://snyk.io/solutions/secure-ai-generated-code/" target="_blank" rel="noopener noreferrer"&gt;++AI capabilities++&lt;/a&gt;
 to your stack. Using frameworks and libraries that abstract this away for you makes it even easier to create your own LLM-powered assistant. However, if you&amp;rsquo;ve shipped any real-world LLM features, you&amp;rsquo;ve hit the wall where these powerful models confidently make up facts, reference outdated information, or deliver answers that don&amp;rsquo;t take your context into account.&lt;/p&gt;</description></item><item><title>Autopo: An open source tool to automate .po file translation with AI.</title><link>https://foojayio.github.io/website/today/building-autopo-an-ai-powered-open-source-application-to-manage-po-files/</link><pubDate>Mon, 12 May 2025 07:12:39 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-autopo-an-ai-powered-open-source-application-to-manage-po-files/</guid><description>&lt;p&gt;As a developer today, you&amp;rsquo;ve almost certainly encountered the need of localizing your application or website. While setting up your project for internationalization is usually straightforward, managing translations over time can become a complex, time consuming and costly task, especially for open source projects.&lt;/p&gt;
&lt;p&gt;Fortunately, machine translation have come a long way. It&amp;rsquo;s not perfect, but with the right context, modern AI can deliver surprisingly accurate results.&lt;/p&gt;
&lt;p&gt;In this article , I&amp;rsquo;ll walk you through the journey that led me to create &lt;a href="https://autopo.ooo" title="Autopo" target="_blank" rel="noopener noreferrer"&gt;Autopo&lt;/a&gt;
, a free and &lt;a href="https://github.com/soberlemur/autopo/" target="_blank" rel="noopener noreferrer"&gt;open source&lt;/a&gt;
 JavaFX desktop tool for managing &lt;code&gt;.po&lt;/code&gt; files and with AI-powered features to translate and validate &lt;code&gt;.po&lt;/code&gt; entries.&lt;/p&gt;</description></item><item><title>Building FormPilot</title><link>https://foojayio.github.io/website/today/building-formpilot-my-journey-creating-an-ai-powered-form-filler-with-rag-langchain4j-and-ollama/</link><pubDate>Tue, 06 May 2025 10:00:04 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-formpilot-my-journey-creating-an-ai-powered-form-filler-with-rag-langchain4j-and-ollama/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer: This article details an experimental project built for learning and demonstration purposes. The implementation described is not intended as production-grade solution. Some parts of the code were generated using JetBrains&amp;rsquo; AI Agent, &lt;a href="https://www.jetbrains.com/junie/" target="_blank" rel="noopener noreferrer"&gt;Junie&lt;/a&gt;
.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Have you ever found yourself filling out the same information on web forms over and over again? Name, email, address, phone number&amp;hellip; it&amp;rsquo;s tedious and time-consuming. As a developer who values efficiency, I decided to tackle this problem head-on by building FormPilot, an intelligent form filler that leverages the power of Large Language Models (LLMs) to fill out forms with contextually appropriate information automatically.&lt;/p&gt;</description></item><item><title>Foojay Webinar: Java's Place in the AI Revolution</title><link>https://foojayio.github.io/website/today/foojay-webinar-live-stream-javas-place-in-the-ai-revolution/</link><pubDate>Mon, 28 Apr 2025 15:53:25 +0000</pubDate><guid>https://foojayio.github.io/website/today/foojay-webinar-live-stream-javas-place-in-the-ai-revolution/</guid><description>&lt;p&gt;This first online Foojay Webinar highlights Java&amp;rsquo;s place in the AI revolution, focusing on exploring AI/ML using pure Java tools.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
			&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/ySMhUGTy5XY?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
		&lt;/div&gt;

&lt;p&gt;AI and Machine Learning (ML) are becoming essential in modern software development. For Java developers, there&amp;rsquo;s no need to switch technology stacks. It&amp;rsquo;s now possible to build, train, and deploy ML models using tools available directly within the Java ecosystem.&lt;/p&gt;</description></item><item><title>Enhancing LLM’s Conversations with Efficient Summarization</title><link>https://foojayio.github.io/website/today/summarizingtokenwindowchatmemory-enhancing-llms-conversations-with-efficient-summarization/</link><pubDate>Mon, 03 Mar 2025 13:16:21 +0000</pubDate><guid>https://foojayio.github.io/website/today/summarizingtokenwindowchatmemory-enhancing-llms-conversations-with-efficient-summarization/</guid><description>&lt;p&gt;&lt;strong&gt;LLM chat models have become an integral part of many applications today. We are all experimenting and exploring the best ways to utilize them effectively. For Java developers, LangChain4j has been an incredible tool in this journey.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;By design, most available APIs, such as ChatGPT and Gemini, operate in a &lt;strong&gt;fire-and-forget&lt;/strong&gt; mode. They don&amp;rsquo;t retain previous interactions, meaning every request is treated as a completely new one.&lt;/p&gt;
&lt;p&gt;However, for a smooth and engaging conversation, maintaining context is crucial&amp;mdash;otherwise, the interaction becomes disjointed and frustrating. The common solution is to pass previous messages along with each new prompt, allowing the LLM to infer context. This is where the &lt;strong&gt;chat memory&lt;/strong&gt; concept comes in.&lt;/p&gt;</description></item><item><title>Build local LLM applications with Quarkus, Ollama, Testcontainers</title><link>https://foojayio.github.io/website/today/building-local-llm-ai-powered-applications-with-quarkus-ollama-and-testcontainers/</link><pubDate>Thu, 27 Feb 2025 10:13:19 +0000</pubDate><guid>https://foojayio.github.io/website/today/building-local-llm-ai-powered-applications-with-quarkus-ollama-and-testcontainers/</guid><description>&lt;p&gt;Traditionally, many AI-powered applications rely on cloud-based APIs or centralized services for model hosting and execution. While this approach has its advantages, such as scalability and ease of use, it also introduces challenges around latency, data privacy, and dependency on third-party providers.&lt;/p&gt;
&lt;p&gt;This is where local AI models shine. By running models directly within your application&amp;rsquo;s infrastructure, you gain greater control over performance, data security, and deployment flexibility. However, building such systems requires the right tools and frameworks to bridge the gap between traditional software development and AI model integration.&lt;/p&gt;</description></item></channel></rss>