This skill enables grounded question answering using Ragie.ai as a RAG backend.
Ragie handles:
The agent handles:
document_name when referencing specific facts.> "I don't have that information in the current knowledge base."
IF the user provides:
THEN:
```bash
python skills/scripts/ingest.py --file
```
OR
```bash
python skills/scripts/ingest.py --url "
```
document_id.```bash
python skills/scripts/manage.py status --id
```
Repeat until status == ready.
python `skills/scripts/manage.py` list
python `skills/scripts/manage.py` status --id <document_id>
python `skills/scripts/manage.py` delete --id <document_id>
Return structured results to the user.
Execute:
python `skills/scripts/retrieve.py` \
--query "<user_question>" \
--top-k 6 \
--rerank
Optional flags:
--partition --filter '{"key":"value"}'Expected output:
[
{
"text": "...",
"score": 0.87,
"document_name": "Policy Handbook",
"document_id": "doc_abc123"
}
]
After retrieval:
text.SYSTEM:
You are a helpful assistant.
Answer using ONLY the context provided below.
If the context does not contain the answer, say:
"I don't have that information in the current knowledge base."
CONTEXT:
[chunk 1 text]
---
[chunk 2 text]
---
...
USER QUESTION:
{original user question}
document_name when referencing information.The final response MUST:
document_name for factual claimsIf no chunks are returned:
I don't have that information in the current knowledge base.
Base URL:
https://api.ragie.ai
| Operation | Method | Endpoint |
|---|---|---|
| -------------------- | -------- | -------------------------- |
| Ingest file | POST | /documents |
| Ingest URL | POST | /documents/url |
| Retrieve chunks | POST | /retrievals |
| List documents | GET | /documents |
| Get document | GET | /documents/{id} |
| Delete document | DELETE | /documents/{id} |
| HTTP Code | Meaning | Action |
|---|---|---|
| ----------- | ------------------------ | ---------------------------------- |
| 404 | Document not found | Verify document_id |
| 422 | Invalid payload | Validate request schema |
| 429 | Rate limited | Retry with backoff |
| 5xx | Server error | Retry or check Ragie status |
If ingestion fails:
If retrieval fails:
filter to narrow retrieval scope.recency_bias only when time relevance matters.top_k depending on query complexity..env must not be committed.This skill provides:
End of Skill.
共 1 个版本