Skip to main content
Cohere
current

Search documentation

Type to search this documentation.

On this pageOverview

Building An Intent Recognition Classifier

Learn how to set up a chatbot to categorize customer inquiries using the Cohere SDK.

Chatbots are designed to understand and respond to human language. They need to be able to understand the text they hear and understand the context of the conversation. They also need to be able to respond to people’s questions and comments in a meaningful way. To accomplish this, chatbots must be able to recognize specific intents that people express in conversation.

Here is an example of classifying the intent of customer inquiries on an eCommerce website into Shipping and handling policy, Start return or exchange, or Track order.

Install the SDK.

$ pip install cohere

Set up the Cohere client.

import cohere  
co = cohere.Client(api_key)

These are the training examples we give the model to show the classes we want it to classify. Each example contains the text itself and the corresponding label, or class. The minimum number of examples required is five per class.

Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu