==

Q-Consultation for every industry

Securely hold virtual meetings and video conferences

Learn More>

Want to learn more about our products and services?

Speak to us now

AI Enhanced Video Chat App: Introducing AI Answer Assist by QuickBlox

AI enhanced video chat app

Chat messaging may have become an indispensable part of our daily interactions, but advancements in AI technology promises to make it even smarter. We are thrilled to introduce the latest AI enhancement to Q-Consultation Lite, our open-source chat and video calling app–-AI Answer Assist. Our exciting new feature enables businesses to deliver fast and accurate responses to customer inquiries in real-time, promoting a whole new level of convenience and productivity in chat messaging. Let’s delve into the benefits of AI-powered video communication and explore how OpenAI chat completions have made it all possible.

Learn more about, Q-Consultation Lite! Free, Open Source Software

Video Conferencing with AI

We’ve all experienced the frustration of pausing mid-conversation to search for answers to questions or to clarify information. We also know how time-consuming and tedious it can be to repeat the same information to different customers over and over again.

With the introduction of AI Answer Assist, those days of interruption and monotonous tasks are over. Answer Assist is capable of providing instant, accurate, and contextually relevant responses to a wide range of queries, making chat messaging smarter and more productive than ever before.

Whether our AI-driven video call solution is being used by a doctor, sales manager, or customer support agent, its embedded Answer Assist provides support during a live chat to generate instant and accurate responses to a wide range of questions.

Learn more about, Meet Q-Consultation: Solution for Virtual Meetings and Queue Optimization

Answer assist in a few simple steps:

  • The customer / client asked a question e.g. “what are the side effects of the medicine?”
  • The app provider clicks on the Answer Assist icon and a detailed response is produced in a number of seconds.
  • The app provider can then review the response and make any desired modifications before they forward it onto their client, as if the answer came straight from them.

Answer Assist feature

Answer Assist for Business

Whatever the use case, the Answer Assist provides a host of benefits enabling service providers to respond quickly and accurately to inquiries and messages from clients, reducing response time, and increasing customer satisfaction. Other benefits include:

  • Provides instant information access, saving valuable time.
  • Enables more streamlined and focused discussions.
  • Supports professionals with a reliable source of information to back them up.
  • Facilitates seamless conversations, enhancing customer satisfaction.

Learn more about, Make a Virtual Meeting Room Application with Q-Consultation

Powered by OpenAI Chat Completions

Our AI-enhanced video conferencing solution leverages the cutting-edge technology of OpenAI, which created ChatGPT, a powerful large language model that can automatically generate text based on training data. OpenAI offers various tools for text generation, including Chat Completions which is specifically designed for chat-like interfaces. Chat completions provide accurate and contextually relevant responses in real-time. Chat completions, powered by advanced deep learning algorithms, enable the Q-Consultation’s Answer Assist to access a vast pool of knowledge and comprehend natural language, just like a human.

Here’s a breakdown of how it works:

  • Massive Language Model: OpenAI’s language model has been trained on an extensive corpus of diverse texts from the internet, allowing it to understand and recognize patterns in language with unparalleled accuracy.
  • Context Awareness: The AI model takes into account the context of the ongoing conversation, ensuring that the generated responses are not only accurate but also contextually appropriate.
  • Real-Time Interaction: The chat completions engine operates efficiently, generating responses in real-time, making the Answer Assist feature seamless and responsive during chat messaging.
  • Continuous Learning: OpenAI’s model is continuously updated and refined, enabling it to adapt to new information and improve its responses over time.

Q-Consultation App

How to Integrate Answer Assist?

The integration of OpenAI GPT into the Q-Consultation application is a relatively straightforward process. In the following we provide a brief overview of the key steps needed to help you successfully implement the AI Assist feature into your application’s interface. We will also provide a guide on optimization so that you can improve the quality of responses generated by Answer Assist to ensure more precise and relevant outcomes.

Step 1: Installing the OpenAI Node.js Library

OpenAI’s tools can be utilized through REST APIs or libraries for various programming languages. For our application the first step was to install the OpenAI Node.js Library. This library provides convenient access to the OpenAI API from Node.js applications.

