{"slug": "what-prompt-format-template-should-i-use-for-training-unsloth-phi-3-5-mini", "title": "What prompt format/template should I use for training Unsloth/Phi-3.5-mini-instruct?", "summary": "A developer is seeking advice on the optimal prompt format for training the Unsloth/Phi-3.5-mini-instruct model, currently using a custom template with JSON input and output fields. The choice of format may impact model performance for API deployment.", "body_md": "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``` python\nExample of my current format prompt\n```\nfrom datasets import Dataset\n\ndef 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\nformatted_data = [format_prompt(item) for item in file]\ndataset = Dataset.from_dict({\"text\": formatted_data})\n```\nExample 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", "url": "https://wpnews.pro/news/what-prompt-format-template-should-i-use-for-training-unsloth-phi-3-5-mini", "canonical_source": "https://discuss.huggingface.co/t/what-prompt-format-template-should-i-use-for-training-unsloth-phi-3-5-mini-instruct/177144#post_1", "published_at": "2026-06-25 01:04:28+00:00", "updated_at": "2026-06-25 01:19:30.892808+00:00", "lang": "en", "topics": ["large-language-models", "developer-tools"], "entities": ["Unsloth", "Phi-3.5-mini-instruct", "Microsoft"], "alternates": {"html": "https://wpnews.pro/news/what-prompt-format-template-should-i-use-for-training-unsloth-phi-3-5-mini", "markdown": "https://wpnews.pro/news/what-prompt-format-template-should-i-use-for-training-unsloth-phi-3-5-mini.md", "text": "https://wpnews.pro/news/what-prompt-format-template-should-i-use-for-training-unsloth-phi-3-5-mini.txt", "jsonld": "https://wpnews.pro/news/what-prompt-format-template-should-i-use-for-training-unsloth-phi-3-5-mini.jsonld"}}