How to create an AI Chatbot

A common use case for generative text is retrieving information. However, sometimes the models don’t have information that we want them to “know,” so when we ask it a model the pertinent questions they hallucinate information which is false.

One method for fixing this is “retrieval augmentation,” or combining the generative model with a database of information we know is valid. We can search this valid information and put it in the prompt directly to make sure the language model has what it needs to be effective.

The process below shows you how to use a no-code tool that provides an easy-to-use wrapper around this process. For a specific use case in your organization, you would probably need to build something customized, but the process we will go through here will get you familiar with the basic steps involved and the overall concept.

Embedding personal data into AI:

MyAskAI - A no-code tool for combining your data with ChatGPT

First, get familiar with the general functionality of MyAskAI by watching their video tutorial on YouTube. Then follow these steps:

Step 1: Create an account on MyAskAI

  • Answer all the generic introductory questions.

Step 2: Upload documents which you want the AI to reflect on

Keep in mind:

  • Avoid using PDFs if possible. PDFs are images and need to be converted before use, so you can lose important information. Its better to work from .doc or .txt files directly if you are able.
  • You can upload webpage content for the AI to integrate, but the AI will only read the content off of that page and not any pages referenced on the link.
  • You can upload only three documents on the free plan.

Once you're done, click ‘Build my AskAI’.

Step 3: Initial testing

  1. Try different questions which the AI should know the answer to if it read the content.
  2. Document when it fails.
  3. For failures, create a new document. Write the failed question, followed by the correct answer. Copy and paste both the question and answer three times over and over. Add this document as one of the documents you initially uploaded. This ‘forces’ the model to answer correctly.

Step 4: Improving the chat outputs

  1. In cases where the AI failed, create a separate text document (.txt or .docx). Write down the prompt which caused the AI to fail, and then write the right answer. Copy and paste this prompt + correct answer” pairing in the document three times.
  2. Save this document on your computer.
  3. Upload this document as one of the documents on MyAskAI which AI will respond to. To do so, go to the page with your personalized AI >>> Customize (top-right corner) >>> Add more content. Note: If you're using the free version, you will need to delete one of your original documents to upload a new document.
  4. Click again on ‘Build MyAskAI’.
  5. Check if the AI has learned the better response.

Step 5: ‘Red teaming’

  1. Intentionally try to ‘break’ the MyAskAI bot by asking it questions which may provide incorrect or inappropriate answers.
  2. Repeat Step 4 with the correct responses to these questions. You can upload these to the same document you used previously.