If you’ve read anything about Generative AI recently, I’m sure at some point you’ve heard about “hallucinations.”
From a human perspective, hallucinations are when a person senses that something that is not really there, like hearing voices or seeing spiders.
AI hallucinations are a similar concept, except that it’s where AI produces a response to a query that is not based on reality or its training data. So, while the AI may be trained on a specific data set, if it hallucinates, it then goes wildly off on its own to respond in ways that are unpredictable and most times wrong.
From the security side of things, hallucinations can also be a result of things like Prompt Injection or Data Poisoning attacks as these attempt to circumvent AI configuration to deliver incorrect or even dangerous responses. Mitigation of attacks like those and similar include constant monitoring and configuration tuning.
Interested in Security of AI? Check out the Must Learn AI Security series: https://aka.ms/MustLearnAISecurity
Azure AI Studio provides an easy way to adjust the configuration for tuning against hallucinations. In the Chat area in the studio console, you can find the Configuration window on the right.
Here you can adjust the Temperature or the Top P to help mitigate hallucinations. It’s recommended that you adjust one or the other but not both.
Temperature controls randomness. When you lower the temperature, the model will produce more repetitive and predictable responses. Increasing the temperature will result in more unexpected or creative responses.
Top P is similar to temperature as it controls randomness - but this option uses a different method that utilizes token selection. Lowering Top P will narrow the model’s token selection to likelier tokens. Increasing Top P will allow the model to choose from tokens with both high and low probability.
Once you’ve adjusted and tested the configuration, use Step 4 in the Basic Steps to Create Your Own Simple Copilot to redeploy your web bot with the new configuration.
[Want to discuss this further? Hit me up on Twitter or LinkedIn]
[Subscribe to the RSS feed for this blog]
[Subscribe to the Weekly Microsoft Sentinel Newsletter]
[Subscribe to the Weekly Microsoft Defender Newsletter]
[Subscribe to the Weekly Azure OpenAI Newsletter]
[Learn KQL with the Must Learn KQL series and book]
[Learn AI Security with the Must Learn AI Security series and book]