Skip to content

Commit db21e4e

Browse files
author
ajosh0504
committed
Updating codeblocks
1 parent 2092ac4 commit db21e4e

File tree

6 files changed

+33
-18
lines changed

6 files changed

+33
-18
lines changed

docs/40-perform-vector-search/2-create-vector-index.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,19 @@
22

33
To retrieve documents from MongoDB using vector search, you must configure a vector search index on the collection into which you ingested your data. In this lab, you will programmatically create vector search indexes using MongoDB's Python driver.
44

5-
Run the cells under the **Step 6: Create a vector search index** section in the notebook to create a vector search index.
5+
Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 6: Create a vector search index** section in the notebook to create a vector search index.
6+
7+
The answers for code blocks in this section are as follows:
8+
9+
**CODE_BLOCK_6**
10+
11+
<details>
12+
<summary>Answer</summary>
13+
<div>
14+
15+
```python
16+
create_index(collection, ATLAS_VECTOR_SEARCH_INDEX_NAME, model)
17+
```
18+
19+
</div>
20+
</details>

docs/40-perform-vector-search/3-vector-search.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 7:
66

77
The answers for code blocks in this section are as follows:
88

9-
**CODE_BLOCK_6**
9+
**CODE_BLOCK_7**
1010

1111
<details>
1212
<summary>Answer</summary>
@@ -17,7 +17,7 @@ get_embedding(user_query)
1717
</div>
1818
</details>
1919

20-
**CODE_BLOCK_7**
20+
**CODE_BLOCK_8**
2121

2222
<details>
2323
<summary>Answer</summary>
@@ -45,7 +45,7 @@ get_embedding(user_query)
4545
</div>
4646
</details>
4747

48-
**CODE_BLOCK_8**
48+
**CODE_BLOCK_9**
4949

5050
<details>
5151
<summary>Answer</summary>

docs/40-perform-vector-search/4-pre-filtering.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **🦹‍
1010

1111
The answers for code blocks in this section are as follows:
1212

13-
**CODE_BLOCK_9**
13+
**CODE_BLOCK_10**
1414

1515
<details>
1616
<summary>Answer</summary>
@@ -35,7 +35,7 @@ The answers for code blocks in this section are as follows:
3535
</div>
3636
</details>
3737

38-
**CODE_BLOCK_10**
38+
**CODE_BLOCK_11**
3939

4040
<details>
4141
<summary>Answer</summary>
@@ -64,7 +64,7 @@ The answers for code blocks in this section are as follows:
6464
</div>
6565
</details>
6666

67-
**CODE_BLOCK_11**
67+
**CODE_BLOCK_12**
6868

6969
<details>
7070
<summary>Answer</summary>
@@ -90,7 +90,7 @@ The answers for code blocks in this section are as follows:
9090
</div>
9191
</details>
9292

93-
**CODE_BLOCK_12**
93+
**CODE_BLOCK_13**
9494

9595
<details>
9696
<summary>Answer</summary>

docs/50-build-rag-app/1-build-rag-app.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 8:
66

77
The answers for code blocks in this section are as follows:
88

9-
**CODE_BLOCK_13**
9+
**CODE_BLOCK_144**
1010

1111
<details>
1212
<summary>Answer</summary>
@@ -17,7 +17,7 @@ vector_search(user_query)
1717
</div>
1818
</details>
1919

20-
**CODE_BLOCK_14**
20+
**CODE_BLOCK_15**
2121

2222
<details>
2323
<summary>Answer</summary>
@@ -28,7 +28,7 @@ create_prompt(user_query)
2828
</div>
2929
</details>
3030

31-
**CODE_BLOCK_15**
31+
**CODE_BLOCK_16**
3232

3333
<details>
3434
<summary>Answer</summary>

docs/50-build-rag-app/2-add-reranking.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **🦹‍
66

77
The answers for code blocks in this section are as follows:
88

9-
**CODE_BLOCK_16**
9+
**CODE_BLOCK_17**
1010

1111
<details>
1212
<summary>Answer</summary>

docs/60-add-memory/1-add-memory.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Fill in any `<CODE_BLOCK_N>` placeholders and run the cells under the **Step 9:
66

77
The answers for code blocks in this section are as follows:
88

9-
**CODE_BLOCK_17**
9+
**CODE_BLOCK_18**
1010

1111
<details>
1212
<summary>Answer</summary>
@@ -17,7 +17,7 @@ history_collection.create_index("session_id")
1717
</div>
1818
</details>
1919

20-
**CODE_BLOCK_18**
20+
**CODE_BLOCK_19**
2121

2222
<details>
2323
<summary>Answer</summary>
@@ -28,7 +28,7 @@ history_collection.insert_one(message)
2828
</div>
2929
</details>
3030

31-
**CODE_BLOCK_19**
31+
**CODE_BLOCK_20**
3232

3333
<details>
3434
<summary>Answer</summary>
@@ -39,7 +39,7 @@ history_collection.find({"session_id": session_id}).sort("timestamp", 1)
3939
</div>
4040
</details>
4141

42-
**CODE_BLOCK_20**
42+
**CODE_BLOCK_21**
4343

4444
<details>
4545
<summary>Answer</summary>
@@ -50,7 +50,7 @@ retrieve_session_history(session_id)
5050
</div>
5151
</details>
5252

53-
**CODE_BLOCK_21**
53+
**CODE_BLOCK_22**
5454

5555
<details>
5656
<summary>Answer</summary>
@@ -61,7 +61,7 @@ retrieve_session_history(session_id)
6161
</div>
6262
</details>
6363

64-
**CODE_BLOCK_22**
64+
**CODE_BLOCK_23**
6565

6666
<details>
6767
<summary>Answer</summary>

0 commit comments

Comments
 (0)