task_categories:text-generation language:en license:cc-by-nc-4.0 instruction-finetuning arxiv:2303.17760 region:us
---
license: cc-by-nc-4.0
language:
- en
tags:
- instruction-finetuning
pretty_name: CAMEL Code
task_categories:
- text-generation
arxiv: 2303.17760
extra_gated_prompt: "By using this data, you acknowledge and agree to utilize it solely for research purposes, recognizing that the dataset may contain inaccuracies due to its artificial generation through ChatGPT."
extra_gated_fields:
 Name: text
 Email: text
I will adhere to the terms and conditions of this dataset: checkbox
---

# **CAMEL: Communicative Agents for “Mind” Exploration of Large Scale Language Model Society**
- **Github:** https://github.com/lightaime/camel
- **Website:** https://www.camel-ai.org/
- **Arxiv Paper:** https://arxiv.org/abs/2303.17760

## Dataset Summary

Code dataset is composed of 50K conversations between two gpt-3.5-turbo agents. This dataset is simulating a programmer specialized in a particular language with another person from a particular domain. We cover up 20 programming languages and 50 domains with a total of 50 tasks per combination of language and domain.

We provide two formats, one is "chat" format which is `code_chat.tar.gz` file containing the conversational instruction following format. The other format is "instruction" format which is `code_instructions.json`.



## Data Fields

**The data fields for instructions format (`code_instructions.json`) are as follows:**

* `id`: {assistant\_role\_index}\_{user\_role\_index}\_{task\_index}, for example 001_002_003 refers to assistant role 1, user role 2, and task 3 from our text assistant role names, user role names and task text files.
* `role_1`: assistant role
* `role_2`: user role
* `original_task`: the general assigned task for the assistant and user to cooperate on.
* `specified_task`: the task after task specifier, this task is more specific than the original task.
* `role_1_response`: user response text before the instruction.
* `role_1_message_id`: message ID in the full raw conversation.
* `instruction`: describes the task the assistant is supposed to perform. 
* `input`: provides further context or information for the requested instruction.
* `output`: the answer to the instruction as generated by 'gpt-3.5-turbo'
* `termination_reason`: refers to the reason of termination of the chat.

**The data fields for chat format (`code_chat.tar.gz`) are as follows:**

* `input`: {assistant\_role\_index}\_{user\_role\_index}\_{task\_index}, for example 001_002_003 refers to assistant role 1, user role 2, and task 3 from our text assistant role names, user role names and task text files.
* `role_1`: assistant role
* `role_2`: user role
* `original_task`: the general assigned task for the assistant and user to cooperate on.
* `specified_task`: the task after task specifier, this task is more specific than the original task.
* `message_k`: refers to the k<sup>_th_</sup> message of the conversation.
  *  `role_type`: refers to whether the agent is an assistant or a user.
  *  `role_name`: refers to the assigned assistant/user role.
  *  `role`: refers to the role of the agent during the message for openai api. [usually not needed]
  *  `content`: refers to the content of the message.
* `termination_reason`: refers to the reason of termination of the chat.
* `num_messages`: refers to the total number of messages in the chat.

**Download in python**
```
from huggingface_hub import hf_hub_download
hf_hub_download(repo_id="camel-ai/code", repo_type="dataset", filename="code_chat.tar.gz",
                local_dir="datasets/", local_dir_use_symlinks=False)
```

### Citation

```
@misc{li2023camel,
      title={CAMEL: Communicative Agents for "Mind" Exploration of Large Scale Language Model Society}, 
      author={Guohao Li and Hasan Abed Al Kader Hammoud and Hani Itani and Dmitrii Khizbullin and Bernard Ghanem},
      year={2023},
      eprint={2303.17760},
      archivePrefix={arXiv},
      primaryClass={cs.AI}
}
```

## Disclaimer:

This data was synthetically generated by gpt-3.5-turbo and might contain incorrect information. The dataset is there only for research purposes.

---
license: cc-by-nc-4.0
---