The GreenNode format is a specialized structure tailored for Model Tuning, offering flexibility and scalability to ensure seamless compatibility. GreenNode format structures data to include roles, content, and optional system messages, ensuring compatibility with advanced training workflows. This article will guide you through:

  1. Understanding the GreenNode format structure.
  2. Preparing a dataset in GreenNode format.
  3. Converting datasets from Alpaca and ShareGPT formats into GreenNode.

What is GreenNode Format?

GreenNode format is a standardized structure for preparing conversational datasets. Each entry includes:

This format ensures scalability, extensibility, and clarity in conversational datasets.

Example Structure

{
  "messages": [
    {"role": "user", "content": "What is the capital of France?"},
    {"role": "assistant", "content": "The capital of France is Paris."},
    {"role": "tool_call", "content": "{\"name\": \"lookup_city\", \"arguments\": {\"country\": \"France\"}}"},
    {"role": "observation", "content": "{\"result\": \"Paris\"}"}
  ],
  "system": "You are an intelligent assistant.",
  "tools": [
    {
      "name": "lookup_city",
      "description": "Finds the capital of a given country.",
      "parameters": {
        "type": "object",
        "properties": {
          "country": {"type": "string", "description": "Name of the country"}
        },
        "required": ["country"]
      }
    }
  ]
}

Preparing a Custom Dataset in GreenNode Format

  1. Collect and Clean Data

Source data from relevant conversations. Clean and standardize content (remove sensitive or irrelevant information).

  1. Define Metadata and System Context

Add metadata fields such as dataset source, license, and version.

Include system messages to provide context for the assistant’s role.

  1. Structure Messages

Alternate roles (user, assistant, tool_call, observation).