Skip to content
JavaAgentic

Type at least two characters. Try “RAG”, “pgvector” or “tool calling”.

AI Engineering · Phase 2

LangChain4j Deep Dive

Master LangChain4j end to end: AI Services, document loaders, splitters, embedding stores, retrievers, memory, and tool-using agents.

Beginner6 min read

LangChain4j Introduction & Architecture

A complete LangChain4j introduction for Java developers: core abstractions, the AiServices declarative style, memory, tools and retrieval — plus an honest comparison with Spring AI.

Read tutorial
Beginner3 min read

LangChain4j Chat Models

Configure chat models in LangChain4j: OpenAI, Anthropic Claude, Google Gemini, Mistral and Ollama — with streaming, timeouts, retries and how to swap providers without touching your code.

Read tutorial
Intermediate4 min read

LangChain4j Chains & Composition

Compose multi-step LLM workflows in LangChain4j: sequential chains, routing by classification, and building custom chains from AI Services — when to chain and when a single call suffices.

Read tutorial
Intermediate3 min read

LangChain4j Document Loaders

Load documents into LangChain4j from files, URLs, S3, GitHub and more, and parse PDF, DOCX and HTML with Apache Tika — the ingestion front-end for any RAG pipeline in Java.

Read tutorial
Intermediate4 min read

LangChain4j Text Splitters

Chunk documents effectively in LangChain4j: the recursive splitter, chunk size and overlap tuning, splitting code and markdown, and why chunking is the highest-impact decision in RAG.

Read tutorial
Intermediate3 min read

LangChain4j Embedding Models

Configure embedding models in LangChain4j: hosted models like OpenAI and Cohere, free in-process ONNX models, dimension matching, and choosing an embedding model for RAG.

Read tutorial
Intermediate3 min read

LangChain4j Embedding Stores

Store and search vectors in LangChain4j: the in-memory store for tests, PgVector for production, Redis and Elasticsearch, plus metadata filtering and picking the right store.

Read tutorial
Advanced3 min read

LangChain4j Retrievers & RAG

Build RAG in LangChain4j with ContentRetriever: attach retrieval to AI Services, transform queries, re-rank results, and assemble an advanced RAG pipeline with the RetrievalAugmentor.

Read tutorial
Advanced5 min read

LangChain4j Agents & Tools

Build tool-using agents in LangChain4j: the @Tool annotation, how the agent loop works, bounding iterations, safe write tools and the ReAct pattern — with production-ready code.

Read tutorial
Intermediate4 min read

LangChain4j Chat Memory

Add conversation memory to LangChain4j AI Services: message and token windows, per-user memory with @MemoryId, persistent stores, and why unbounded memory breaks in production.

Read tutorial
Intermediate4 min read

LangChain4j Structured Output

Return typed objects from LangChain4j AI Services: POJO and record return types, enums, lists, JSON schema mode and validation — no manual parsing of model responses.

Read tutorial