Skip to content
Rodrigo Kumpera edited this page Jul 29, 2021 · 3 revisions

The DJSON format is geared towards expressing Contextual Bandits problems (CB, CCB and Slates currently).

All elements at the top level are problem specific properties. In particular:

Version - must be the string 1 and indicates the version of the format to use. c - container of all examples.

Inside c, there are a few special fields that you can define: _multi - an array of examples with one per action. _slots - an array of example with one per slot, to be used with problems that requires those such as CCB and Slates. All other fields within "c" are considered part of the shared example.

Features are JSON strings, integer, float, boolean, arrays of integers and/or floats. Namespaces are defined using objects where the namespace is the field name.

The timestamp field Timestamp should follow the following format: year-month-dayThh:mm:ss.ssssZ. For example: 2021-07-29T10:00:00.999Z Most produces will trim timestamps on the second, leading to milliseconds always being zero.

Example of CB payload:

{
    "Timestamp": "1999-10-10T13:20:20.500Z",
    "Version": "1",
    "c": {
        "TShared": {
            "a": 1,
            "b": "x"
        },
        "c": 10,
        "_multi": [
            {
                "TAction": {
                    "value=0.000000": 1
                }
            },
            {
                "TAction": {
                    "value=1.000000": 1
                }
            },
        ],
    },
    "VWState": {
        "m": "N/A"
    }
}
Clone this wiki locally