AgentSkillsCN

RenderDA

使用 Sarvam AI 的 Sarvam-M 模型生成聊天补全。适用于用户需要以印度语言进行 AI 聊天、文本生成、问答,或推理时使用。Sarvam-M 是一款拥有 240 亿参数的模型,兼具混合思维、卓越的印地语理解能力,且兼容 OpenAI 的 API。免费使用。

SKILL.md
--- frontmatter
name: RenderDA
description: Convert dialog-acts JSON into one natural utterance that follows style, language, and repetition rules.

RenderDA

Purpose

Convert dialog acts into a single, natural utterance that fits the conversation context.

When to use

  • You receive a JSON input with dialog acts and must generate a single utterance.
  • You must respect a provided style, language, and prior system utterance.

Input format

You will receive a JSON object with five top-level fields:

  • dialog_acts: array of dialog act objects, each with:
    • type: dialog act type (use one of the supported types listed below, e.g., "SlotRequest", "SlotInform", "FrameOffer", "RawInform")
    • type-dependent fields directly on the dialog act object (for example slotName, slotType, frameType, target, value, failType, msg)
    • context: task context (e.g., "table_reservation", "train_booking", "hotel_booking", "customer_support")
  • style: speaking style (e.g., "formal", "casual", "friendly", "professional", "helpful", "polite")
  • language: target language (e.g., "English", "Spanish", "French")
  • last_utterance: previous system utterance (empty string if first turn)
  • history: recent conversation history, can be useful.

context may be a single string or a list of frame names depending on upstream serialization; handle both.

We will support the following dialog acts, along with instruction on how to render them using each type's fields:

  • SlotRequest: Ask the user to provide a value defined by slotName, slotType, and context.
  • SlotNotify: Notify the user about the value defined by slotName, slotType, and context without asking a question.
  • SlotRequestMore: Ask the user to provide additional values defined by slotName, slotType, and context.
  • SlotNotifyFailure: Tell the user the value defined by slotName, slotType, context, and failType.
  • SlotConfirm: Ask the user to confirm the value defined by slotName, slotType, and context.
  • SlotInform: Inform the user about the value defined by slotName, slotType, and context.
  • SlotOffer: Offer options defined by slotName, slotType, and context. Ask the user to choose one.
  • SlotOfferSepInform: Offer a single option defined by slotName, slotType, and context and ask if it works.
  • SlotOfferZepInform: Inform the user there are no available options defined by slotName, slotType, and context.
  • SlotOfferOutlier: Notify the user that the value is unusual for slotName, slotType, and context and ask for confirmation or an alternative.
  • FrameConfirm: Ask the user to confirm the value for frameType.
  • FrameInform: Inform the user about frameType.
  • FrameOffer: Offer options for frameType. Ask the user to choose one.
  • FrameOfferSepInform: Offer a single option for frameType and ask if it works.
  • FrameOfferZepInform: Inform the user there are no available options for frameType.
  • FrameOfferOutlier: Notify the user that the value is unusual for frameType and ask for confirmation or an alternative.
  • UserDefinedInform: Inform the user about frameType.
  • SlotOfferSepInformConfirm: Offer a value defined by slotName, slotType, and context and explicitly ask for confirmation.
  • RawInform: Use the already-provided raw content as the response without rewriting.
  • ForwardDialogAct: Return the provided message.
  • AskRequestForDelayDialogAct: Return the provided message.
  • FillRequestForDelayDialogAct: Return the provided message.
  • ResponseRequestForDelayDialogAct: Return the provided message.
  • DumbDialogAct: Return an empty response.

Output format

Return a single JSON object containing:

  • reason: brief explanation of generation choices
  • utterance: one natural language string expressing all dialog acts

Instructions

  1. Generate ONE smooth, natural utterance that expresses ALL dialog acts.
  2. Merge all dialog acts into a single flowing utterance (one or more short sentences).
  3. Render all key-value pairs from all dialog act fields into natural language naturally.
  4. For passthrough acts (RawInform, ForwardDialogAct, AskRequestForDelayDialogAct, FillRequestForDelayDialogAct, ResponseRequestForDelayDialogAct), use the provided message content directly.
  5. If DumbDialogAct is the only act, return an empty utterance string.
  6. Use language and terminology that fits each dialog act's context.
  7. Match the specified style consistently.
  8. Use the specified language correctly.
  9. If last_utterance is non-empty, avoid exact repetition:
    • Rephrase using different words.
    • Add phrases like "as I mentioned" or "like I said".
    • Show patience if information has been repeated multiple times.
  10. Keep responses concise and natural.
  11. For unknown dialog act types, infer intent from available fields and produce the best possible natural rendering without failing.
  12. Output ONLY valid JSON, nothing else.
  13. Be consistent with the history.

Examples

Input:

json
{
  "dialog_acts": [
    { "type": "FrameInform", "frameType": "table_reservation", "context": "table_reservation" },
    { "type": "SlotRequest", "slotName": "number_of_guests", "slotType": "kotlin.Int", "context": "table_reservation" }
  ],
  "style": "friendly",
  "language": "English",
  "last_utterance": "",
  "history": []
}

Output:

json
{
  "reason": "Combined frame setup with a slot request in a friendly tone",
  "utterance": "Great, let's book your table. How many guests will be joining you?"
}