mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-08 22:21:07 +00:00
Delete apps/docs/search/overview.mdx
Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
This commit is contained in:
parent
3dfb3e7823
commit
856e06dfc8
1 changed files with 0 additions and 87 deletions
|
|
@ -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
|
||||
|
||||
<CardGroup cols={2}>
|
||||
<Card title="Parameters" icon="sliders" href="/search/parameters">
|
||||
Learn about all available search parameters
|
||||
</Card>
|
||||
<Card title="Response schema" icon="brackets-curly" href="/search/response-schema">
|
||||
Understand the response structure
|
||||
</Card>
|
||||
<Card title="Examples" icon="code" href="/search/examples/memory-search">
|
||||
See practical examples
|
||||
</Card>
|
||||
<Card title="Filtering" icon="filter" href="/search/filtering">
|
||||
Learn about advanced filtering
|
||||
</Card>
|
||||
</CardGroup>
|
||||
Loading…
Add table
Reference in a new issue