aboutsummaryrefslogtreecommitdiff
path: root/apps/docs/memory-api/features/reranking.mdx
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2025-09-28 16:42:06 -0700
committerDhravya Shah <[email protected]>2025-09-28 16:42:06 -0700
commit2093b316d9ecb9cfa9c550f436caee08e12f5d11 (patch)
tree07b87fbd48b0b38ef26b9d5f839ad8cd61d82331 /apps/docs/memory-api/features/reranking.mdx
parentMerge branch 'main' of https://github.com/supermemoryai/supermemory (diff)
downloadsupermemory-2093b316d9ecb9cfa9c550f436caee08e12f5d11.tar.xz
supermemory-2093b316d9ecb9cfa9c550f436caee08e12f5d11.zip
migrate docs to public
Diffstat (limited to 'apps/docs/memory-api/features/reranking.mdx')
-rw-r--r--apps/docs/memory-api/features/reranking.mdx44
1 files changed, 44 insertions, 0 deletions
diff --git a/apps/docs/memory-api/features/reranking.mdx b/apps/docs/memory-api/features/reranking.mdx
new file mode 100644
index 00000000..1df8a9c5
--- /dev/null
+++ b/apps/docs/memory-api/features/reranking.mdx
@@ -0,0 +1,44 @@
+---
+title: "Reranking"
+description: "Reranked search results in supermemory"
+icon: "chart-bar-increasing"
+---
+
+Reranking is a feature that allows you to rerank search results based on the query.
+
+![Reranking](/images/rerank.png)
+
+### Usage
+
+In supermemory, you can enable answer rewriting by setting the `rerank` parameter to `true` in the search API.
+
+<CodeGroup>
+
+```bash cURL
+curl https://api.supermemory.ai/v3/search?q=What+is+the+capital+of+France?&rerank=true \
+ --request GET \
+ --header 'Authorization: Bearer SUPERMEMORY_API_KEY'
+```
+
+```typescript
+await client.search.create({
+ q: "What is the capital of France?",
+ rerank: true,
+});
+```
+
+```python
+client.search.create(
+ q="What is the capital of France?",
+ rerank=True
+)
+```
+
+</CodeGroup>
+
+### Notes and limitations
+
+- We currently use `bge-reranker-base` model for reranking.
+- There is no additional costs associated with reranking.
+- While reranking makes the quality much better, it also **incurs additional latency**.
+- All other features like filtering, hybrid search, recency bias, etc. work with reranked results as well.