AI / LangChain4j interview questions
What EmbeddingStores does LangChain4j support and how do you choose one?
An EmbeddingStore is the vector database layer in LangChain4j's RAG pipeline — it stores embedding vectors alongside their source text and metadata, and supports approximate nearest-neighbor (ANN) similarity search. LangChain4j implements a unified EmbeddingStore<TextSegment> interface across all backends, so swapping stores requires only a dependency and configuration change.
| Store | Type | Best For |
|---|---|---|
| InMemoryEmbeddingStore | In-memory (no persistence) | Development, unit tests, prototyping |
| PgVector | PostgreSQL extension | Teams already on Postgres; no separate vector DB infrastructure |
| Chroma | Open-source vector DB | Local dev/staging, self-hosted deployments |
| Pinecone | Managed cloud vector DB | Production scale, fully managed |
| Weaviate | Open-source / cloud | Multi-modal search, built-in vectorization |
| Qdrant | Open-source / cloud | High-performance filtered search |
| Milvus / Zilliz | Open-source / cloud | Very large-scale vector workloads |
| Elasticsearch | Managed / self-hosted | Teams already running ELK stack |
| Azure AI Search | Managed Azure service | Azure-native deployments |
| Redis Stack | In-memory + persistence | Low-latency, existing Redis infrastructure |
For choosing: start with InMemoryEmbeddingStore during development. For production, use PgVector if you already run PostgreSQL (zero additional infrastructure), or Pinecone/Qdrant if you need a dedicated managed vector database with advanced filtering and scaling controls. The interface is identical across all stores, so the choice is purely operational.
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...
