Introduction
Understand vector search with Qdrant on Google Axion
Create a Google Axion C4A Arm virtual machine
Install and run Qdrant on Axion
Generate and index vector embeddings
Query vector embeddings with semantic search
Build a chatbot with Qdrant on Axion
Understand the vector search architecture
Next Steps
In this section, you query the Qdrant vector database using semantic similarity search.
Unlike traditional keyword search, semantic search compares vector embeddings to identify the most relevant results based on meaning and context rather than exact keyword matches.
Semantic search enables AI applications such as chatbots, recommendation systems, and knowledge retrieval platforms.
The workflow retrieves the most relevant documents using vector similarity.
User Query
|
v
Sentence Transformer Model
|
v
Query Embedding Vector
|
v
Qdrant Vector Database
|
v
Similarity Search
|
v
Top Matching Documents
Navigate to the project directory, then create the Python script used to query the vector database.
cd ~/qdrant-rag-demo
vi search.py
Add the following code:
from qdrant_client import QdrantClient
from sentence_transformers import SentenceTransformer
client = QdrantClient(url="http://localhost:6333")
model = SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2")
query = "What is vector search?"
query_vector = model.encode(query).tolist()
results = client.query_points(
collection_name="axion_demo",
query=query_vector,
limit=2
)
print("\nTop results:\n")
for point in results.points:
print(point.payload["text"])
The script performs the following steps:
Execute the search script.
python search.py
The output is similar to:
Vector databases enable semantic search.
Qdrant is optimized for vector similarity search.
The output confirms that the system successfully retrieved the most semantically relevant documents.
Traditional search engines rely on keyword matching, which often fails when queries are phrased differently.
Semantic search uses vector embeddings to capture meaning.
| User Query | Retrieved Result |
|---|---|
| What is vector search? | Vector databases enable semantic search |
| Explain Qdrant | Qdrant is optimized for vector similarity search |
| How do embeddings work? | Vector databases enable semantic search |
Semantic search allows applications to understand intent rather than exact wording.
In this section, you learned how to:
In the next section, you will extend this workflow to build a chatbot-style knowledge retrieval system, allowing users to interactively query the vector database using natural language.