AI / LangChain4j interview questions
What are the core modules of LangChain4j?
LangChain4j is organized into several Maven modules so you only pull in what you actually need. The main ones you will encounter in real projects are:
| Module | Artifact ID | Purpose |
|---|---|---|
| Core | langchain4j-core | Interfaces and abstractions (ChatLanguageModel, EmbeddingModel, ChatMemory, etc.) — no provider-specific code |
| Main | langchain4j | High-level features: AI Services, PromptTemplate, RAG pipeline components, chains, tools |
| Provider starters | langchain4j-open-ai, langchain4j-anthropic, etc. | One module per LLM provider — concrete implementations of core interfaces |
| Embedding stores | langchain4j-chroma, langchain4j-pgvector, langchain4j-pinecone, etc. | Vector database integrations for RAG |
| Document loaders | Built into main module | FileSystemDocumentLoader, UrlDocumentLoader, AmazonS3DocumentLoader, etc. |
| Spring Boot starter | langchain4j-spring-boot-starter | Auto-configuration, bean injection, properties binding for Spring applications |
| Quarkus extension | quarkus-langchain4j | CDI integration and native compilation support for Quarkus |
The design intentionally separates interfaces (core) from implementations (provider modules) so your application code can remain provider-agnostic. If you start with OpenAI and later want to switch to Anthropic or an on-premise Ollama instance, you swap the dependency and update a few configuration properties — the AI Services interface code stays unchanged.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
