Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dloman118 committed Aug 6, 2024
1 parent 7576187 commit 970289c
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"\n",
"[Meta's Llama Guard 3](https://llama.meta.com/docs/model-cards-and-prompt-formats/llama-guard-3/) is an advanced content moderation tool designed to assess user messages for harmful content. By analyzing incoming messages, Llama Guard 3 can effectively identify and classify harmful content across 14 categories, including hate speech, threats, and misinformation. This proactive approach allows chatbots to filter out harmful messages, ensuring that the language model (LLM) does not engage with or respond to inappropriate content.\n",
"\n",
"In this tutorial, we will demonstrate how utilizing Llama Guard 3 on Groq API effectively detects harmful content in user messages. By detecting harmful messages from users, you can ensure that your chatbot either does not respond or provides a generic or safe response that does not engage with the harmful content. We will provide examples of how the model identifies and classifies harmful messages across various categories, ensuring that inappropriate content is filtered out before the chatbot engages with users.\n",
"In this tutorial, we will build a chatbot to demonstrate how utilizing Llama Guard 3 with Groq API effectively detects harmful content in user messages. By detecting harmful messages from users, you can ensure that your chatbot either does not respond or provides a generic or safe response that does not engage with the harmful content. We will provide examples of how the model identifies and classifies harmful messages across various categories, ensuring that inappropriate content is filtered out before the chatbot engages with users.\n",
"\n",
"By implementing Llama Guard 3 through the [Groq API](https://console.groq.com/playground), you can significantly enhance user safety, uphold community standards, and create a respectful online environment. This proactive approach not only protects users but also contributes to a more positive and engaging experience. Let's get started!"
]
Expand All @@ -40,8 +40,9 @@
"from groq import Groq\n",
"import pandas as pd\n",
"import random\n",
"import os\n",
"\n",
"client = Groq()"
"client = Groq(os.getenv('GROQ_API_KEY'))"
]
},
{
Expand Down Expand Up @@ -182,7 +183,7 @@
"id": "133d15c8-9a8a-4cae-a07e-998384c1d8eb",
"metadata": {},
"source": [
"We've provided Llama Guard 3 a user message, and it successfully identified the content as unsafe and in the S13 taxonomy (Elections). Now, let's try Llama Guard 3 with several prompts to see how effectively it classfies them. We'll use `llama-3.1-8b-instant` to generate example user messages, randomly choosing safe or unsafe, and run them through Llama Guard 3 to determine it."
"We've provided Llama Guard 3 a user message, and it successfully identified the content as unsafe and in the S13 taxonomy (Elections). Now, let's try Llama Guard 3 with several prompts to see how effectively it classifies them. We'll use `llama-3.1-8b-instant` to generate example user messages, randomly choosing safe or unsafe, and run them through Llama Guard 3 for classification"
]
},
{
Expand Down

0 comments on commit 970289c

Please sign in to comment.