diff --git a/apps/docs/search/overview.mdx b/apps/docs/search/overview.mdx deleted file mode 100644 index 75b9f2cb..00000000 --- a/apps/docs/search/overview.mdx +++ /dev/null @@ -1,87 +0,0 @@ ---- -title: Search memories -description: Search through your stored memories and documents using semantic search ---- - -The v4 search API allows you to search through your stored memories and documents using semantic search. It supports two search modes: memories-only search and hybrid search. - -## Search modes - -### Memories mode (default) - -Searches only through memory entries that have been stored in your organization. This is the default mode and is optimized for finding specific memories. - -```json -{ - "q": "What are John's preferences?", - "searchMode": "memories" -} -``` - -### Hybrid mode - -Hybrid search provides a fallback mechanism when memories don't contain the information you're looking for. It works in two stages: - -1. **Memory search**: First searches through your stored memories -2. **Chunk fallback**: If no or insufficient memories are found, searches through document chunks - -This mode is useful when you want comprehensive results that include both structured memories and raw document content. - -```json -{ - "q": "What are John's preferences?", - "searchMode": "hybrid" -} -``` - -## How hybrid search works - -When using hybrid search mode: - -1. The system performs a semantic search across your memory entries -2. In parallel, it searches through document chunks using vector similarity -3. Results are merged and sorted by similarity score -4. Duplicate chunks (those already associated with memory results) are automatically removed -5. The top results are returned, respecting your specified limit - -This approach ensures you get the most relevant information whether it's stored as a structured memory or within a document chunk. - -## Key features - -- **Semantic search**: Uses embeddings to find semantically similar content -- **Query rewriting**: Optionally rewrites queries for better search results -- **Reranking**: Optionally reranks results for improved relevance -- **Filtering**: Filter by metadata, date ranges, and container tags -- **Context inclusion**: Include related memories, documents, and chunks -- **Temporal context**: Include memories created before/after results - -## Quick example - -```bash -curl -X POST https://api.supermemory.ai/v4/search \ - -H "Authorization: Bearer YOUR_API_KEY" \ - -H "Content-Type: application/json" \ - -d '{ - "q": "machine learning preferences", - "searchMode": "hybrid", - "limit": 10, - "threshold": 0.7 - }' -``` - -## Next steps - - - - Learn about all available search parameters - - - Understand the response structure - - - See practical examples - - - Learn about advanced filtering - -