# Data Format for finetuning Llama2 to extract json

**URL:** <https://discuss.huggingface.co/t/data-format-for-finetuning-llama2-to-extract-json/59551>\
**Category:** Amazon SageMaker\
**Created:** [October 23, 2023, 11:44am UTC](https://discuss.huggingface.co/t/data-format-for-finetuning-llama2-to-extract-json/59551 "2023-10-23T11:44:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![seinfeld](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@seinfeld](https://discuss.huggingface.co/u/seinfeld)\
**Post date:** [October 23, 2023, 11:44am UTC](https://discuss.huggingface.co/t/data-format-for-finetuning-llama2-to-extract-json/59551/1 "2023-10-23T11:44:01Z")

</div>

I am trying to finetune Llama 7b on a custom dataset. But I am still confused about the data format for my use case. I want to extract information to json with given keys, which I am providing at the beginning.  
The Jumpstart tutorial and the [Fine-tune LLaMA 2 (7-70B) on Amazon SageMaker](https://www.philschmid.de/sagemaker-llama2-qlora) tutorial give the data format of the form:

```auto
{"instruction": "","context": "", "response": ""}

```

The response in my case would be the extracted json.  
But where do i give it the sentence to extract the information from, and where to give the json format it should follow and tell it to extract text from this.
