Skip to content
2 changes: 1 addition & 1 deletion AmazonBedrock/anthropic/02_Being_Clear_and_Direct.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
"metadata": {},
"outputs": [],
"source": [
"# System prompt - this is the only field you should chnage\n",
"# System prompt - this is the only field you should change\n",
"SYSTEM_PROMPT = \"[Replace this text]\"\n",
"\n",
"# Prompt\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
"\n",
"[XML tags](https://docs.anthropic.com/claude/docs/use-xml-tags) are angle-bracket tags like `<tag></tag>`. They come in pairs and consist of an opening tag, such as `<tag>`, and a closing tag marked by a `/`, such as `</tag>`. XML tags are used to wrap around content, like this: `<tag>content</tag>`.\n",
"\n",
"**Note:** While Claude can recognize and work with a wide range of separators and delimeters, we recommend that you **use specifically XML tags as separators** for Claude, as Claude was trained specifically to recognize XML tags as a prompt organizing mechanism. Outside of function calling, **there are no special sauce XML tags that Claude has been trained on that you should use to maximally boost your performance**. We have purposefully made Claude very malleable and customizable this way."
"**Note:** While Claude can recognize and work with a wide range of separators and delimiters, we recommend that you **use specifically XML tags as separators** for Claude, as Claude was trained specifically to recognize XML tags as a prompt organizing mechanism. Outside of function calling, **there are no special sauce XML tags that Claude has been trained on that you should use to maximally boost your performance**. We have purposefully made Claude very malleable and customizable this way."
]
},
{
Expand Down
26 changes: 13 additions & 13 deletions AmazonBedrock/anthropic/10_1_Appendix_Chaining_Prompts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -179,7 +179,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand All @@ -189,7 +189,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You may notice that if you generate a respnse from the above block a few times, Claude leaves the words as is most of the time, but still occasionally changes the words even though they're all already correct. What can we do to mitigate this? Per Chapter 8, we can give Claude an out! Let's try this one more time."
"You may notice that if you generate a response from the above block a few times, Claude leaves the words as is most of the time, but still occasionally changes the words even though they're all already correct. What can we do to mitigate this? Per Chapter 8, we can give Claude an out! Let's try this one more time."
]
},
{
Expand Down Expand Up @@ -235,7 +235,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -309,7 +309,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -352,7 +352,7 @@
"\n",
"# Store and print Claude's response\n",
"first_response = get_completion(messages)\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(first_response)"
Expand Down Expand Up @@ -393,7 +393,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -467,7 +467,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -516,7 +516,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -565,7 +565,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -621,7 +621,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -655,7 +655,7 @@
"\n",
"# Store and print Claude's response\n",
"first_response = get_completion(messages)\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(first_response)"
Expand Down Expand Up @@ -689,7 +689,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down
2 changes: 1 addition & 1 deletion AmazonBedrock/boto3/02_Being_Clear_and_Direct.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"metadata": {},
"outputs": [],
"source": [
"# System prompt - this is the only field you should chnage\n",
"# System prompt - this is the only field you should change\n",
"SYSTEM_PROMPT = \"[Replace this text]\"\n",
"\n",
"# Prompt\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
"\n",
"[XML tags](https://docs.anthropic.com/claude/docs/use-xml-tags) are angle-bracket tags like `<tag></tag>`. They come in pairs and consist of an opening tag, such as `<tag>`, and a closing tag marked by a `/`, such as `</tag>`. XML tags are used to wrap around content, like this: `<tag>content</tag>`.\n",
"\n",
"**Note:** While Claude can recognize and work with a wide range of separators and delimeters, we recommend that you **use specifically XML tags as separators** for Claude, as Claude was trained specifically to recognize XML tags as a prompt organizing mechanism. Outside of function calling, **there are no special sauce XML tags that Claude has been trained on that you should use to maximally boost your performance**. We have purposefully made Claude very malleable and customizable this way."
"**Note:** While Claude can recognize and work with a wide range of separators and delimiters, we recommend that you **use specifically XML tags as separators** for Claude, as Claude was trained specifically to recognize XML tags as a prompt organizing mechanism. Outside of function calling, **there are no special sauce XML tags that Claude has been trained on that you should use to maximally boost your performance**. We have purposefully made Claude very malleable and customizable this way."
]
},
{
Expand Down
26 changes: 13 additions & 13 deletions AmazonBedrock/boto3/10_1_Appendix_Chaining_Prompts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -185,7 +185,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand All @@ -195,7 +195,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"You may notice that if you generate a respnse from the above block a few times, Claude leaves the words as is most of the time, but still occasionally changes the words even though they're all already correct. What can we do to mitigate this? Per Chapter 8, we can give Claude an out! Let's try this one more time."
"You may notice that if you generate a response from the above block a few times, Claude leaves the words as is most of the time, but still occasionally changes the words even though they're all already correct. What can we do to mitigate this? Per Chapter 8, we can give Claude an out! Let's try this one more time."
]
},
{
Expand Down Expand Up @@ -241,7 +241,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -315,7 +315,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -358,7 +358,7 @@
"\n",
"# Store and print Claude's response\n",
"first_response = get_completion(messages)\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(first_response)"
Expand Down Expand Up @@ -399,7 +399,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -473,7 +473,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -522,7 +522,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -571,7 +571,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -627,7 +627,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down Expand Up @@ -661,7 +661,7 @@
"\n",
"# Store and print Claude's response\n",
"first_response = get_completion(messages)\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(first_response)"
Expand Down Expand Up @@ -695,7 +695,7 @@
"]\n",
"\n",
"# Print Claude's response\n",
"print(\"------------------------ Full messsages array with variable substutions ------------------------\")\n",
"print(\"------------------------ Full messages array with variable substutions ------------------------\")\n",
"print(messages)\n",
"print(\"\\n------------------------------------- Claude's response -------------------------------------\")\n",
"print(get_completion(messages))"
Expand Down
2 changes: 1 addition & 1 deletion Anthropic 1P/02_Being_Clear_and_Direct.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"metadata": {},
"outputs": [],
"source": [
"# System prompt - this is the only field you should chnage\n",
"# System prompt - this is the only field you should change\n",
"SYSTEM_PROMPT = \"[Replace this text]\"\n",
"\n",
"# Prompt\n",
Expand Down
2 changes: 1 addition & 1 deletion Anthropic 1P/04_Separating_Data_and_Instructions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"\n",
"[XML tags](https://docs.anthropic.com/claude/docs/use-xml-tags) are angle-bracket tags like `<tag></tag>`. They come in pairs and consist of an opening tag, such as `<tag>`, and a closing tag marked by a `/`, such as `</tag>`. XML tags are used to wrap around content, like this: `<tag>content</tag>`.\n",
"\n",
"**Note:** While Claude can recognize and work with a wide range of separators and delimeters, we recommend that you **use specifically XML tags as separators** for Claude, as Claude was trained specifically to recognize XML tags as a prompt organizing mechanism. Outside of function calling, **there are no special sauce XML tags that Claude has been trained on that you should use to maximally boost your performance**. We have purposefully made Claude very malleable and customizable this way."
"**Note:** While Claude can recognize and work with a wide range of separators and delimiters, we recommend that you **use specifically XML tags as separators** for Claude, as Claude was trained specifically to recognize XML tags as a prompt organizing mechanism. Outside of function calling, **there are no special sauce XML tags that Claude has been trained on that you should use to maximally boost your performance**. We have purposefully made Claude very malleable and customizable this way."
]
},
{
Expand Down
Loading