@David Thielen Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
.
Here are the answer your questions:
Azure Stack and CharGPT Equivalent: Azure does have a service that can provide ChatGPT-like experiences. It’s called Azure OpenAI Service. This service allows developers to integrate custom AI-powered experiences directly into their applications. You can use it to enhance existing bots to handle unexpected questions, recap call center conversations for faster customer support resolutions, create new ad copy with personalized offers, automate claims processing, and more. Azure also provides a guide on how to build ChatGPT-like experiences with Azure using Open AI Studio .
. Getting a Number as the Answer: AI models like ChatGPT are designed to generate human-like text based on the prompts they’re given. If you want a numerical answer, you might need to post-process the AI’s response to extract the numerical score. However, some AI models can be trained or fine-tuned to output numerical scores directly, but this would likely require a custom training process.
.
How to achieve this ? In Azure OpenAI Service, you can use a system prompt to guide the model’s behavior. The system prompt is included at the beginning of the prompt and is used to prime the model with context, instructions, or other information relevant to your use case.
Here’s an example of how you might structure your system prompt for your use case:
{
"messages": [
{
"role": "system",
"content": "You are a helpful assistant that rates political statements on two scales. The first scale is from Democratic (0) to Republican (10). The second scale is from innocuous (0) to hateful/discriminatory/violent (10). Your task is to provide a numerical rating on both scales for each statement you're given, without any additional explanation."
},
{
"role": "user",
"content": "\"THE USER MESSAGE GOES HERE\""
}
]
}
. In this example, the system message clearly defines the assistant’s role and the format of the response. The user message then provides the statement to be rated. You can add this system message in the chat playground and test this first before deploying to azure webapp as shown below:
- Please follow the below article to create Azure Open Ai resource from Azure portal. See here.
- Open the Open the Azure Open Ai Studio and Create a deployment first.
- Then navigate to the chat playground and enter the right system prompt. Test your input message and check if you get the right response.
- Then you can deploy this to Azure web app as shown below:
You can learn more about prompt engineering in the Azure OpenAI documentation.
.
Improving the Way of Asking Questions:
As mentioned in the above system prompt sample, Here are some tips:
- Context: Providing context can be helpful when asking AI questions.
- Natural Language: Many AI systems are designed to understand natural language, which means you can ask questions as you would speak to a human.
- Focused Questions: Keep your questions focused and avoid asking overly complex or open-ended questions.
- Prompt Engineering: This involves crafting your prompts in a way that guides the AI towards the type of response you want.
- Experimentation: You need to experiment with different ways of asking your question.
.
Remember, the effectiveness of these strategies can depend on the specific AI model you’re using. It’s always a good idea to test different approaches and iterate based on the results.
.
Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.