Costa Rica
Last updated: 2026-01-29
List of References (Click to expand)
Table of Contents (Click to expand)
You can use the export option:
Which will look like this:
{
"systemPrompt": "You are an AI assistant that helps people find information.",
"fewShotExamples": [],
"chatParameters": {
"deploymentName": "gpt-4o-mini",
"maxResponseLength": 800,
"temperature": 0.7,
"topProbablities": 0.95,
"stopSequences": [],
"pastMessagesToInclude": 10,
"frequencyPenalty": 0,
"presencePenalty": 0
}
}Import the configuration:
graph TD
A[Create Azure OpenAI Resource] --> B[Configure Environment Variables]
B --> C[Prepare Data]
C --> D[Create Index in AI Studio]
D --> E[Index Data]
E --> F[Deploy Model in AI Studio]
F --> G[Configure Variants]
G --> H[Run and Evaluate Variants]
H --> I[Interact with Model]
I --> J[Monitor and Adjust]
subgraph Indexing Phase
direction TB
C[Prepare Data]
noteC[Ensure your data is in a suitable format and upload it to a supported storage service.]
D[Create Index in AI Studio]
noteD[Set up the index with parameters like chunk size, embedding model, and search type.]
E[Index Data]
noteE[Use the configured settings to index your data, creating embeddings.]
end
subgraph Deployment Phase
direction TB
F[Deploy Model in AI Studio]
noteF[Set up your model deployment with parameters like model version, temperature, and top_p.]
G[Configure Variants]
noteG[Create and manage different versions of your prompt settings for fine-tuning.]
H[Run and Evaluate Variants]
noteH[Test different variants to determine the best configuration.]
I[Interact with Model]
noteI[Use the model with the selected variant settings.]
J[Monitor and Adjust]
noteJ[Continuously monitor performance and make adjustments as needed.]
end
subgraph Environment Configuration
direction TB
B[Configure Environment Variables]
noteB[Set up your environment variables for your key and endpoint. This can be done in your development environment or directly in Azure AI Studio.]
end
-
Go to the Azure portal.
-
Navigate to
Create a resourceand search forAzure OpenAI. -
Follow the prompts to create your resource.
-
Prepare Your Data:
- Ensure your data is in a suitable format (e.g., text, PDF).
- Upload your data to Azure Blob Storage or another supported storage service.
If you don't have any yet see steps below:
-
Index Your Data:
- Use the configured settings to index your data.
- This process will break down your documents into smaller chunks and create embeddings.
Use AI Search directly:
Create a new connection if it's required, for e.g you can use Access key or SAS (Shared Access Signature):
Follow the process:
In Azure AI Studio:
- Navigate to the
Indexessection. - Select
Create Indexand configure the parameters such as chunk size, embedding model, and search type. - Save these settings for future use.
-
In Azure AI Studio, go to the
Deploymentssection. -
Select
Create Deploymentand choose your model (e.g., GPT-4).
-
Configure deployment parameters like model version, temperature, and top_p.
-
Save these deployment settings.
-
Add your index data to the model:
From the chat playground
Or you can:
Note
If you used Prompt flow section within your project, you need to add the LLM model but if you add the prompt flow from the chat playground you will see the LLM added, and other required elements as base for you.
How to add the LLM:
-
In the flow creation wizard, add an LLM (Large Language Model) node.
-
Configure the initial settings for this node, such as the prompt and connection settings.
How it looks from giving starting point:
Note
Set up your environment variables for your key and endpoint. This can be done in your development environment or directly in Azure AI Studio.
Using the approach of AI Studio
-
Show Variants: Once your LLM node is set up, click on the
Show variantsbutton at the top right of the node. This will allow you to create and manage different variants of your prompt.
This allows you to fine-tune and test different configurations.
-
The existing LLM node will be labeled as
variant_0by default. -
Click on the
Clonebutton onvariant_0to generatevariant_1.
-
Configure
variant_1with different parameters or update the prompt as needed. -
Repeat this step to create additional variants (e.g.,
variant_2,variant_3, etc.).
- For each variant, you can adjust parameters such as temperature, top_p, and the prompt content.
- Example configurations:
- Variant 0:
Temperature = 1,Prompt: "Summarize the following text: {{input_text}}" - Variant 1:
Temperature = 0.7,Prompt: "Summarize the following text: {{input_text}}" - Variant 2:
Temperature = 1,Prompt: "What is the main point of this article? {{input_text}}" - Variant 3:
Temperature = 0.7,Prompt: "What is the main point of this article? {{input_text}}"
- Variant 0:
- After configuring your variants, use Azure AI Studio or API calls to interact with your deployed model. You can run the flow with different inputs to test how each variant performs.
- Use the "Run" button to execute the flow and select the LLM node with variants to test.
- Evaluate the outputs to determine which variant produces the best results for your use case.
- Continuously monitor the performance of each variant.
- Make adjustments as needed based on the results to optimize your prompt configurations.
Here’s a simple example of how you might set up and use these settings programmatically:
import openai
# Set up your environment variables
openai.api_key = "your-api-key"
endpoint = "https://your-endpoint.openai.azure.com/"
# Define your index settings
index_settings = {
"chunk_size": 1024,
"embedding_model": "text-embedding-ada-002",
"search_type": "semantic"
}
# Define your deployment settings
deployment_settings = {
"model": "gpt-4",
"temperature": 0.7,
"top_p": 0.9
}
# Save these settings for reuse
def save_settings(settings, filename):
with open(filename, 'w') as file:
json.dump(settings, file)
save_settings(index_settings, 'index_settings.json')
save_settings(deployment_settings, 'deployment_settings.json')
# Load and use the settings
def load_settings(filename):
with open(filename, 'r') as file:
return json.load(file)
index_settings = load_settings('index_settings.json')
deployment_settings = load_settings('deployment_settings.json')
# Use the settings in your API calls
response = openai.Completion.create(
engine=deployment_settings["model"],
prompt="Your prompt here",
temperature=deployment_settings["temperature"],
top_p=deployment_settings["top_p"]
)
print(response.choices[0].text)

