Skip to main content

Semantic Search

Semantic Search is the ability to find memories based on their meaning rather than exact keyword matches. This is the primary way the Memory Platform identifies relevant context for an AI agent's current task.

How it Works

  1. Embedding: When a MemoryBlock is created, its text content is sent to an embedding model (e.g., OpenAI text-embedding-3-small). The model converts the text into a high-dimensional vector.
  2. Indexing: The vector is stored in Qdrant, our semantic memory layer, along with metadata (tenant_id, subject_id, tags).
  3. Querying: When a user or agent submits a query, the platform converts the query into a vector and performs a Cosine Similarity search in Qdrant.
  4. Ranking: Qdrant returns the memories that are semantically closest to the query vector.
FeatureKeyword SearchSemantic Search
Input"pricing""How much does it cost?"
MatchMust contain the word "pricing".Finds "Cost", "Billing", "Subscription fees".
ContextLiteral.Conceptual.
NoiseHigh (irrelevant matches).Low (meaning-focused).

Every semantic search query must include a tenant_id filter. Qdrant is configured with payload indices to ensure that any search is strictly isolated within the tenant's namespace, preventing cross-tenant data leakage.

You can search within a specific scope to increase precision:

  • Subject-Scoped: Find memories about a specific User or Project.
  • Tag-Scoped: Search only within memories tagged with #finance or #playbook.
  • Kind-Scoped: Limit search to "Facts" or "Preferences."

Limitations

Semantic search is powerful but can sometimes retrieve information that is conceptually related but structurally irrelevant. For more precise, relationship-based retrieval, the platform combines Semantic Search with Graph Retrieval.