World Congress 2024 • Aug 20, 2024 • Session details

Infusing Generative AI in your Java Apps with LangChain4j

Kevin Dubois

What if adding generative AI to your Java apps was as simple as using an annotation? Learn how LangChain4j turns complex prompt engineering into straightforward, resilient code.

Pause
Mute Enter Fullscreen
#1 about 2 min

Consuming generative artificial intelligence models in Java

Traditional developers can interact with AI models through standard serving APIs using familiar application frameworks.

#2 about 5 min

Bootstrapping Java applications using the LangChain4j library

Setting up a new Quarkus project mapped to OpenAI requires a simple dependency configuration.

#3 about 3 min

Injecting context and formatting output via AI prompts

Interfaces leverage specific annotations like system messages to dictate context and map responses directly to Java objects.

#4 about 3 min

Maintaining conversational state with memory providers

Chat memory mechanisms preserve previous interactions and scope parallel conversations using isolated identifier tags.

#5 about 2 min

Bridging large language models and deterministic business code

Natural language instructions trigger precise application functions using specific tool annotations within standard class methods.

#6 about 5 min

Testing generative content and automated email triggering

The application creates AI-generated poetry through web endpoints and pipes the text output to localized mail servers.

#7 about 3 min

Augmenting model knowledge using document embedding stores

Storing serialized internal business documents in vector databases equips base models to answer highly specialized organizational queries.

#8 about 1 min

Simplified vector indexing via Quarkus Easy RAG

The Easy RAG extension accelerates context building by directly ingesting local resource directories into memory at startup.

#9 about 7 min

Building custom domain chatbots evaluated by local documents

An interactive service agent parses vectorized policy documents to correctly approve or enforce system-defined booking restrictions.

#10 about 2 min

Providing robustness with local models and network fallbacks

Adding microprofile implementations alongside localized container runtimes guarantees service availability during external connectivity disruptions.

#11 about 4 min

Invoking localized container models with configured retries

Shutting off the primary endpoint forces the application engine to traverse the retry circuit before deploying fallback methods.

Matching moments

2:56 min

Integrating local AI models into Java Quarkus applications

Cedric Clyburn Cedric Clyburn · World Congress 2024

2:31 min

Accelerating AI delivery with Quarkus and LangChain4j

Daniel Oh Daniel Oh · World Congress 2026 Europe

2:55 min

Building AI interactions in Java with LangChain4j

Alex Soto Alex Soto · World Congress 2025

3:36 min

Overview of generative AI and the presentation agenda

juarezjunior juarezjunior · World Congress 2024

2:55 min

Bridging Java applications and AI models with LangChain4j

Daniel Oh Daniel Oh +1 · World Congress 2025

2:54 min

Utilizing Java frameworks to interface with AI models

Mary Grygleski Mary Grygleski · LIVE

Upcoming sessions on this topic

Open session

Java is Coming for Python’s Lunch: The Rise of JVM AI Agents

  • Frederik Pietzko

    Jetbrains

    Developer Advocate

Open session

Build a Zero-Cost AI Agent in Your Browser

  • Aishwarya Mathuria

    Adobe

    Computer Scientist

  • Nishant Thakur

    Adobe

    Senior Computer Scientist

Open session

From Prompt Engineering to Harness Engineering: Building Observable and Governed GenAI Systems

  • Lakshmi Devi Prakash

    JPMorgan Chase

    VP, Applied AI/ML Lead

Open session

Teaching AI Coding Agents to Build It Right the First Time

  • Sajeetharan Sinnathurai

    Microsoft

    Principal Product Manager

Open session

Beyond File Dumps: Context Engineering for Coding Agents

  • Animesh Dutta

    Arm

    Senior Software Engineer

Open session

Prompt Debt: Why Your AI System Is Frozen in Time

  • Suriya Prakash B

    Red Hat

    Principal Software Engineer