# Inference API Response

## Output Format

### Sentiment JSON

The API responds with a JSON object containing an `output` field. This field is an array of arrays, where each sub-array contains a single element representing the prediction score from the model. This score is a floating-point number reflecting the model's confidence for the input provided.

Example of the output format:

```json
{
  "output": [
    [[0.9998]],
    [[0.9999]],
    [[0.9922]],
    [[0.0013]],
    // Additional scores for more entries
  ]
}
```

Each score is deeply nested within two arrays to maintain compatibility with batch processing systems that may require this format.

#### Interpretation of Output

* A score close to `1` indicates a high confidence level in the prediction.
* A score close to `0` indicates a low confidence level in the prediction.
* The sequence of scores corresponds to the order of the input entries.

### Traits JSON

If the decides to send you their Personality Traits, there will be the following JSON present API responds with a JSON object. This is an object containing positive\_traits and traits\_to\_improve. The assicautated score is the level of each trait

Example of the output format:

```json
{
  "Traits": {
    "positive_traits": {
      "trait1": 9.7,
      "trait2": 9.6,
      "trait3": 9.1,
      "trait4": 8.8,
    ],
    "traits_to_improve": {
      "trait1": 1.7,
      "trait2": 3.6,
    ]
  ]
}
```

#### Interpretation of Output

* positive\_traits: Strong character defining Traits of the user. Levels 0-10 (1 dp)
* traits\_to\_improve:  Traits of the user which they are improving/need to improve. Levels 0-10 (1 dp)
