PitchHut logo
content-chatbot
Transform your website's content into an interactive Q&A chatbot.
Pitch

This project enables the conversion of website content into an intelligent chatbot or Q&A agent. Utilizing tools like Langchain and the OpenAI API, it provides an effective way to engage users with direct, sourced responses to their questions, enhancing content accessibility and user interaction.

Description

The content-chatbot repository provides a powerful solution for transforming your website's content into an interactive chatbot or a Q&A agent. Leveraging the capabilities of LangChain and the OpenAI API, this project enables users to create a conversational interface that cites document sources.

Key Features

  • Website Content to Chatbot: Seamlessly integrate your site’s information to enable users to ask questions and receive informative answers.
  • Interactive Chat Interface: Engage users in a conversation style, making information retrieval more dynamic and user-friendly.
  • Document Citation: Each answer provided by the chatbot references the original source, ensuring credibility and transparency.

How It Works

This repository contains three essential scripts that facilitate the process:

  1. create_embeddings.py: This script processes your website's sitemap.xml, generating embeddings (vector representations) of your content for question answering.
  2. ask_question.py: After generating embeddings, this script allows users to pose questions and returns answers along with the URLs from your site that were consulted.
  3. start_chat_app.py: Launches a straightforward chat interface where users can ask questions and receive responses. The bot also indicates uncertainty when applicable, providing an additional layer of interactivity.

Creating Your Embeddings

To begin utilizing the chatbot, users must generate embeddings from their website content. The process involves:

  • Obtaining an OpenAI API key and setting it in the terminal.
  • Running the following command to create embeddings:
    python create_embeddings.py --sitemap https://path/to/your/sitemap.xml --filter https://path/to/your/blog/posts
    

This command will create a file named faiss_store.pkl, containing your embeddings.

Asking Questions

With the embeddings in place, querying the bot is straightforward. An example command is:

python ask_question.py "How to detect objects in images?"

This returns concise answers along with the relevant source URLs, enhancing user experience and facilitating knowledge sharing.

Starting a Chatbot

To activate the chatbot functionality, run:

python start_chat_app.py

Once operational, users can pose questions and engage with the chatbot for follow-up queries.

Zendesk Content Embedding

In addition to the main features, this repository offers enhanced integration with Zendesk through the create_embeddings for Zendesk functionality. This involves using the Zendesk API to source articles and construct a Faiss knowledge base, thereby improving chatbot responses.

Usage of Zendesk Feature

To utilize this feature, users must:

  • Obtain Zendesk API credentials and configure them appropriately.
  • Run the following command to generate the Faiss store from Zendesk content:
    python create_embeddings.py -m zendesk -z "https://your.zendesk.api/"  # Replace the link
    

Explore the potential of your content by transforming your website into an interactive chatbot and improving user engagement with the content-chatbot project.

0 comments

No comments yet.

Sign in to be the first to comment.