diff --git a/docs/50-prepare-the-data/5-ingest-data.mdx b/docs/50-prepare-the-data/5-ingest-data.mdx index e558dc5..860288e 100644 --- a/docs/50-prepare-the-data/5-ingest-data.mdx +++ b/docs/50-prepare-the-data/5-ingest-data.mdx @@ -14,24 +14,13 @@ The answers for code blocks in this section are as follows: Answer
```python -MongoClient(MONGODB_URI) +mongodb_client[DB_NAME][COLLECTION_NAME] ```
**CODE_BLOCK_12** -
-Answer -
-```python -mongo_client[DB_NAME][COLLECTION_NAME] -``` -
-
- -**CODE_BLOCK_13** -
Answer
@@ -41,7 +30,7 @@ collection.delete_many({})
-**CODE_BLOCK_14** +**CODE_BLOCK_13**
Answer diff --git a/docs/60-perform-semantic-search/3-vector-search.mdx b/docs/60-perform-semantic-search/3-vector-search.mdx index 6962766..5cb7d22 100644 --- a/docs/60-perform-semantic-search/3-vector-search.mdx +++ b/docs/60-perform-semantic-search/3-vector-search.mdx @@ -6,7 +6,7 @@ Fill in any `` placeholders and run the cells under the **Step 8: The answers for code blocks in this section are as follows: -**CODE_BLOCK_15** +**CODE_BLOCK_14**
Answer @@ -17,7 +17,7 @@ get_embedding(user_query)
-**CODE_BLOCK_16** +**CODE_BLOCK_15**
Answer @@ -45,7 +45,7 @@ get_embedding(user_query)
-**CODE_BLOCK_17** +**CODE_BLOCK_16**
Answer diff --git a/docs/60-perform-semantic-search/4-pre-filtering.mdx b/docs/60-perform-semantic-search/4-pre-filtering.mdx index 85237b3..10a909a 100644 --- a/docs/60-perform-semantic-search/4-pre-filtering.mdx +++ b/docs/60-perform-semantic-search/4-pre-filtering.mdx @@ -10,7 +10,7 @@ Fill in any `` placeholders and run the cells under the **🦹‍ The answers for code blocks in this section are as follows: -**CODE_BLOCK_18** +**CODE_BLOCK_17**
Answer @@ -34,7 +34,7 @@ The answers for code blocks in this section are as follows:
-**CODE_BLOCK_19** +**CODE_BLOCK_18**
Answer @@ -63,7 +63,7 @@ The answers for code blocks in this section are as follows:
-**CODE_BLOCK_20** +**CODE_BLOCK_19**
Answer @@ -91,7 +91,7 @@ The answers for code blocks in this section are as follows:
-**CODE_BLOCK_21** +**CODE_BLOCK_20**
Answer diff --git a/docs/70-build-rag-app/1-build-rag-app.mdx b/docs/70-build-rag-app/1-build-rag-app.mdx index ebcca0d..7d7cac1 100644 --- a/docs/70-build-rag-app/1-build-rag-app.mdx +++ b/docs/70-build-rag-app/1-build-rag-app.mdx @@ -6,7 +6,7 @@ Fill in any `` placeholders and run the cells under the **Step 9: The answers for code blocks in this section are as follows: -**CODE_BLOCK_22** +**CODE_BLOCK_21**
Answer @@ -17,7 +17,7 @@ vector_search(user_query)
-**CODE_BLOCK_23** +**CODE_BLOCK_22**
Answer @@ -28,7 +28,7 @@ vector_search(user_query)
-**CODE_BLOCK_24** +**CODE_BLOCK_23**
Answer diff --git a/docs/70-build-rag-app/2-add-reranking.mdx b/docs/70-build-rag-app/2-add-reranking.mdx index 3ca4e0f..cf8406d 100644 --- a/docs/70-build-rag-app/2-add-reranking.mdx +++ b/docs/70-build-rag-app/2-add-reranking.mdx @@ -6,7 +6,7 @@ Fill in any `` placeholders and run the cells under the **🦹‍ The answers for code blocks in this section are as follows: -**CODE_BLOCK_25** +**CODE_BLOCK_24**
Answer @@ -19,7 +19,7 @@ rerank_model.rank(
-**CODE_BLOCK_26** +**CODE_BLOCK_25**
Answer diff --git a/docs/70-build-rag-app/3-stream-responses.mdx b/docs/70-build-rag-app/3-stream-responses.mdx index 4cb392e..0d7b79a 100644 --- a/docs/70-build-rag-app/3-stream-responses.mdx +++ b/docs/70-build-rag-app/3-stream-responses.mdx @@ -6,7 +6,7 @@ Fill in any `` placeholders and run the cells under the **🦹‍ The answers for code blocks in this section are as follows: -**CODE_BLOCK_27** +**CODE_BLOCK_26**
Answer @@ -27,7 +27,7 @@ fw_client.chat.completions.create(
-**CODE_BLOCK_28** +**CODE_BLOCK_27**
Answer diff --git a/docs/80-add-memory/2-add-memory.mdx b/docs/80-add-memory/2-add-memory.mdx index fbb014d..71d8510 100644 --- a/docs/80-add-memory/2-add-memory.mdx +++ b/docs/80-add-memory/2-add-memory.mdx @@ -6,7 +6,7 @@ Fill in any `` placeholders and run the cells under the **Step 10: The answers for code blocks in this section are as follows: -**CODE_BLOCK_29** +**CODE_BLOCK_28**
Answer @@ -17,7 +17,7 @@ history_collection.create_index("session_id")
-**CODE_BLOCK_30** +**CODE_BLOCK_29**
Answer @@ -33,7 +33,7 @@ history_collection.create_index("session_id")
-**CODE_BLOCK_31** +**CODE_BLOCK_30**
Answer @@ -44,7 +44,7 @@ history_collection.insert_one(message)
-**CODE_BLOCK_32** +**CODE_BLOCK_31**
Answer @@ -55,7 +55,7 @@ history_collection.find({"session_id": session_id}).sort("timestamp", 1)
-**CODE_BLOCK_33** +**CODE_BLOCK_32**
Answer @@ -66,7 +66,7 @@ history_collection.find({"session_id": session_id}).sort("timestamp", 1)
-**CODE_BLOCK_34** +**CODE_BLOCK_33**
Answer @@ -78,7 +78,7 @@ messages.extend(message_history)
-**CODE_BLOCK_35** +**CODE_BLOCK_34**
Answer @@ -90,7 +90,7 @@ messages.append(user_message)
-**CODE_BLOCK_36** +**CODE_BLOCK_35**
Answer