# Prompt Template Design For Semi-Structured Data Inputs

**URL:** <https://community.deeplearning.ai/t/prompt-template-design-for-semi-structured-data-inputs/432793>\
**Category:** Finetuning Large Language Models\
**Created:** [August 31, 2023, 2:37am UTC](https://community.deeplearning.ai/t/prompt-template-design-for-semi-structured-data-inputs/432793 "2023-08-31T02:37:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![samj13](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@samj13](https://community.deeplearning.ai/u/samj13)\
**Post date:** [August 31, 2023, 2:37am UTC](https://community.deeplearning.ai/t/prompt-template-design-for-semi-structured-data-inputs/432793/1 "2023-08-31T02:37:25Z")

</div>

First, thanks for the great course! I have a use case where I am trying to include some semi-structured key value data from a data store as part of a prompt, which might look something like this, where the {context} variable has retrieved key value data:

```auto
### Instruction:
{instruction}

### Context:
{context}

### Response:
{response}

```

This {context} data might look something like:

```auto
{
  "age": 24,
  "color": "blue",
  "ready": false
}

```

My question is, what is the best way to include semi-structured key value data in an input into a fine-tuned LLM? If a base model is fine tuned to expect JSON as input, will that perform well? Does XML work better? I know RAG patterns might retrieve sections of documents as free text, but the data I am looking to include naturally has structure.

An experience or tips would be greatly appreciated!
