Similarity search retrieves items relevant to a query by representing both as embeddings in the same vector space and ranking them by distance. Smaller distances indicate greater similarity; cosine similarity is one common measure. section 7.3.2
For episodic agent memory, QdrantMemoryStore embeds and indexes Episode objects, then returns the episodes most similar to a query. It uses Qdrant’s default embedding models to avoid managing a separate embedding service. section 7.3.2
Recalling a similar task
A query about the Hailstone sequence starting from 6 retrieves a stored episode that computed the sequence for 6. section 7.3.2
Figure 7.5 Recording an Episode as a point in the embedding space and recalling the most similar Episode objects to a given query

Shows how stored episodes and a query map into the same embedding space for similarity-based retrieval. section 7.3.2




































