agentsclimarketplace

Zeabur rag edit

Skill zeabur/rag-service/skills/zeabur-rag-edit

Edit the content of an existing chunk in the RAG knowledge base. Use when a chunk has a typo, outdated info, wrong tags or status, or needs its title/question/answer rewritten. Requires admin scope. Prefer zeabur-rag-report for surfacing issues without write access.From its SKILL.md

Install
npx -y skills add zeabur/rag-service --skill zeabur-rag-edit

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.4 KB, as published. Nobody here has run it

RAG — Edit

Update the content of an existing chunk in place. Embedding is recomputed automatically when the searchable text changes, and the BM25 cache is cleared so the change is live on the next query.

Base URL: $ZEABUR_RAG_URL Auth: Authorization: Bearer $RAG_API_KEY — admin scope required

When to use

SituationUse this skill
Fixing a typo or stale fact in an existing chunk✅
Adjusting tags, source URL, or lifecycle status✅
Rewriting the answer because the procedure changed✅
You don't have admin scope❌ Use zeabur-rag-report instead
The knowledge doesn't exist yet❌ Use zeabur-rag-learn instead

API

PATCH /api/admin/chunks/:id — pass any subset of editable fields.

curl -s -X PATCH "$ZEABUR_RAG_URL/api/admin/chunks/<chunk_id>" \
  -H "Authorization: Bearer $RAG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated title",
    "answer": "Corrected content",
    "text_content": "Updated title\nCorrected content"
  }'
FieldTypeNotes
titlestringDisplay title
questionstringOptional question form
answerstringMain body
tagsstring[]Replaces the existing tag array
urlstringSource URL
text_contentstringThe text that gets embedded and BM25-indexed
status"unverified" | "verified" | "rejected"Lifecycle state

Critical rule — keep the embedding in sync

If you update any of title / question / answer, you MUST also pass a new text_content. The server enforces this and returns 400 otherwise. The reason: embedding and BM25 index are built from text_content, not from the display fields — letting them drift apart silently corrupts search quality.

Construct text_content using the same format as the adapter that produced the chunk. When in doubt, read the existing text_content first, then rewrite it in the same shape.

Edits that don't need text_content

Pure metadata changes — tags, url, status — don't touch the embedding, so text_content is not required:

curl -s -X PATCH "$ZEABUR_RAG_URL/api/admin/chunks/DOC-example" \
  -H "Authorization: Bearer $RAG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tags": ["deployment"], "status": "verified"}'

Workflow

  1. Find the chunk — search via zeabur-rag-search or GET /api/admin/chunks?search=... to get its ID and current contents.
  2. Read it — GET /api/admin/chunks/:id returns the full record including text_content. Confirm you're editing what you think you're editing.
  3. PATCH — send only the fields you want to change. Include text_content if any of title/question/answer are in the patch.
  4. Verify — re-search to confirm the new content surfaces.

Response

{
  "success": true,
  "id": "DOC-example",
  "updated_fields": ["title", "answer", "text_content"],
  "embedding_updated": true
}

embedding_updated: true means the chunk was re-embedded. Every edit is logged to rag_audit_log with action edit and a diff of old vs new values, and the BM25 cache is cleared so the next query sees the change.

Errors

StatusCause
400Updated title/question/answer without providing text_content, or invalid status/tags
401 / 403Missing/invalid key, or key lacks admin scope
404Chunk ID does not exist
500DB or embedding service error — safe to retry

Guidelines

  • One coherent edit at a time. Don't rewrite three unrelated chunks in one batch — each edit should be auditable.
  • Don't paraphrase for style. Edit only when the content is wrong, stale, or unclear. Cosmetic rewrites churn the embedding for no quality gain.
  • Verified chunks should stay accurate. If you're unsure whether your fix is correct, file a zeabur-rag-report instead of patching.
  • Source access is controlled by API-key source permissions. Do not encode access policy inside chunk text or tags.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.