Search feedback
On this page you turn the searches your application already runs into training pairs for an embedding project, and retrain on them.
An embedding call contains text, not which result answered a query, so ReOpenly never saves embedding requests as training data. Instead, your server reports a query and the ranked results it showed, you review the whole list and keep every useful result, and the kept results are promoted into training pairs that you can train on.
Check availability
Search feedback belongs to an embedding project's dataset. Every embedding
project has it: the project lists the dataset.search_feedback capability
(GET /api/v1/projects/{owner_slug}/{project_slug} → project.capabilities).
Report a search
POST /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/retrieval-events
POST /api/v1/projects/{owner_slug}/{project_slug}/datasets/{dataset_id}/retrieval-events/batch
- Authenticate with an account API key (
Authorization: Bearer fnf_...) or a signed-in session. Only the project owner may report or review searches; access to a shared or public model grants nothing here. Every way of not owning the dataset is the same404 retrieval_dataset_not_found. - Send
Content-Type: application/json, uncompressed. - Call this only from your server. Never put an API key in browser code.
- The
dataset_idis on the Search feedback page and inGET /api/v1/projects/{owner_slug}/{project_slug}/datasets.
Basic template. Replace every <...> value before sending:
curl -X POST "https://reopenly.com/api/v1/projects/<owner>/<project>/datasets/<dataset-id>/retrieval-events" \
-H "Authorization: Bearer $REOPENLY_API_KEY" \
-H "Content-Type: application/json" \
--data '{"event_id":"<unique-event-id>","model":"<model-slug>","query":"<search-query>","results":[{"rank":1,"text":"<result-text>"}]}'
cURL example. Example values; replace them before sending:
curl -X POST "https://reopenly.com/api/v1/projects/acme/support/datasets/42/retrieval-events" \
-H "Authorization: Bearer $REOPENLY_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"event_id": "search-2026-09-17-000123",
"model": "support-encoder",
"query": "How do I resume a paused fine-tune?",
"metadata": {
"occurred_at": "2026-09-17T14:02:11Z",
"model_revision": 1,
"search_target": "support-docs-production"
},
"results": [
{"rank": 1, "text": "Resume continues a run rather than replacing it.",
"metadata": {"score": 0.83, "external_id": "chunk-782"}},
{"rank": 2, "text": "Cancel is available while a run is queued."}
]
}'
Required fields
| Field | Rule |
|---|---|
event_id | Your identifier for this search, ^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$, case-sensitive. It is also the replay key. |
model | The slug of the hosted model that produced your vectors (the API calls a hosted model an alias), the same value you send as model to the embeddings API. The search records the exact model revision it was produced with. |
query | The search text, 1 to 8,192 UTF-8 bytes, not whitespace-only. |
results | 1 to 20 items in ascending rank order, ranks exactly 1 to n. Each has rank and text (1 to 32,768 UTF-8 bytes, not whitespace-only). |
Text is stored after Unicode NFC normalization; whitespace is preserved.
Base models also work without a hosted model: set model to
ReOpenly/Qwen3-Embedding-0.6B or ReOpenly/Qwen3-Embedding-4B, the same
reference that generated your vectors. The search records the verified base
build and its settings; a base's model_revision is 1 (omit it or send 1).
Unknown builds or revisions return retrieval_model_not_found. Earlier
Qwen/... references remain accepted. Persistent Search indexes still require
a hosted model.
Optional metadata
Optional values exist only under typed metadata objects. Omit a member you
do not have; never send null. An empty metadata object is the same as
omitting it. Fields the API does not know are ignored, so a client written
against a newer version keeps working; a known field with a wrong value is
still refused.
Search metadata:
occurred_at: when your search ran (RFC 3339, at most 24 hours ahead and 365 days behind receipt). Display only.model_revision: the model revision your server used, for delayed reporting. It must exist in that model's history. Omitted, the current revision at receipt is recorded.search_target: an opaque label for the index, collection or namespace you searched,^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$, never containing://. ReOpenly never connects to it. Do not put credentials or personal data in it.
Result metadata:
score: your search system's score, any finite number (it may be negative). Stored and shown as provided; never used to choose a label.external_id: your chunk or document id, at most 128 UTF-8 bytes.title: at most 512 UTF-8 bytes.source_uri:httpsonly, at most 2,048 bytes, with no user info, query string or fragment.
Review and promote
Review each search on the Search feedback page, or through the API:
- Mark useful ranked results Positive and optionally write one additional positive. Each becomes one training pair with the query as anchor.
- Choose at most one negative: any result you did not keep, the visible suggestion (the highest-ranked result you did not keep), written text, or No negative. Every positive from the review shares that one optional negative, never every positive-negative combination.
- Unchecked results remain search context. They are not labels. Reported
scorevalues are displayed as provenance and never choose a label. - Choosing no negative creates pairs rather than triplets. Pairs created with No negative can train without editing the saved examples. If a pair has no batch partner, a training pair can borrow a safe passage from the training split, and a validation pair from either split; see embedding training.
- Skip creates nothing, and a search nobody reviews creates nothing. A click, a rank or an abandoned review is never a label.
- If the would-be negative is already a known positive for the same query,
promotion is refused with
retrieval_feedback_label_conflictand only the conflicting rank; nothing is written and no lower result is substituted. - If a result you keep is already a hard negative for the same query,
promotion is refused with
retrieval_feedback_positive_conflict. Correct the earlier training pair before keeping it as a positive. - If promotion would exceed the dataset's training pairs limit, the whole
promotion answers
409 embedding_dataset_capacity_exceeded. No partial pairs or review decision are saved. Remove pairs you no longer need, then try again.
GET .../retrieval-events?view=inbox|history&model=&received_after=&received_before=&limit=&cursor=
POST .../retrieval-events/search {"view":"inbox","q":"refund","limit":20}
GET .../retrieval-events/{event_id}
PATCH .../retrieval-events/{event_id} {"expected_revision":1,"state":"skipped"}
POST .../retrieval-events/{event_id}/promote {"expected_revision":1,"kept_ranks":[1,2],"negative_mode":"rank","negative_rank":3}
GET .../retrieval-settings
negative_mode is auto (the highest-ranked result you did not keep),
rank, custom or none. Send negative_rank only with rank and
negative_text only with custom. positive_text adds one written positive;
at least one kept rank or positive_text is required.
{
"object": "retrieval_event_promotion",
"event_id": "search-2026-09-17-000123",
"state": "promoted",
"revision": 2,
"example_ids": [441, 442],
"positive_ranks": [1, 2],
"hard_negative_rank": 3,
"positive_count": 2,
"has_negative": true
}
Pages are keyset-paginated ({data, next_cursor, total_count}); a cursor only
works with the filters it was issued for. A stale expected_revision is
409 revision_conflict with expected_revision and actual_revision.
Correct training pairs
Promoted pairs appear in the dataset's Training pairs editor. Use
Edit to correct the anchor, positive or optional negative, then save or
cancel inline. ReOpenly keeps the pair's Search feedback source and review
provenance while updating the text it trains on. Deleting a training pair
removes it from the live dataset but keeps the source review's content-free
history, and removes the pair from available_example_ids.
Check readiness
Before you train, ask how close the dataset is to something a run can train on, and what is in the way:
GET .../retrieval-readiness
The answer is made of counts and checks only. It never predicts how good the trained model will be: a number measured while training is not the quality you get when the model serves your searches.
-
checksdecideready. Each is{key, ok, code, message, required, available}, the same shape the training estimates return. A failing check is a refusal the training preview gives for a run over the whole dataset, and it carries that refusal'scode.keyFails when codeexamplesThe dataset has fewer training pairs than requiredselection_empty(no pairs),embedding_split_infeasibledistinct_queriesThe pairs come from fewer different queries than requiredembedding_split_infeasiblePromoting several results of one search adds pairs but no new query, so
examplescan pass whiledistinct_queriesfails. Passing checks are necessary, not a promise: validation holds out whole groups of pairs that share any text, and only the preview builds the full split and its batches. Preview the run before you start it. -
warningsnever changeready. They have the same shape;availableis how many rows deserve a look.keycodeCounts unreviewed_eventsretrieval_review_pendingSearches waiting for review repeated_queriesretrieval_query_repeatedWaiting searches that repeat the exact query of another waiting search candidate_pairs_in_examplesretrieval_pair_existsQuery and result pairs in waiting searches that are already training pairs; keeping them adds nothing new examples_without_negativeexamples_without_negativeTraining pairs with no negative; they learn only from the other passages in their batch queries_over_capexamples_per_query_cappedQueries with more training pairs than a run trains on; requiredis that limit -
boundsare the server's own.minimum_examplesandminimum_independent_groupsare theselection_minimumsthatGET .../training-jobs/profilespublishes, andmax_examples_per_queryis the largest value themax_examples_per_querysetting allows on any base. -
eventscounts retained searches by review state (the same numbers asretrieval-settings).inboxdescribes the waiting searches:candidate_pairsis every query and result pair they show, the most their reviews could keep;candidate_pairs_in_examplesof those already exist;queries_in_examplescounts waiting searches whose query already has training pairs.examplescounts the dataset's training pairs from every source, andfrom_search_feedbackthose added by a review.
Readiness covers the whole dataset; a run narrowed with tag_ids is checked by
its preview. Exact duplicate training pairs cannot exist, because the same
query and positive is reused rather than stored twice. Near-duplicates (the
same text with small edits) are not counted. The same owner-only rule and
404 retrieval_dataset_not_found apply as for every Search feedback call.
{
"object": "retrieval_readiness",
"ready": true,
"checks": [
{"key": "examples", "ok": true, "code": null, "message": null, "required": "2", "available": "41"},
{"key": "distinct_queries", "ok": true, "code": null, "message": null, "required": "2", "available": "35"}
],
"warnings": [
{"key": "unreviewed_events", "ok": false, "code": "retrieval_review_pending", "message": "83 searches are waiting for review.", "required": null, "available": "83"},
{"key": "repeated_queries", "ok": false, "code": "retrieval_query_repeated", "message": "6 waiting searches repeat the exact query of another waiting search.", "required": null, "available": "6"},
{"key": "candidate_pairs_in_examples", "ok": false, "code": "retrieval_pair_exists", "message": "9 query and result pairs in waiting searches already exist as training pairs; keeping them adds nothing new.", "required": null, "available": "9"},
{"key": "examples_without_negative", "ok": false, "code": "examples_without_negative", "message": "11 training pairs have no negative and learn only from the other passages in their batch.", "required": null, "available": "11"},
{"key": "queries_over_cap", "ok": true, "code": null, "message": null, "required": "16", "available": "0"}
],
"events": {"unreviewed": 83, "promoted": 38, "skipped": 27, "retained": 148},
"inbox": {"candidate_pairs": 412, "candidate_pairs_in_examples": 9, "repeated_queries": 6, "queries_in_examples": 14},
"examples": {"total": 41, "from_search_feedback": 38, "with_negative": 30, "without_negative": 11, "distinct_queries": 35, "queries_over_cap": 0},
"bounds": {"minimum_examples": 2, "minimum_independent_groups": 2, "max_examples_per_query": 16}
}
Retrain on promoted pairs
Every promoted pair carries the project tag retrieval_feedback. To train only
on them, select that tag in an embedding run.
-
Find the tag's
idin the dataset's tag list:curl "https://reopenly.com/api/v1/projects/acme/support/datasets/42/tags" \-H "Authorization: Bearer $REOPENLY_API_KEY"{"data": [{"id": 7, "name": "retrieval_feedback", "example_count": 38}]} -
Preview the run with that ID in
tag_ids. Takebase_artifact_idfromGET .../training-jobs/profiles:curl -X POST "https://reopenly.com/api/v1/projects/acme/support/training-jobs/preview" \-H "Authorization: Bearer $REOPENLY_API_KEY" \-H "Content-Type: application/json" \--data '{"dataset_id": 42, "base_artifact_id": 3, "tag_ids": [7], "max_steps": 10000}' -
Read
planned_steps_per_epochandselection.selection_sha256from the preview, then send the same body with the realmax_stepstoPOST .../training-jobs/estimate, and again withselection_sha256added toPOST .../training-jobsto start the run.
tag_ids selects the pairs that carry any of the listed tags; an empty list
selects the whole dataset. Add other tag IDs to train on promoted pairs
together with pairs you tagged yourself. The full sequence, its settings and
its costs are in Training jobs.
Reference
Limits
| Limit | Value |
|---|---|
| Results per search | 20 |
| Query text | 8 KiB (UTF-8) |
| Result text | 32 KiB (UTF-8) |
| Total text per search | 128 KiB |
| Single request body | 128 KiB |
| Batch request body | 1 MiB, at most 50 searches |
| Retained searches per dataset | 10,000 |
| Retained text per dataset | 256 MiB |
| Requests per dataset per UTC minute | 60 |
| New searches per dataset per UTC minute | 500 |
GET .../retrieval-settings returns the same limits for your dataset.
Replay, conflicts, batches and errors
event_id is the only idempotency key; there is no idempotency header and no
schema-version field in the body.
- The same
event_idwith the same content returns the stored search with200and"created": false. Key order, timezone offsets,1versus1.0and an emptymetadataobject do not count as different content; whitespace in text does. - The same
event_idwith different content is409 idempotency_conflict. - A batch is all-or-nothing for new searches: one invalid, conflicting or
over-quota item stores nothing. Exact replays may be mixed with new ones.
The response keeps input order and returns
201if anything was created,200if every item was a replay.
{
"object": "retrieval_event",
"event_id": "search-2026-09-17-000123",
"state": "unreviewed",
"revision": 1,
"received_at": "2026-09-17T14:02:16Z",
"created": true
}
Errors use one envelope and never echo your content:
{
"detail": {
"code": "retrieval_ingest_rate_limited",
"message": "Too many search-feedback requests for this dataset this minute.",
"limit": 60,
"window_seconds": 60,
"retry_after_seconds": 44
}
}
| HTTP | code |
|---|---|
| 400 | invalid_retrieval_event, invalid_cursor |
| 404 | retrieval_dataset_not_found, retrieval_event_not_found, retrieval_model_not_found |
| 409 | idempotency_conflict, revision_conflict, retrieval_feedback_label_conflict, retrieval_feedback_positive_conflict, retrieval_event_not_promotable, embedding_example_conflict, embedding_dataset_capacity_exceeded |
| 413 | retrieval_payload_too_large |
| 415 | unsupported_retrieval_media_type |
| 422 | Field validation (type, loc, msg only) |
| 429 | retrieval_ingest_rate_limited, retrieval_dataset_quota_exceeded |
Every 429 carries a Retry-After header equal to retry_after_seconds.
Retrying with the same event_id is always safe.
This is a versioned API: compatible additions evolve /api/v1; anything that
removes, renames, narrows or reinterprets a field or error needs /api/v2.
Ignore response fields you do not recognize.
Storage, privacy and cost
- Reported searches are kept until you ask for them to be erased. Nothing
expires automatically and there is no retention setting. The only bound is
the dataset's storage limit above; when it is reached, reporting answers
429 retrieval_dataset_quota_exceededrather than dropping older searches. - Promotion copies the query and the chosen positive and optional negative into training pairs. Those pairs follow the dataset and are removed when you delete them there. The reported search remains intact until you ask for it to be erased, and its promotion link records the source search and ranks.
- ReOpenly stores the query, result text and the metadata you send. It stores
no vectors, never connects to your
search_targetorsource_uri, never runs a model for search feedback, and never bills for it. - To export or erase a dataset's search feedback, write to the privacy address in the privacy policy.
Response shapes
Detail (GET .../retrieval-events/{event_id}):
{
"object": "retrieval_event",
"event_id": "search-2026-09-17-000123",
"model": "support-encoder",
"query": "How do I resume a paused fine-tune?",
"metadata": {"occurred_at": "2026-09-17T14:02:11Z", "model_revision": 1, "search_target": "support-docs-production"},
"results": [
{"rank": 1, "text": "Resume continues a run rather than replacing it.", "metadata": {"score": 0.83, "external_id": "chunk-782"}},
{"rank": 2, "text": "Cancel is available while a run is queued."}
],
"state": "promoted",
"revision": 2,
"received_at": "2026-09-17T14:02:16Z",
"decision": {"state": "promoted", "decided_at": "2026-09-17T14:05:00Z", "positive_ranks": [1], "hard_negative_rank": 2, "example_ids": [441], "available_example_ids": [441], "positive_count": 1, "has_negative": true}
}
decision is null while unreviewed and {"state":"skipped","decided_at":...}
after a skip. available_example_ids drops pairs you later deleted from the
dataset.
Settings (GET .../retrieval-settings):
{
"object": "retrieval_settings",
"revision": 1,
"workflow": {"waiting_events": 83, "promoted_events": 38, "skipped_events": 27, "training_examples_added": 38, "training_examples": 41, "retained_events": 148},
"storage": {"retained_text_bytes": 19293798, "max_retained_events": 10000, "max_retained_text_bytes": 268435456},
"ingest_limits": {"requests_per_utc_minute": 60, "events_per_utc_minute": 500, "events_per_batch": 50, "results_per_event": 20}
}
Every field and response is in the API reference under Search feedback, and in the downloadable OpenAPI document.