Articles in this section

OpenAI and Pinecone-powered chatbot from Zendesk and Slack

This template extracts raw unstructured text and article data from Slack and Zendesk and stores it in a Pinecone vector database. Then, internal users can use Slack to send questions to integrator.io, which will:

  1. run a similarity search in Pinecone to find all relevant text/articles.
  2. send the text, articles, and questions to OpenAI's GPT-4 to get an AI-generated answer.
  3. post the answer back to Slack.
  •  

Before you begin

Check out this deep dive video from Celigo’s CTO, Scott Henderson.

thumbnail.png

Further reading

This template uses various applications and tools. Learn more about those tools here:

Supported integration flows

The Celigo quickstart bundle contains workflows you can easily configure and deploy. The following built-in flows sync from the specified source data to the corresponding destination.

Flows
Zendesk articles to Pincone knowledge base
Slack conversations to Pinecone knowledge base
Auto-respond to Slack posts with an AI-generated answer

Gather your credentials

Get your Zendesk, Pinecone, Slack, OpenAI, and SerpAPI account credentials ready:

Install the template

  1. From the integrator.io Marketplace (NA | EU), search for OpenAI.
  2. Select the AI powered chatbot template (NA | EU) and click Install.
  3. Review the template’s contents and click Install now to begin.
  4. Add your credentials.
  5. Install the template.

Configure the flows

All of your flows are disabled when first installed. After configuring the flows, you may enable them in your Flows dashboard or Flow Builder with the Off/On toggle button. then run or schedule each flow.

Zendesk articles to Pinecone knowledge base

This integration flow adds articles from Zendesk to Pinecone.

  1. Set your export to Delta, which exports only data that has changed since the last time the flow ran.
  2. The getZendeskArticles script:
    • Excludes various types of articles (drafts, segments, comments disabled)
    • Breaks large articles into smaller pieces
    • Strips HTML and turns it into plain text
    • Manages the metadata you’re storing in Pinecone
Tips:
  • Minimize the number of times that ChatGPT manipulates your data so you get fewer hallucinations. In all cases, you should keep the raw data for as long as possible.
  • Use namespaces in Pinecone to segregate and collate your data.

Important: The numTokens response mappings allow ChatGPT to measure the number of articles and their size. This helps it determine which and how many responses to choose once a question is asked.

Slack conversations to Pinecone knowledge base

This integration flow adds conversations from Slack to Pinecone.

  1. Set your export to Delta, which exports only data that has changed since the last time the flow ran.
  2. The getSlackConversations hook:
    1. Excludes various channels
  3. The serializeSlackThreads hook:
    1. Stringifies the thread, which can then be fed into Pinecone and ChatGPT
Tips:
  • Minimize the number of times that ChatGPT manipulates your data so you get fewer hallucinations. In all cases, you should keep the raw data for as long as possible.
  • Use namespaces in Pinecone to segregate and collate your data.

Important: The numTokens response mappings allow ChatGPT to measure the number of slack threads and their size. This helps it determine which and how many responses to choose once a question is asked.

Auto-respond to Slack posts with an AI-generated answer

This is the largest flow in the template and includes many configurations. For example, you can customize the flow to only search inside an article the user provides or to run a similarity search. You can also determine how many articles are used to generate your answer, the quality of the articles, and how ChatGPT provides the data back to your customers.

AI chatbot.drawio.svg

Shrinking the articles allows you to minimize the amount of text displayed.

This flow uses our flow branching and Mapper 2.0 features, among others, to allow you to create as many scenarios as you want.

The most important tips to remember are:

  • Keep OpenAI GPT’s best practices in mind.
  • Provide straightforward rules for ChatGPT to follow.
  • Utilize handlebars to make your content as dynamic as possible.
  • Test everything in pieces. You can do this right in integrator.io by previewing export and import data.
  • Future-proof your flows. Remember that you may only want to expose formal product documentation in the future instead of external and internal documentation. Use Integration Lifecycle Management (ILM) to keep backups, collaborate, and release different versions of the flows.
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.