{"text": "The [Embeddings](https://platform.openai.com/docs/guides/embeddings) and [Chat](https://platform.openai.com/docs/guides/chat) endpoints are a great combination to use when building a question-answering or chatbot application.\n\n\n\nHere's how you can get started: \n\n\n1. Gather all of the information you need for your knowledge base. Use our Embeddings endpoint to make document embeddings for each section.\n2. When a user asks a question, turn it into a query embedding and use it to find the most relevant sections from your knowledge base.\n3. Use the relevant context from your knowledge base to create a prompt for the Completions endpoint, which can generate an answer for your user.\n\nWe encourage you to take a look at our **[detailed notebook](https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb)** that provides step-by-step instructions.\n\n\n\nIf you run into any issues or have questions, don't hesitate to join our \n\n\n[Community Forum](https://community.openai.com/) for help. \n\n\n\nWe're excited to see what you build!\n\n", "title": "How to Use OpenAI API for Q&A and Chatbot Apps", "article_id": "6643167", "url": "https://help.openai.com/en/articles/6643167-how-to-use-openai-api-for-q-a-and-chatbot-apps"}