SLM prompting lessons from Microsoft
Microsoft provides an interesting set of instructions for crafting prompts for Aion. It takes the approach that the prompts sent to an SLM are a contract, one that describes the data sent to the model, the data delivered in return, the values that will be allowed, and the conditions that determine correctness, as well as what will be seen as incorrect. Finally, the contract will apply limits, for example the tokens and compute used. All this should be in a machine-readable format and should be used to keep the model inside your boundary conditions.
With a contract in place as the system prompt, you can start to experiment with prompts using a set of scenarios to try out. This test set shouldn’t be limited to valid prompts; it should also include bad grammar, user errors, truncations, and more, to stress test the SLM. You can then use this test set to ensure that your system prompt is working, along with any LoRA weights. By comparing outputs you can ensure that your system is working as expected.
There are known issues with SLMs as compared to much larger LLMs, and Aion is as sensitive to these as Phi and other small models are. You need to be sure that context and prompt structure avoid ambiguities, as the model may not be able to recover from an error. Microsoft provides a table of potential issues and solutions to help you build tooling to sanitize user inputs or structure machine-generated prompts from local agents. You may additionally need to provide a vocabulary and definitions as additional context if you’re using specialized terminology. Another useful tip is to keep data and instructions separate, with prompts asking questions about the data, rather than embedded in it.

