# Zeabur RAG Inspect

> View a single chunk's full content plus related reports, search signals, and edit history. Use before editing, when investigating why a result appeared, or when reviewing a reported issue. Requires admin scope.

- Skill: `zeabur/zeabur-rag-inspect` (Agent Skill)
- Install (CLI): `npx skillmds@latest add zeabur/zeabur-rag-inspect`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zeabur/zeabur-rag-inspect/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: zeabur (https://skillmd.com/u/zeabur)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zeabur/zeabur-rag-inspect

---


# 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

```bash
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

```json
{
  "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, because `zeabur-rag-edit` requires you to provide updated `text_content` whenever you change `title`/`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 (via `feedback_score`).
- **`audit_log`** — edit history. Check this to see who changed what and when.

## Common workflows

1. **Before editing:** inspect → read `text_content` → construct updated `text_content` in the same format → call `zeabur-rag-edit`.
2. **Investigating a report:** inspect the reported chunk → check if the report is valid → decide to edit, reject, or close the report.
3. **Understanding search behavior:** inspect a chunk that keeps appearing in irrelevant queries → check `signals` to see which queries surface it → consider editing `text_content` to improve relevance.

## Error

Returns `404` with `{"error": "Chunk not found"}` if the ID doesn't exist.

