RAG Learn
Add new knowledge to the knowledge base. The chunk is immediately searchable but marked as unverified until manually reviewed in the admin dashboard.
Base URL: $ZEABUR_RAG_URL
Auth: Authorization: Bearer $RAG_API_KEY
API
curl -s -X POST "$ZEABUR_RAG_URL/api/learn" \
-H "Authorization: Bearer $RAG_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Short descriptive title",
"content": "The knowledge content in Markdown",
"tags": ["relevant", "tags"],
"source_query": "original user query"
}'
| Field | Required | Description |
|---|---|---|
title |
Yes | Short descriptive title |
content |
Yes | Knowledge content (Markdown supported) |
tags |
No | Array of tag strings for categorization |
source_query |
No | Original user query that prompted this knowledge |
Returns { "id": "LEARNED-...", "ids": ["LEARNED-...-0", ...], "chunk_count": N, "status": "indexed", "verified": false }.
Long content is split into multiple chunks automatically; ids[0] is the first (parent) chunk, subsequent chunks link back via parent_id. id matches ids[0] for backward compatibility.
Guidelines
Only contribute knowledge that is:
- Verified correct — not a guess or workaround
- General enough — useful to future users, not just this one case
- Not already covered — search first to avoid duplicates