Primechat
API DocumentsWebsiteLog in
  • START HEREđź‘‹
  • FAQ's
  • Pricing Plans
  • Getting Support
  • PLATFORM
  • Registration
  • Overview
  • Workspace & Members
  • CHATBOT GUIDE FOR BEGINNERS
  • Introduction
  • What is a chatbot
  • Benefits & importance
  • Use cases
  • FLOW BUILDER
  • Flow builder overview
  • Field variable
  • Steps
    • Steps
    • Question Step
    • Variable Operation
    • JSON Operation
    • External Request
    • Send Notification
    • Condition Step
    • Split Step
    • Go to Step
  • Sub Flow
    • Sub Flow
    • Workflow
    • Function Flow
  • CHATBOT CHANNELS
    • Omni+Channel Chabot
    • Webchat Chatbot
    • Facebook Chatbot
      • Facebook Lead Generation
    • Instagram Chatbot
    • Telegram Chatbot
    • Slack Chatbot
    • Wechat Chatbot
    • WhatsApp, SMS & Voice ChatBot
      • WhatsApp Cloud API
      • Set Up Facebook App
      • Get Your Webhook From PrimeChat
      • Start With Test Numbers
      • Build WhatsApp Chatbot With Test WhatsApp Number
      • Supported Message Types
      • Template Message
      • How To Use Template Message
      • WABA: Com Bot
    • Google Business Messenger
  • INTEGRATIONS
    • WooCommerce
    • Stripe
  • OPENAI & PRIMECHAT
    • Create chat completion
    • ChatGPT & PrimeChat Use Cases
    • How to fine-tune ChatGPT for your business
    • Generate the chatbot flow using A.I
    • Power up your live chat with the AI assistant
    • Reply to Facebook and Instagram post comments
    • OpenAI embeddings & building your knowledge base
Powered by GitBook
On this page
  • Clear Remembered Chat History
  • OpenAI Embeddings & Building Your Knowledge Base
  • Tutorials for OpenAI integration & ChatGPT integration

Was this helpful?

  1. OPENAI & PRIMECHAT

ChatGPT & PrimeChat Use Cases

PreviousCreate chat completionNextHow to fine-tune ChatGPT for your business

Last updated 1 year ago

Was this helpful?

Clear Remembered Chat History

Clear remembered history is used to delete or clear the system field where the chat history for chatGPT is stored.

This action will help you to reset the chat history.

The system field has a max character limit of 20000 characters, after which it deletes the oldest key-pair value from the JSON in order to make room for newer values

OpenAI Embeddings & Building Your Knowledge Base

OpenAI gives you the ability to provide a knowledge base of your use case or business for the AI to generate responses from. This enables the AI to give more accurate, contextual as well as particular answers instead of filtering them from the internet.

Create An Embedding:

To create an embedding, go into the Integrations and select OpenAI

Click on “New Embedding”

Type: This is an optional field. This is used to classify embeddings based on a certain context. Is used as a filter when there are a large number of embeddings associated. Always better to provide this field as it gives more context and becomes easier for AI to filter through.

Heading: The topic of the embedding that you have created. The title or summary.

Text: This is the text or main body of the embedding. The max character limit is 1000. You can put the details of the topic here for the AI to generate the response from.

Importing Embeddings:

Instead of manually creating embeddings, you can create them in bulk by importing them as a CSV file.

Click on the drop-down arrow beside “New Embedding” and click on “Import CSV”

Now import the CSV file containing the embeddings, and your embeddings will be created. If you have special characters like è à ì ù, please select to “Import from csv without preview”

Make sure that the first rows of all columns should be the input fields name such as type, heading, text etc., and none of them should start with a capital letter.

Embedding Match & Completion Actions

The embedding match action is used to match the entered prompt with the best-matching embedding from the knowledge base.

Input:

Input: This is where you will input or map the prompt you want to match the embedding to.

Response:

Embedding: The heading of the embedding the prompt is best matched to.

Text: The text of the embedding the prompt is best matched to.

Input: The prompt that you input for embedding search.

Score: This is the % of the match between the prompt and the embeddings available. You can use this score to determine whether the following prompt should be used for completion or is not sufficient and will give inaccurate answers.

It is observed that a score of 0.79 and above gives the best possible embedding match. However, this is an empirical value, and you used a split test for your use case to obtain the best possible answers.

The embedding match and completion action is used to match the entered prompt with best matching embedding from the knowledge base and then generate the response using that particular knowledge base.

Input:

Input: This is where you will input or map the prompt you want to match the embedding to.

Introduction: This is used to provide more context to the prompt, making the prompt more accurate and helping in raising the embedding match score.

Response:

Sample Response Data

{ "status": "ok", "result": { "heading": "Free trial", "text": "PrimeChat offer 14 days free trial. No credit card required, you can access to all the pro features. You can sign up here: https://www.primechat.ai/register", "score": 0.903164959234692, "input": "Free trial for primechat", "completion": " Yes, PrimeChat offers a 14-day free trial. No credit card is required and you can access all the pro features. You can sign up here: https://www.primechat.ai/register." } }

Embedding: The heading of the embedding the prompt is best matched to.

Text: The text of the embedding the prompt is best matched to.

Input: The prompt that you input for embedding search.

Score: This is the % of the match between prompt and the embeddings available. You can use this score to determine whether the following prompt should be used for completion or is not sufficient and will give inaccurate answers. It is observed that a score of 0.79 and above gives the best possible embedding match. However this is an empirical value and you used split test for your use case in order to obtain best possible answers.

Completion: This is the output or the completion of the prompt the user input.

Using OpenAI embedding to reply your Facebook & Instagram comments

If you run ads or constantly post on your Facebook page or Instagram. You may not have the time to attend to any or all comments you may receive.

You don’t want to always reply to the same generic replies, and also, you want the reply to be highly relevant to your business and the context of the question.

That’s why you need to use OpenAI embedding to provide highly relevant automated replies.

Tutorials for OpenAI integration & ChatGPT integration

We have prepared a series of courses to teach you how to build your first openAI-powered chatbot. You can see the link to learning center below.

PrimeChat Learning Centre:

Create chat completion
How to fine-tune ChatGPT for your business
Generate the chatbot flow using A.I
Power up your live chat with the AI assistant
OpenAI Training Reply to Facebook and Instagram post comments
OpenAI integration
ChatGPT integration
OpenAI text completion
OpenAI -AI image generations
OpenAI -Using embedding to build your business knowledgebase
OpenAI Training Reply to Facebook and Instagram post comments
How to fine-tune ChatGPT for your business
Create chatbot flows with ChatGPT!
Power up your live chat with the AI assistant