customer-support-chat changedabout-claude/use-case-guides/customer-support-chat
Nearest release: v2.1.312, published under an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+19added
Lines−19removed
From line
41
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits15to this page, all time
The whole hunk
from line 41, old and new numbered
/
from line 41
4141 </Accordion>
4242
4343 <Accordion title="Consistent brand voice">
44 You can instruct Claude to consistently represent your brand's tone and values, whereas human agents might vary in their communication styles.
44 You can instruct Claude to consistently represent your brand’s tone and values, whereas human agents might vary in their communication styles.
4545 </Accordion>
4646</AccordionGroup>
4747
4848Some considerations for choosing Claude over other LLMs:
4949
50* You prioritize natural, nuanced conversation: Claude's sophisticated language understanding allows for more natural, context-aware conversations that feel more human-like than chats with other LLMs.
50* You prioritize natural, nuanced conversation: Claude’s sophisticated language understanding allows for more natural, context-aware conversations that feel more human-like than chats with other LLMs.
5151* You often receive complex and open-ended queries: Claude can handle a wide range of topics and inquiries without generating scripted responses or requiring extensive programming of permutations of user utterances.
52* You need scalable multilingual support: Claude's multilingual capabilities allow it to engage in conversations in over 200 languages without the need for separate chatbots or extensive translation processes for each supported language.
52* You need scalable multilingual support: Claude’s multilingual capabilities allow it to engage in conversations in over 200 languages without the need for separate chatbots or extensive translation processes for each supported language.
5353
5454### Define your ideal chat interaction
5555
from line 137
137137 </Accordion>
138138
139139 <Accordion title="Response relevance">
140 This assesses how well Claude's response addresses the customer's specific question or issue. Evaluate a set of conversations and rate the relevance of each response (using LLM-based grading for scale). Target a relevance score of 90 percent or above.
140 This assesses how well Claude’s response addresses the customer’s specific question or issue. Evaluate a set of conversations and rate the relevance of each response (using LLM-based grading for scale). Target a relevance score of 90 percent or above.
141141 </Accordion>
142142
143143 <Accordion title="Response accuracy">
from line 149
149149 </Accordion>
150150
151151 <Accordion title="Topic adherence">
152 Measure how well Claude stays on topic, such as the topic of car insurance in the example implementation. Aim for 95 percent of responses to be directly related to car insurance or the customer's specific query.
152 Measure how well Claude stays on topic, such as the topic of car insurance in the example implementation. Aim for 95 percent of responses to be directly related to car insurance or the customer’s specific query.
153153 </Accordion>
154154
155155 <Accordion title="Content generation effectiveness">
from line 157
157157 </Accordion>
158158
159159 <Accordion title="Escalation efficiency">
160 This measures Claude's ability to recognize when a query needs human intervention and escalate appropriately. Track the percentage of correctly escalated conversations versus those that should have been escalated but weren't. Aim for an escalation accuracy of 95 percent or higher.
160 This measures Claude’s ability to recognize when a query needs human intervention and escalate appropriately. Track the percentage of correctly escalated conversations versus those that should have been escalated but weren’t. Aim for an escalation accuracy of 95 percent or higher.
161161 </Accordion>
162162</AccordionGroup>
163163
from line 165
165165
166166<AccordionGroup>
167167 <Accordion title="Sentiment maintenance">
168 This assesses Claude's ability to maintain or improve customer sentiment throughout the conversation. Use sentiment analysis tools to measure sentiment at the beginning and end of each conversation. Aim for maintained or improved sentiment in 90 percent of interactions.
168 This assesses Claude’s ability to maintain or improve customer sentiment throughout the conversation. Use sentiment analysis tools to measure sentiment at the beginning and end of each conversation. Aim for maintained or improved sentiment in 90 percent of interactions.
169169 </Accordion>
170170
171171 <Accordion title="Deflection rate">
from line 214
214214 .
215215</Tip>
216216
217It's best to break down complex prompts into subsections and write one part at a time. For each task, you might find greater success by following a step-by-step process to define the parts of the prompt Claude would need to do the task well. For this car insurance customer support example, you'll be writing piecemeal all the parts for a prompt starting with the "Greeting and general guidance" task. This also makes debugging your prompt easier as you can more quickly adjust individual parts of the overall prompt.
217It’s best to break down complex prompts into subsections and write one part at a time. For each task, you might find greater success by following a step-by-step process to define the parts of the prompt Claude would need to do the task well. For this car insurance customer support example, you’ll be writing piecemeal all the parts for a prompt starting with the “Greeting and general guidance” task. This also makes debugging your prompt easier as you can more quickly adjust individual parts of the overall prompt.
218218
219219```python
220220STATIC_GREETINGS_AND_GENERAL = """
from line 280
280280"""
281281```
282282
283Now that you have your static content, add at least 4–5 sample "good" interactions to guide Claude's responses. These examples should be representative of your ideal customer interaction and can include elements such as guardrails and tool calls.
283Now that you have your static content, add at least 4–5 sample “good” interactions to guide Claude’s responses. These examples should be representative of your ideal customer interaction and can include elements such as guardrails and tool calls.
284284
285285```python
286286EXAMPLES = """
from line 349
349349"""
350350```
351351
352Also include any important instructions outlining dos and don'ts for how Claude should interact with the customer. This might draw from brand guardrails or support policies.
352Also include any important instructions outlining dos and don’ts for how Claude should interact with the customer. This might draw from brand guardrails or support policies.
353353
354354```python
355355ADDITIONAL_GUARDRAILS = """Please adhere to the following guardrails:
from line 432
432432
433433### Deploy your prompts
434434
435It's hard to know how well your prompt works without deploying it in a test production setting and [running evaluations](https://platform.claude.com/docs/en/test-and-evaluate/develop-tests). Build a small application using the prompt, the Anthropic SDK, and Streamlit for a user interface.
435It’s hard to know how well your prompt works without deploying it in a test production setting and [running evaluations](https://platform.claude.com/docs/en/test-and-evaluate/develop-tests). Build a small application using the prompt, the Anthropic SDK, and Streamlit for a user interface.
436436
437437In a file called `chatbot.py` (or the equivalent module in your language), set up the ChatBot class, which will encapsulate the interactions with the Anthropic SDK.
438438
from line 1141
11411141
11421142#### Integrate real-time data with tool use
11431143
1144When dealing with queries that require real-time information, such as account balances or policy details, embedding-based RAG approaches are not sufficient. Instead, tool use can enhance your chatbot's ability to provide accurate, real-time responses. For example, you can use tool use to look up customer information, retrieve order details, and cancel orders on behalf of the customer.
1144When dealing with queries that require real-time information, such as account balances or policy details, embedding-based RAG approaches are not sufficient. Instead, tool use can enhance your chatbot’s ability to provide accurate, real-time responses. For example, you can use tool use to look up customer information, retrieve order details, and cancel orders on behalf of the customer.
11451145
1146This approach, outlined in the [tool use: customer service agent recipe](https://platform.claude.com/cookbook/tool-use-customer-service-agent), lets you integrate live data into Claude's responses and provide a more personalized and efficient customer experience.
1146This approach, outlined in the [tool use: customer service agent recipe](https://platform.claude.com/cookbook/tool-use-customer-service-agent), lets you integrate live data into Claude’s responses and provide a more personalized and efficient customer experience.
11471147
11481148#### Strengthen input and output guardrails
11491149
1150When deploying a chatbot, especially in customer service scenarios, it's important to prevent risks associated with misuse, out-of-scope queries, and inappropriate responses. Although Claude is inherently resilient to such scenarios, here are additional steps to strengthen your chatbot guardrails:
1150When deploying a chatbot, especially in customer service scenarios, it’s important to prevent risks associated with misuse, out-of-scope queries, and inappropriate responses. Although Claude is inherently resilient to such scenarios, here are additional steps to strengthen your chatbot guardrails:
11511151
11521152* [Reduce hallucination](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-hallucinations): Implement fact-checking mechanisms and [citations](https://platform.claude.com/cookbook/misc-using-citations) to ground responses in provided information.
1153* Cross-check information: Verify that the agent's responses align with your company's policies and known facts.
1154* Avoid contractual commitments: Ensure the agent doesn't make promises or enter into agreements it's not authorized to make.
1153* Cross-check information: Verify that the agent’s responses align with your company’s policies and known facts.
1154* Avoid contractual commitments: Ensure the agent doesn’t make promises or enter into agreements it’s not authorized to make.
11551155* [Mitigate jailbreaks](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks): Use methods such as harmlessness screens and input validation to prevent users from exploiting model vulnerabilities to generate inappropriate content.
1156* Avoid mentioning competitors: Implement a competitor mention filter to maintain brand focus and not mention any competitor's products or services.
1156* Avoid mentioning competitors: Implement a competitor mention filter to maintain brand focus and not mention any competitor’s products or services.
11571157* [Increase output consistency](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/increase-consistency): Prevent Claude from changing style or going out of character, even during long, complex interactions.
11581158* Remove personally identifiable information (PII): Unless explicitly required and authorized, strip out any PII from responses.
11591159
from line 1183
11831183
11841184Although these examples have focused on Python functions callable within a Streamlit environment, deploying Claude for a real-time support chatbot requires an API service.
11851185
1186Here's how you can approach this:
1186Here’s how you can approach this:
11871187
118811881. Create an API wrapper: Develop a simple API wrapper around your classification function. For example, you can use Flask or FastAPI to wrap your code into an HTTP service. Your HTTP service could accept the user input and return the Assistant response in its entirety. Thus, your service could have the following characteristics:
11891189
No line in this hunk matches that.