{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreianztcuu4xgc4t5jldt6m5xhpaukqt2lrioam5nyfigs7xxpfsj24",
    "uri": "at://did:plc:pgryn3ephfd2xgft23qokfzt/app.bsky.feed.post/3mp3fbtzlzoc2"
  },
  "path": "/t/what-prompt-format-template-should-i-use-for-training-unsloth-phi-3-5-mini-instruct/177144#post_1",
  "publishedAt": "2026-06-25T01:04:28.000Z",
  "site": "https://discuss.huggingface.co",
  "textContent": "Hi, I need some help figuring out the best way to format my prompts for my dataset based on the model I’m training, and I’d appreciate some advice. Should I keep it as it is, or use a chat template? Which approach should I use, and how should I format my prompts? I’m planning to run the model using an API I’ll code. Below I have attached my current format prompt that I am using to train my Unsloth/Phi-3.5-mini-instruct Model.\n\n\n    Example of my current format prompt\n    ```\n    from datasets import Dataset\n\n    def format_prompt(example):\n        return f\"### Input: {json.dumps(example['input'], ensure_ascii=False)}\\n### Output: {json.dumps(example['output'], ensure_ascii=False)}<|endoftext|>\"\n\n    formatted_data = [format_prompt(item) for item in file]\n    dataset = Dataset.from_dict({\"text\": formatted_data})\n    ```\n    Example of my dataset input and output\n    ```\n    {\n        \"input\": {\n          \"insight_period\": \"7-Days\",\n          \"receipts\": [\n            {\n              \"merchantName\": \"Lane7\",\n              \"date\": \"2026-06-08\",\n              \"total\": 21.02,\n              \"currency\": \"£\"\n            },\n            {\n              \"merchantName\": \"LVLS\",\n              \"date\": \"2026-06-07\",\n              \"total\": 53.78,\n              \"currency\": \"£\"\n            }\n          ]\n        },\n        \"output\": {\n          \"insights\": [\n            {\n              \"title\": \"Balanced Spending\",\n              \"description\": \"You spent £74.80, which falls within a reasonable range. The majority of your spending came from Entertainment. There is a consistent pattern in your recent transactions.\"\n            },\n            {\n              \"title\": \"Spending Pattern\",\n              \"description\": \"You made 2 transactions during this period.\"\n            },\n            {\n              \"title\": \"Category Insight\",\n              \"description\": \"Your highest spending category was Entertainment.\"\n            }\n          ],\n          \"category\": \"Entertainment\"\n        }\n      }\n    ```\n",
  "title": "What prompt format/template should I use for training Unsloth/Phi-3.5-mini-instruct?"
}