Semantic Search
How It Works
Notery uses Cohere embed-v4 to generate 1536-dimensional vector embeddings for each document. These embeddings capture the meaning of your content, not just the exact words you used.
Embeddings are stored in PostgreSQL with the pgvector extension and indexed using HNSW (Hierarchical Navigable Small World) for fast approximate nearest-neighbor search, even across large workspaces.
Semantic vs Keyword Search
Traditional keyword search requires an exact match — searching for "auth flow" won't find a document titled "Login Process." Semantic search understands meaning, so related concepts surface naturally.
| Query | Keyword Search | Semantic Search |
|---|---|---|
| "authentication flow" | Matches only docs containing "authentication flow" | Also finds docs about "login process," "session management," "OAuth setup" |
| "deploy to production" | Matches only exact phrase | Also finds "shipping to prod," "release pipeline," "CI/CD workflow" |
| "error handling patterns" | Matches only exact phrase | Also finds "try-catch strategies," "graceful degradation," "fault tolerance" |
Automatic Embedding Generation
Embeddings are generated automatically whenever you create or update a document. There is no manual step required — your workspace stays searchable as you write.
Embedding generation happens server-side after each save. For very large documents, there may be a brief delay before the updated content is searchable.
Pro Reranking
On the Pro plan, search results are re-ordered by a cross-encoder reranking model after the initial vector search. This two-stage process significantly improves relevance, especially for nuanced queries where multiple documents are semantically close.
- Stage 1 — Vector search: Retrieves the top candidate documents by embedding similarity.
- Stage 2 — Reranking: A cross-encoder model scores each candidate against your query and reorders them for better precision.
Tips for Effective Search
Get the most out of semantic search by following these guidelines.
- Use natural language questions. Instead of typing fragmented keywords like
postgres index, tryHow do I create an index in PostgreSQL? - Be specific. The more context you provide in your query, the more relevant the results.
React server component data fetching patternswill outperformReact data. - Combine with filters. Use folder or tag filters alongside semantic search to narrow results to a specific area of your workspace.
- Search for concepts, not filenames. Semantic search works on document content and meaning — describe what you're looking for, not what you think the file is called.