| name | course-rag |
| description | Query the Software Engineering Economics course RAG service. Requires two arguments - token and question. |
Course RAG Skill
Query the Software Engineering Economics course RAG service.
Required Arguments
This skill requires two arguments:
- token - The user's RAG access token (starts with
cr_)
- question - The course question to query
Usage:
/course-rag token=cr_xxxxx What is software cost estimation?
If token or question is missing, prompt the user to provide both. Do not guess or fabricate.
Service URL
Configured via environment variable COURSE_RAG_BASE_URL, default: http://24.233.15.7:9000.
Workflow
- Parse
token and question from arguments.
- If either is missing, ask the user to provide it.
- Connect to the RAG service:
curl -sS -X POST "$COURSE_RAG_BASE_URL/api/auth/connect" \
-H 'Content-Type: application/json' \
-d "{\"token\":\"$TOKEN\"}"
- If response contains
TOKEN_ALREADY_CONNECTED, tell the user the token is already connected and ask them to disconnect elsewhere or provide another token.
- Save the returned
session_id.
- Call the ask API:
curl -sS -X POST "$COURSE_RAG_BASE_URL/api/ask" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $TOKEN" \
-H "X-Session-Id: $SESSION_ID" \
-d "{\"question\":\"$QUESTION\",\"top_k\":6}"
- Disconnect after the query:
curl -sS -X POST "$COURSE_RAG_BASE_URL/api/auth/disconnect" \
-H "Authorization: Bearer $TOKEN" \
-H "X-Session-Id: $SESSION_ID" >/dev/null
Response Style
- Answer in the user's language (default Chinese).
- Base the answer on the returned
answer and sources fields.
- Include a concise "Sources" section listing the most relevant source titles and filenames.
- If the RAG service returns insufficient information, say that the course materials do not contain enough evidence.
- Do not claim information comes from the course unless it appears in the returned RAG result.