apps/docs/memory-api/features/query-rewriting.mdx
Query Rewriting is a feature that allows you to rewrite queries to make them more accurate.
In supermemory, you can enable query rewriting by setting the rewriteQuery parameter to true in the search API.
curl https://api.supermemory.ai/v3/search \
--request POST \
--header 'Authorization: Bearer SUPERMEMORY_API_KEY' \
--header 'Content-Type: application/json' \
-d '{
"q": "What is the capital of France?",
"rewriteQuery": true
}'
await client.search.create({
q: "What is the capital of France?",
rewriteQuery: true,
});
client.search.create(
q="What is the capital of France?",
rewriteQuery=True
)