content-chatbot  by mpaepper

Website content chatbot/Q&A agent

created 2 years ago
536 stars

Top 60.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a framework for building a question-answering chatbot or Q&A agent powered by a website's content. It targets developers and content creators looking to leverage their existing documentation or web pages for an AI-driven conversational interface, enabling users to query information and receive sourced answers.

How It Works

The core functionality relies on LangChain and OpenAI's API. The create_embeddings.py script scrapes a website's sitemap, extracts and cleans text content, splits it into manageable chunks, and generates semantic embeddings using OpenAI. These embeddings are stored in a FAISS index for efficient similarity search. The ask_question.py script queries this index to find relevant content chunks and uses OpenAI to synthesize an answer, citing the source URLs. An optional start_chat_app.py provides an interactive chat interface. An enhancement allows content ingestion directly from Zendesk via its API.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Requires an OpenAI API key, set as an environment variable: export OPENAI_API_KEY='$api_key'
  • To create embeddings: python create_embeddings.py --sitemap <sitemap_url> --filter <url_filter>
  • To query: python ask_question.py "Your question"
  • To start chat: python start_chat_app.py
  • For Zendesk: python create_embeddings.py -m zendesk -z "https://your.zendesk.api/"
  • Official blog post: [link to blog post]

Highlighted Details

  • Achieved front-page status on Hacker News (March 22nd, 2023).
  • Supports citing source URLs for answers.
  • Includes a basic interactive chat application.
  • Offers direct integration with Zendesk content via API.

Maintenance & Community

  • The project gained significant traction, indicated by its Hacker News feature.
  • No specific community channels (Discord/Slack) or roadmap are explicitly mentioned in the README.

Licensing & Compatibility

  • The README does not explicitly state a license. This requires clarification for commercial use or integration into closed-source projects.

Limitations & Caveats

  • Reliance on OpenAI API necessitates an API key and incurs associated costs.
  • The effectiveness of the chatbot is dependent on the quality and structure of the website's content and sitemap.
  • The project appears to be a demonstration, and its robustness for production environments may require further testing and development.
Health Check
Last commit

1 year ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 90 days

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP of AI at Vercel; Founder of Turborepo; Author of Formik, TSDX).

chatgpt-pgvector by gannonh

0%
938
Domain-specific chat completions app
created 2 years ago
updated 2 years ago
Feedback? Help us improve.