RAG — Inspect
Get the full picture of a single knowledge base chunk: its content, related reports, search signals that surfaced it, and audit history.
Base URL: $ZEABUR_RAG_URL
Auth: Authorization: Bearer $RAG_API_KEY — admin scope required
API
curl -s "$ZEABUR_RAG_URL/api/admin/chunks/<chunk_id>" \
-H "Authorization: Bearer $RAG_API_KEY"
Input: Chunk ID (e.g. DOC-example, LEARNED-1712345678-abc123).
Response
{
"chunk": {
"id": "DOC-example",
"title": "...",
"question": "...",
"answer": "...",
"text_content": "...",
"tags": ["..."],
"source": "docs",
"verified": true,
"status": "verified",
"parent_id": null,
"created_at": "...",
"url": "..."
},
"reports": [
{ "id": "...", "type": "outdated", "query": "...", "detail": "...", "status": "open", "created_at": "..." }
],
"signals": [
{ "id": "...", "query": "...", "mode": "hybrid", "top_similarity": 0.012, "feedback_score": null, "created_at": "..." }
],
"audit_log": [
{ "id": "...", "chunk_id": "DOC-example", "action": "edit", "old_value": {}, "new_value": {}, "created_at": "..." }
]
}
Key fields
text_content— the text used for embedding and BM25 index. You MUST read this before editing a chunk, becausezeabur-rag-editrequires you to provide updatedtext_contentwhenever you changetitle/question/answer.reports— any open or closed reports pointing to this chunk. If there's an open report, it may need action.signals— recent queries that surfaced this chunk in search results. Shows how the chunk is being found and whether users found it helpful (viafeedback_score).audit_log— edit history. Check this to see who changed what and when.
Common workflows
- Before editing: inspect → read
text_content→ construct updatedtext_contentin the same format → callzeabur-rag-edit. - Investigating a report: inspect the reported chunk → check if the report is valid → decide to edit, reject, or close the report.
- Understanding search behavior: inspect a chunk that keeps appearing in irrelevant queries → check
signalsto see which queries surface it → consider editingtext_contentto improve relevance.
Error
Returns 404 with {"error": "Chunk not found"} if the ID doesn't exist.