Retrieval
Personalize recommendations
Record interaction signals and blend them with semantic search results.
Record a view
Send the document identifier after a user interaction. QDivZero returns a short-lived recommendation token for that user context.
In Try Retrieval → Documents, select View on a document to create recommendation context. The Recommend tab uses that context to retrieve related items.
Blend with the query
Send the token and a bias from 0 to 1 with a later search. Lower values favor the query. Higher values favor the recorded interaction history.
API example
Set QDIV0_DATABASE_ID. First record a view; copy recommend_token from the response and replace REPLACE_WITH_TOKEN in the second request. Document doc-1 must be indexed.
Set QDIV0_USER_API_KEY to a personal uk_ key. The default account is used; for another account you belong to, add its identifier in the X-Account-ID header.
1curl --fail-with-body \
2 --request POST \
3 "https://api.qdiv0.com/v1/flexible-vector-databases/$QDIV0_DATABASE_ID/view-element" \
4 -H "Authorization: Bearer $QDIV0_USER_API_KEY" \
5 -H "Content-Type: application/json" \
6 --data '{"document_id":"doc-1"}'
7
8curl --fail-with-body \
9 --request POST \
10 "https://api.qdiv0.com/v1/flexible-vector-databases/$QDIV0_DATABASE_ID/recommend" \
11 -H "Authorization: Bearer $QDIV0_USER_API_KEY" \
12 -H "Content-Type: application/json" \
13 --data '{"recommend_token":"REPLACE_WITH_TOKEN","top_k":3}'