task_categories:text-generation language:en license:mit size_categories:1K<n<10K format:json modality:text library:datasets library:pandas library:mlcroissant library:polars region:us
---
license: mit
task_categories:
- text-generation
language:
- en
pretty_name: TaleFrame
size_categories:
- 1K<n<10K
---
# TinyStories Dataset README

## Overview

This dataset is based on TinyStories and includes structured JSON data with corresponding annotations, designed for research in controllable story generation and related tasks.

## Dataset Structure

Each data item contains the following fields:

### 1. `conversations`

- **Type**: List
- **Purpose**: Contains the JSON of the story
  - **`from`**: Always set to  `"human"`.
  - **`value`**: Structured data containing entities, events, story structures and relationships described in JSON format.

### 2. `chosen`

- **Type**: Object
- **Purpose**: Contains the final selected story.
  - **`from`**: Always set to `"gpt"`.
  - **`value`**: The accepted story text.

### 3. `rejected`

- **Type**: Object
- **Purpose**: Contains a rejected version of the story.
  - **`from`**: Always set to `"gpt"`.
  - **`value`**: The rejected story text.

## Structure of `value` Field

## Units Attributes Definition

### Entity

| Attribute           | Definition                                                             | Nullability |
|---------------------|-------------------------------------------------------------------------|-------------|
| `entity_id`         | A unique identifier for the entity, e.g., "entity_1".                  | required    |
| `entity_name`       | The name of the entity.                                                 | required    |
| `entity_identity`   | The identity of the entity.                                             | required    |
| `entity_motivation` | The motivation or goal of the entity.                                   | required    |
| `personality_traits`| The list of personality traits of the entity.                           | required    |

### Event

| Attribute           | Definition                                                             | Nullability |
|---------------------|-------------------------------------------------------------------------|-------------|
| `event_id`          | A unique identifier of the event, e.g., "event_1".                      | required    |
| `event_time`        | Time the event occurs.                                                  | nullable    |
| `event_location`    | Location where the event happens.                                       | nullable    |
| `event_details`     | A brief description for the event.                                      | required    |
| `event_importance`  | Importance of the event (three levels: low, medium, high).              | required    |
| `earlier_event`     | List of preceding events that caused this event, using event IDs.       | required    |
| `later_event`       | List of subsequent events resulting from this event, using event IDs.   | required    |

### Relationship

| Attribute               | Definition                                                                 | Nullability |
|-------------------------|---------------------------------------------------------------------------|-------------|
| `relationship_id`       | A unique identifier for the relationship, e.g., "rel_1".                  | required    |
| `included_entities`     | The list of entities involved in the relationship, referenced by their entity IDs. | required |
| `emotional_type`        | The emotional category between the two entities in the relationship.       | required    |
| `action_type`           | The type of behavior exhibited between the entities in the relationship.   | required    |
| `action_direction`      | The direction of the action/behavior within the relationship. "Internal", "bidirectional", "from AGENT to PATIENT". | required    |
| `relationship_strength` | The strength of the relationship, categorized as "low", "medium", or "high". | required |
| `relationship_evolution`| Description of how the relationship evolves over time, such as gradually building trust. | required |

### Story

| Attribute             | Definition                                                             | Nullability |
|-----------------------|-------------------------------------------------------------------------|-------------|
| `title`               | The title of the story.                                                 | required    |
| `story_description`   | A brief description of the story.                                        | required    |
| `story_structure`     | The structure of the story, including "beginning", "middle", "climax", and "ending". | required |
| `beginning`           | List of event IDs that occur at the beginning of the story.              | required    |
| `middle`              | List of event IDs that occur in the middle of the story.                 | required    |
| `climax`              | List of event IDs that represent the climax of the story.               | required    |
| `ending`              | List of event IDs that occur at the ending of the story.                 | required    |

## Nullability

- **Required fields**: Must contain a valid value.
- **Nullable fields**: Can be left empty.

## Dataset Statistical Features

### Entities

- **Total entities**: 24,154
- **Unique entity names**: 4,560
- **Total entity traits**: 4,770
- **Entity trait distribution**:
  - Negative
  - Neutral
  - Positive

### Stories

- **Total stories**: 9,851
- **Emotional distribution**:
  - Negative: 1,243
  - Neutral: 2,433
  - Positive: 17,727

### Events

- **Total events**: 68,553
- **Emotional distribution**:
  - Negative: 9,226
  - Neutral: 2,213
  - Positive: 12,715

### Relationships

- **Total relationships**: 69,481
- **Emotional distribution**:
  - Negative: 12,213
  - Neutral: 15,458
  - Positive: 40,882

## Annotations

Stories are evaluated using models like GPT-4 and annotated as "Chosen" or "Rejected" based on quality.