Skip to content

Commit f6d30c5

Browse files
committed
wording fixes
1 parent d8b7a15 commit f6d30c5

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

articles/ai-services/agents/includes/azure-search/code-examples.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This quickstart shows how to use an existing Azure AI Search index with the Azure AI Search tool.
44

55
### Prerequisites
6-
Complete the [Azure AI Search tool setup](?pivot=setup).
6+
Complete the [Azure AI Search tool setup](../../includes/azure-search/setup.md).
77

88
### Step 1: Create an Azure AI Client
99
First, create an Azure AI Client using the connection string of your project.
@@ -119,7 +119,6 @@ agent = project_client.agents.create_agent(
119119
instructions="You are a helpful assistant",
120120
tools=ai_search.definitions,
121121
tool_resources = ai_search.resources,
122-
headers={"x-ms-enable-preview": "true"},
123122
)
124123
print(f"Created agent, ID: {agent.id}")
125124
```

articles/ai-services/agents/includes/file-search/deep-dive.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ batch = project_client.agents.create_vector_store_file_batch_and_poll(
4141
Files can be removed from a vector store by either:
4242

4343
* Deleting the vector store file object or,
44-
* By deleting the underlying file object (which removes the file it from all vector_store and code_interpreter configurations across all agents and threads in your organization)
44+
* By deleting the underlying file object, which removes the file it from all vector_store and code_interpreter configurations across all agents and threads in your organization
4545

4646
The maximum file size is 512 MB. Each file should contain no more than 5,000,000 tokens per file (computed automatically when you attach a file).
4747

@@ -69,15 +69,15 @@ print("Deleted vector store")
6969

7070
## Ensuring vector store readiness before creating runs
7171

72-
We highly recommend that you ensure all files in a vector_store are fully processed before you create a run. This ensures that all the data in your vector store is searchable. You can check for vector store readiness by using the polling helpers in the SDKs, or by manually polling the `vector_store` object to ensure the status is completed.
72+
We highly recommend that you ensure all files in a vector_store are fully processed before you create a run. This approach ensures that all the data in your vector store is searchable. You can check for vector store readiness by using the polling helpers in the SDKs, or by manually polling the `vector_store` object to ensure the status is completed.
7373

74-
As a fallback, there's a 60-second maximum wait in the run object when the thread's vector store contains files that are still being processed. This is to ensure that any files your users upload in a thread a fully searchable before the run proceeds. This fallback wait does not apply to the agent's vector store.
74+
As a fallback, there's a 60-second maximum wait in the run object when the thread's vector store contains files that are still being processed. This step ensures that any files your users upload in a thread are fully searchable before the run proceeds. This fallback wait does not apply to the agent's vector store.
7575

7676
## Managing costs with expiration policies
7777

78-
For basic agent setup. the `file_search` tool uses the `vector_stores` object as its resource and you will be billed based on the size of the vector_store objects created. The size of the vector store object is the sum of all the parsed chunks from your files and their corresponding embeddings.
78+
For basic agent setup, the `file_search` tool uses the `vector_stores` object as its resource and you are billed based on the size of the vector_store objects created. The size of the vector store object is the sum of all the parsed chunks from your files and their corresponding embeddings.
7979

80-
In order to help you manage the costs associated with these vector_store objects, we have added support for expiration policies in the `vector_store` object. You can set these policies when creating or updating the `vector_store` object.
80+
To help you manage the costs associated with these vector_store objects, we added support for expiration policies in the `vector_store` object. You can set these policies when creating or updating the `vector_store` object.
8181

8282
```python
8383
vector_store = project_client.agents.create_vector_store_and_poll(
@@ -94,7 +94,7 @@ vector_store = project_client.agents.create_vector_store_and_poll(
9494

9595
Vector stores created using thread helpers (like `tool_resources.file_search.vector_stores` in Threads or `message.attachments` in Messages) have a default expiration policy of seven days after they were last active (defined as the last time the vector store was part of a run).
9696

97-
When a vector store expires, the runs on that thread fail. To fix this, you can recreate a new vector_store with the same files and reattach it to the thread.
97+
When a vector store expires, the runs on that thread fail. To fix this issue, you can recreate a new vector_store with the same files and reattach it to the thread.
9898

9999
```python
100100
all_files = list(client.beta.vector_stores.files.list("vs_expired"))

articles/ai-services/agents/includes/file-search/upload-files-code-examples.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ Complete the [agent setup](../../quickstart.md).
77

88
## Step 1: Create a project client
99

10-
Create a client object, that contains the connection string for connecting to your AI project and other resources.
11-
10+
Create a client object that contains the connection string for connecting to your AI project and other resources.
1211
# [Python](#tab/python)
1312

1413
```python
@@ -49,7 +48,7 @@ AgentsClient client = new AgentsClient(connectionString, new DefaultAzureCredent
4948

5049
## Step 2: Upload files and add them to a Vector Store
5150

52-
To access your files, the file search tool uses the vector store object. Upload your files and create a vector store to contain them. Once the vector store is created, you should poll its status until all files are out of the `in_progress` state to ensure that all content has finished processing. The SDK provides helpers for uploading and polling.
51+
To access your files, the file search tool uses the vector store object. Upload your files and create a vector store. After creating the vector store, poll its status until all files are out of the `in_progress` state to ensure that all content is fully processing. The SDK provides helpers for uploading and polling.
5352
# [Python](#tab/python)
5453

5554
```python
@@ -85,7 +84,7 @@ VectorStore vectorStore = await client.CreateVectorStoreAsync(
8584
```
8685
---
8786

88-
## Step 3: Create an agent with access to file search
87+
## Step 3: Create an agent and enable file search
8988

9089
To make the files accessible to your agent, create a `FileSearchTool` object with the `vector_store` ID, and attach `tools` and `tool_resources` to the agent.
9190

@@ -126,10 +125,11 @@ Agent agent = agentResponse.Value;
126125
---
127126

128127
## Step 4: Create a thread
129-
You can also attach files as Message attachments on your thread. Doing so will create another ```vector_store``` associated with the thread, or, if there is already a vector store attached to this thread, attach the new files to the existing thread vector store. When you create a Run on this thread, the file search tool will query both the ```vector_store``` from your assistant and the ```vector_store``` on the thread.
128+
You can also attach files as Message attachments on your thread. Doing so creates another ```vector_store``` associated with the thread, or, if there's already a vector store attached to this thread, attaches the new files to the existing thread vector store. When you create a Run on this thread, the file search tool queries both the ```vector_store``` from your agent and the ```vector_store``` on the thread.
130129
# [Python](#tab/python)
131130

132131
```python
132+
# Create a thread
133133
thread = project_client.agents.create_thread()
134134
print(f"Created thread, thread ID: {thread.id}")
135135

@@ -139,7 +139,7 @@ print(f"Uploaded file, file ID: {message_file.id}")
139139

140140
# Create a message with the file search attachment
141141
# Notice that vector store is created temporarily when using attachments with a default expiration policy of seven days.
142-
attachment = MessageAttachment(file_id=file.id, tools=FileSearchTool().definitions)
142+
attachment = MessageAttachment(file_id=message_file.id, tools=FileSearchTool().definitions)
143143
message = project_client.agents.create_message(
144144
thread_id=thread.id, role="user", content="What feature does Smart Eyewear offer?", attachments=[attachment]
145145
)

0 commit comments

Comments
 (0)