The library needs to be configured with the secret key of your OpenAI account, which is available on your OpenAI account page.
In Q-Consultation Lite, we have already set everything up, so that you can simply add the API key (OPENAI_API_KEY) to the application’s config (qconsultation_config/.env).

Step 2: Utilize OpenAI Chat Completions

To create the AI Answer Assist functionality we utilized OpenAI Chat Completions and developed a function that generates a response to a single input question.

import { ChatCompletionRequestMessage } from 'openai'
import { openAIApi } from '@/services/openai'


export const createQuickAnswer = async (question: string) => {
 const messages: ChatCompletionRequestMessage[] = [
   { role: 'system', content: 'You are consulting the user.' },
   { role: 'user', content: question },
 ]
 const { data } = await openAIApi.createChatCompletion({
   messages,
   model: 'gpt-3.5-turbo',
   temperature: 0.5,
 })


 return data.choices[0]?.message?.content
}
  • GPT-3.5-turbo model
  • In this code, we used the gpt-3.5-turbo model, one of the most advanced and powerful models offered by OpenAI, providing a good balance between text generation quality and speed. It can generate readable and coherent responses with a high level of probability. If you want to further improve text generation, you can use the gpt-4 model. You can also try other models, but before doing so, make sure to review the pricing for their usage.

  • Temperature gauge
  • Additionally, we used the “temperature” parameter, which controls the degree of randomness in generating responses. The value of 0.5 used in this code is a moderate value, striking a balance between randomness and conservative text generation. The generated responses will have some variability, helping to avoid overly predictable or dull answers, while still being meaningful and contextually appropriate.

Step 3: Provide OpenAI GPT with Context

After testing this function in dialogues, we realized that it did not provide sufficiently high-quality results, so we decided to provide OpenAI GPT with the context of the conversation. Therefore, we added all the messages from the dialogue to help it quickly deliver a more relevant response. Additionally, we included the service provider’s profession and the dialogue topic to increase the accuracy of the generated responses.

import { ChatCompletionRequestMessage } from 'openai'
import { openAIApi } from '@/services/openai'


export const createQuickAnswerForDialog = async (
 profession: string,
 dialogTopic: string,
 dialogMessages: ChatCompletionRequestMessage[],
) => {
 const messages: ChatCompletionRequestMessage[] = [
   {
     role: 'system',
     content: `You are a specialist ${profession}. You are consulting the client. You were approached with an issue: "${dialogTopic}".`,
   },
   ...dialogMessages,
 ]
 const { data } = await openAIApi.createChatCompletion({
   messages,
   model: 'gpt-3.5-turbo',
   temperature: 0.5,
 })


 return data.choices[0]?.message?.content
}

Optimizing Answer Assist responses

During the implementation of this functionality, we identified the following optimization techniques to enhance the quality of answers provided by Answer Assist:

  • One of the key optimization techniques is preparing the right message history to pass to the OpenAI Chat Completion API. Include all necessary data in the history to ensure the context is complete and clear for generating a response.
  • Experiment with OpenAI model parameters, such as temperature and response length, to achieve the optimal balance between accuracy and response diversity.
  • Conduct testing and gather feedback from users to improve the quality and relevance of Answer Assist. Use this feedback for further optimization and fine-tuning of the functionality.

The integration of OpenAI GPT into the Q-Consultation application with the Answer Assist feature opens up new possibilities for enhancing communication between businesses and their customers.

ChatGPT Enhanced Video Chat from QuickBlox

Q-Consultation, built with the robust QuickBlox video SDK, and has now reached new heights in terms of efficiency, productivity, and user satisfaction. By harnessing the power of OpenAI chat completions, we have enabled a smarter, more dynamic chat experience that will undoubtedly reshape the way we communicate.

Don’t forget that we offer Q-Consultation Lite as open source software, so you can enjoy a free open source AI Assistant right at your fingertips! Happy chatting!

Resources

Read the OpenAI API Reference
Learn more about Q-Consultation in our blog.
Check out the Q-Consultation documentation.
Visit our Q-Consultation repository.

Have Questions? Need Support?

Join the QuickBlox Developer Discord Community, where you can share ideas, learn about our software, & get support.

Join QuickBlox Discord

Read More

Ready to get started?

QUICKBLOX
QuickBlox post-box