Skip to main content

Building a Q&A Bot Using OpenAI Assistants

Prerequisites

Step-by-Step Guide

Prepare Knowledge Files

Create or download knowledge files. For example, you can export Notion documents in markdown format and combine them into one to create a knowledge file.

Follow the Converting Notion Pages into the OpenAI Knowledge Files page to make yours.

Creating OpenAI Assistants

  1. Visit the OpenAI Assistants page and click on the Create button.

  2. Enter a name for your assistant, e.g., ACME Onboarding Assistant.

  3. Add the following instructions to the Instructions section. You can adjust the instructions for your needs.

    You are ACME onboarding assistant bot. Your primary role is to assist the ACME People Team by offering informative responses to inquiries related to new employee onboarding and existing employee questions. Please ensure your responses are based on the information contained in the provided file. If a question arises for which you do not have an answer, it's important to acknowledge — never fabricate responses.

  4. Click the Model combobox and select gpt-4-1106-preview.

  5. Tick the Retrieval checkbox and click the Add button next to the Files label. Upload your knowledge files.

  6. Click the Save button to create the assistant.

OpenAI Assistant Q&A Bot

Testing

You can test the bot using the OpenAI Playground. Click the "Test" button on the Assistant dialog's top-right corner.

What's Next

The OpenAI Assistant can be integrated into communication channels such as Slack by utilizing Runbear. Check Integrating OpenAI Assistants to learn more.