You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-studio/how-to/develop/llama-index.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,11 +25,11 @@ In this example, we are working with the **Azure AI model inference API**.
25
25
26
26
## Prerequisites
27
27
28
-
To run this tutorial you need:
28
+
To run this tutorial, you need:
29
29
30
30
1. An [Azure subscription](https://azure.microsoft.com).
31
31
2. An Azure AI hub resource as explained at [How to create and manage an Azure AI Studio hub](../create-azure-ai-resource.md).
32
-
3. A model supporting the [Azure AI model inference API](https://aka.ms/azureai/modelinference) deployed. In this example we use a `Mistral-Large` deployment, but use any model of your preference. For using embeddings capabilities in LlamaIndex, you need an embedding model like `cohere-embed-v3-multilingual`.
32
+
3. A model supporting the [Azure AI model inference API](https://aka.ms/azureai/modelinference) deployed. In this example, we use a `Mistral-Large` deployment, but use any model of your preference. For using embeddings capabilities in LlamaIndex, you need an embedding model like `cohere-embed-v3-multilingual`.
33
33
34
34
* You can follow the instructions at [Deploy models as serverless APIs](../deploy-models-serverless.md).
35
35
@@ -49,18 +49,18 @@ To run this tutorial you need:
49
49
50
50
## Configure the environment
51
51
52
-
To use LLMs deployed in Azure AI studio you need the endpoint and credentials to connect to it. The parameter `model_name` is not required for endpoints serving a single model, like Managed Online Endpoints. Follow this steps to get the information you need from the model you want to use:
52
+
To use LLMs deployed in Azure AI studio, you need the endpoint and credentials to connect to it. The parameter `model_name` is not required for endpoints serving a single model, like Managed Online Endpoints. Follow these steps to get the information you need from the model you want to use:
53
53
54
54
1. Go to the [Azure AI studio](https://ai.azure.com/).
55
-
2. Go to deployments and selectthe model you have deployed as indicated in the prerequisites.
55
+
2. Go to deployments and selectthe model you deployed as indicated in the prerequisites.
56
56
3. Copy the endpoint URL and the key.
57
57
58
58
:::image type="content" source="../../media/how-to/inference/serverless-endpoint-url-keys.png" alt-text="Screenshot of the option to copy endpoint URI and keys from an endpoint." lightbox="../../media/how-to/inference/serverless-endpoint-url-keys.png":::
59
59
60
60
> [!TIP]
61
61
> If your model was deployed with Microsoft Entra ID support, you don't need a key.
62
62
63
-
In this scenario, we have placed both the endpoint URL and key in the following environment variables:
63
+
In this scenario, we placed both the endpoint URL and key in the following environment variables:
For parameters extra parameters that are not supported by the Azure AI model inference API but that are available in the underlying model, you can use the `model_extras` argument. In the following example, the parameter `safe_prompt`, only available for Mistral models, is being passed.
122
+
Parameters not supported in the Azure AI model inference API ([reference](../../reference/reference-model-inference-chat-completions.md)) but available in the underlying model, you can use the `model_extras` argument. In the following example, the parameter `safe_prompt`, only available for Mistral models, is being passed.
You can use the LLM or embeddings model client individually in the code you develop with LlamaIndex or you can configure the entire session using the `Settings` options. Configuring the session has the advantage that thenall your code will use the same models for all the operations.
181
+
You can use the LLM or embeddings model client individually in the code you develop with LlamaIndex or you can configure the entire session using the `Settings` options. Configuring the session has the advantage of all your code using the same models for all the operations.
182
182
183
183
```python
184
184
from llama_index.core import Settings
@@ -187,15 +187,15 @@ Settings.llm = llm
187
187
Settings.embed_model = embed_model
188
188
```
189
189
190
-
However, there are scenarios where you want to use a general model for most of the operations but an specific one for a given task. On those cases, it's useful to set the LLM or embedding model your are using for each LlamaIndex construct. In the following example, we set an specific model:
190
+
However, there are scenarios where you want to use a general model for most of the operations but a specific one for a given task. On those cases, it's useful to set the LLM or embedding model you are using for each LlamaIndex construct. In the following example, we set a specific model:
191
191
192
192
```python
193
193
from llama_index.core.evaluation import RelevancyEvaluator
194
194
195
195
relevancy_evaluator = RelevancyEvaluator(llm=llm)
196
196
```
197
197
198
-
In general, you will use a combination of both strategies.
198
+
In general, you use a combination of both strategies.
0 commit comments