Spring / Spring AI interview questions
What is a VectorStore in Spring AI and which implementations are available?
A VectorStore is Spring AI's abstraction over a vector database — a storage engine optimised for persisting high-dimensional float vectors (embeddings) and performing approximate nearest-neighbour (ANN) similarity search over them. It is the persistence backbone of the RAG pipeline.
The interface defines two core operations: add(List<Document> documents) which embeds and stores documents, and similaritySearch(SearchRequest request) which returns the top-K documents most semantically similar to a query string.
Spring AI ships auto-configured implementations for:
| Store | Notes |
|---|---|
| SimpleVectorStore | In-memory only — for prototyping and unit tests |
| PgVector | PostgreSQL + pgvector extension — most common for teams already on Postgres |
| Redis (RedisVectorStore) | Uses Redis Stack with vector index |
| Chroma | Open-source; popular for local dev |
| Pinecone | Fully managed cloud vector DB |
| Weaviate | Cloud-native open-source vector DB |
| Milvus | High-throughput distributed vector DB |
| Qdrant | Rust-based, high performance |
| Azure AI Search | Managed Azure vector search |
All implementations satisfy the same VectorStore interface, so switching from SimpleVectorStore in development to PgVector in production is purely a dependency and configuration change — no application code touches the store directly except through the interface.
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...
