Skip to content

Commit 81f01c0

Browse files
committed
Update AI-ad-gen.md
1 parent bcf515e commit 81f01c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

articles/cosmos-db/mongodb/vcore/AI-ad-gen.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ To perform efficient vector similarity searches within our collection, we need t
159159
### IVF
160160
IVF stands for Inverted File Index, is the default vector indexing algorithm, which works on all cluster tiers. It's an approximate nearest neighbors (ANN) approach that uses clustering to speeding up the search for similar vectors in a dataset. To create an IVF index, use the following command:
161161

162-
```
162+
```javascript
163163
db.command({
164164
'createIndexes': COLLECTION_NAME,
165165
'indexes': [
@@ -186,7 +186,7 @@ db.command({
186186

187187
HNSW stands for Hierarchical Navigable Small World, a graph-based data structure that partitions vectors into clusters and subclusters. With HNSW, you can perform fast approximate nearest neighbor search at higher speeds with greater accuracy. HNSW is an approximate (ANN) method. Here's how to set it up:
188188

189-
```
189+
```javascript
190190
db.command(
191191
{
192192
"createIndexes": "ExampleCollection",
@@ -216,7 +216,7 @@ Now insert the inventory data, which includes descriptions and their correspondi
216216

217217
Download the [shoes_with_vectors.json](https://github.com/jayanta-mondal/ignite-demo/blob/main/data/shoes_with_vectors.json) file from the GitHub repository and store it in a `data` directory within your project folder.
218218

219-
```
219+
```python
220220
data_file = open(file="./data/shoes_with_vectors.json", mode="r")
221221
data = json.load(data_file)
222222
data_file.close()

0 commit comments

Comments
 (0)