Review workflow
The human-in-the-loop for learning_review mode: synthesized answers are queued, and a
moderator decides what enters the knowledge base.
Audience: moderators and operators curating the KB. What you will accomplish: list pending entries and approve or reject them.
How two-phase ingest works
In learning_review mode, when a request fills a knowledge gap (no documents matched) and
the answer is ≥50 characters, the synthesized answer is queued in Redis instead of
being embedded. It only becomes retrievable once a moderator approves it — at which
point it is embedded into the synthesized_answers collection. Rejecting discards it.
This keeps unverified model output out of the vector store until a human signs off. See Chat modes for the mode itself.
Step 1: List pending entries
Call
GET /api/v1/review/pendingto see queued synthesized answers (question, answer, score, timestamp), paginated bylimit/cursor.Step 2: Approve to embed
POST /api/v1/review/{entry_id}/approveembeds the answer intosynthesized_answers, making it retrievable in learning modes.Step 3: Reject to discard
POST /api/v1/review/{entry_id}/rejectdiscards the entry without embedding it.
List pending
curl "http://127.0.0.1:8000/api/v1/review/pending?limit=50&cursor=0"If it fails: A 401 means the server runs with REQUIRE_AUTH_FOR_INGEST=true — add -H "X-API-Key: ...".
A response looks like:
{
"total": 2,
"pending": [
{
"entry_id": "synthesized:1a2b3c4d5e6f",
"question": "Do you ship to Portugal?",
"answer": "Yes, standard delivery to Portugal takes 3–5 business days...",
"best_score": 0.12,
"created_at": "2026-06-01T10:00:00Z"
}
],
"next_cursor": null
}Approve / reject
# Approve → embeds into the synthesized_answers collection
curl -X POST http://127.0.0.1:8000/api/v1/review/synthesized:1a2b3c4d5e6f/approve
# Reject → discards without embedding
curl -X POST http://127.0.0.1:8000/api/v1/review/synthesized:1a2b3c4d5e6f/rejectIf it fails: Add -H "X-API-Key: ..." when the server requires auth for ingest/review.
The web reviewer panel
The reference web client exposes this flow without curl: the header Review toggle (or
the #/review hash route) opens an operator panel over the queue. It lists pending entries
with Approve and Reject buttons, removes resolved entries optimistically, and uses
next_cursor for a Load more affordance. Its API key field stores the operator key
in the browser and sends it as X-API-Key. See Web client.
Verify your result
- Verify: You can list the pending queue and read each entry's question/answer/score.
- Verify: Approving makes the synthesized answer retrievable in learning modes.
- Verify: Rejecting removes the entry without embedding it.
- Verify: When the server requires auth, you send a valid
X-API-Key.
Common failure modes
Related next steps
- Understand the mode behind this in Chat modes.
- Drive it from the UI in Web client.
- See all endpoints in the API summary.