Language guidelines
1. Use clear and concise language
- Be direct: Clearly state your questions or commands. Avoid using ambiguous or vague language.
- Example: Instead of saying "Tell me about it," specify what "it" refers to, such as "Tell me about the process of photosynthesis."
- Keep it simple: Use simple and straightforward language. Complex sentences can sometimes confuse the AI.
- Example: "Can you tell me what the capital city of the country known for the Eiffel Tower is?" is less clear than "What is the capital of France?"
2. Provide context
- Context matters: Providing context helps the AI understand the background and specifics of your query.
- Example: Instead of asking "What is the weather like?", specify the location and time, such as "What is the weather like in New York City today?"
3. Use proper grammar and punctuation
- Grammar and punctuation: Proper grammar and punctuation help the AI parse and understand your input more accurately.
- Example: "what are the benefits of a balanced diet" is less clear than "What are the benefits of a balanced diet?"
4. Be specific
- Specificity: The more specific you are, the better the AI can tailor its response to your needs.
- Example: Instead of asking "How does it work?", specify what "it" refers to, such as "How does a solar panel work?"
5. Avoid slang and abbreviations
- Standard language: Use standard language and avoid slang, abbreviations, or jargon that the AI might not understand.
- Example: Instead of saying "What's the 411 on AI?", say "What information can you provide about AI?"
Why AI models might refuse to respond
1. Examples of restricted topics
- Self-harm: AI models will refuse to provide guidance or information that could be used to harm oneself. This is to prevent any potential encouragement or facilitation of self-injurious behavior.
- Example: If you ask, "How can I harm myself?", the AI will not respond and may provide an error message indicating the restriction.
- Violence: AI models will not provide information or guidance on how to commit acts of violence. This is to ensure that the AI is not used to promote or facilitate violent behavior.
- Example: If you ask, "How can I hurt someone?", the AI will refuse to respond and may indicate that the query is not allowed.
- Illegal activities: AI models will not provide information or guidance on how to engage in illegal activities, including but not limited to hacking, drug manufacturing, or theft.
- Example: If you ask, "How can I hack into a computer system?", the AI will refuse to respond.
- Hate speech and discrimination: AI models will not engage in or promote hate speech, discrimination, or any form of bigotry against individuals or groups based on race, ethnicity, religion, gender, sexual orientation, or other protected characteristics.
- Example: If you ask, "How can I spread hate speech?", the AI will refuse to respond.
- Harassment and bullying: AI models will not provide guidance on how to harass, bully, or intimidate others.
- Example: If you ask, "How can I bully someone online?", the AI will refuse to respond.
- Sensitive personal information: AI models will not provide or request sensitive personal information, such as social security numbers, credit card details, or personal addresses.
- Example: If you ask, "What is someone's social security number?", the AI will refuse to respond.
- Medical advice: AI models are not qualified to provide medical advice, diagnosis, or treatment. Queries related to medical conditions should be directed to a healthcare professional.
- Example: If you ask, "How can I treat my illness?", the AI will advise you to consult a healthcare professional.
- Financial advice: AI models are not qualified to provide financial advice, investment strategies, or tax guidance. Queries related to financial decisions should be directed to a financial advisor.
- Example: If you ask, "How should I invest my money?", the AI will advise you to consult a financial advisor.
- Explicit content: AI models will not engage in or provide explicit content, including but not limited to sexually explicit material or graphic descriptions of violence.
- Example: If you ask, "Can you provide explicit content?", the AI will refuse to respond.
Error messages (in Azure AI Foundry)
When an AI model encounters a query that violates its safety and ethical guidelines, it may provide an error message. For example, in the Azure AI Foundry, you might see error messages such as:
- Self-harm (medium)
- Violence (medium)
- Illegal activities (high)
- Hate speech (high)
- Harassment (medium)
- Sensitive personal information (high)
- Medical advice (medium)
- Financial advice (medium)
- Explicit content (high)
These error messages indicate that the AI has detected content related to restricted topics and has refused to process the request to ensure safety and ethical compliance.
An example of a denied answer
Note: The model will not give you direct instructions, you should rephrase your inquiry!
An example of a rephrased inquiry after a denied answer
Did you like our mini blog series how to fine-tune AI/LLM models?
Please leave a like
Select an Azure AI Foundry project in Azure Portal or make a new one with the "Create a resource" button or use the search field to look for the "Azure AI Foundry" item.
Note: If you log in for the first time or you did not interact with any items before, the "Recent" list will be empty!
After choosing or creating an Azure AI Foundry project, on this screen select "Launch studio".
On this newly-opened webpage you can see the details of the project. In the left side of the screen you can see a menu with different options.
Select "Fine-tuning".
Select "Fine-tune model".
Note: If you did not fine-tune a model before, the list will be empty!
Azure AI Foundry offers several base-models.
You can choose one as a starting point and fine-tune it with custom data.
Select a model from the list.
Here you can see details of the selected model.
Select "Next".
Here you can select "Customize" and change the resource if needed, if not select "Confirm".
Here you can select a version of the model and append a custom suffix.
You also have to choose a resource.
Select "Next".
Note: Version selection is not applicable for all models and appending a suffix is optional!
Here you can specify the location of the fine-tuning data.
Select "Next".
Optional: Here you can select the validation data for the fine-tuning.
Select "Next".
Optional: Here you can customize the fine-tuning parameters if needed, if not select "Next".
Here you can review and modify all the settings and customizations you made once again before beginning with the the fine-tuning.
If you are ready to start the fine-tuning of the model, select "Submit".
Note: This will initiate the fine-tuning process!!!
Reviewing the fine-tuning process
After the fine-tuning process has ended you can see the fine-tuned model listed in the "Fine-tuning" tab.
If you select a newly fine-tuned model in the list you will be able to see all the relevant details about it.
Here you can see all the details related to the fine-tuning and the results.
Select "Metrics" if you want to see more details.
Here you can see a graphical representation of the "train_loss" and "train_mean_token_accuracy" values.
- train_loss: This metric represents the loss value calculated on the training dataset. It indicates how well the model is performing during training. A lower loss value generally signifies a better fit of the model to the training data.
- train_mean_token_accuracy: This metric measures the average accuracy of the model in predicting individual tokens (e.g., words or characters) correctly during training. Higher accuracy indicates that the model is making more correct predictions.
Select "Logs" to see more details.
Here you can see the exact details of the fine-tuning.
This is the beginning of the logs.
You can navigate through the logs with "Prev" and "Next".
After navigating to the latest logs you can see how many tokens have been billed by Azure AI Foundry.
Deployment
Note: Deploying a custom model implies extra hourly costs compared to base models!!!
The custom model is now ready for deployment!
Select "Models + endpoints".
Here you can see all the deployed models.
Select "Deploy model".
From the drop-down menu select "Deploy fine-tuned model".
Here you can deploy the freshly fine-tuned model.
Select "Submit".
Note: After deploying the model you can see it added in the "Models + endpoints" tab's list!
The model is now ready to be used!
Select the "Playgrounds" tab.
Select "Try the Chat playground".
Here you can select the fine-tuned model from the "Deployment" drop-down menu.
You can start the chat with the model right away!
What's next?
On 7/14/2025 we'll continue our guide how to use language while communicating with AI/LLM models.