Website content chatbot/Q&A agent
Top 60.0% on sourcepulse
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
pip install -r requirements.txt
export OPENAI_API_KEY='$api_key'
python create_embeddings.py --sitemap <sitemap_url> --filter <url_filter>
python ask_question.py "Your question"
python start_chat_app.py
python create_embeddings.py -m zendesk -z "https://your.zendesk.api/"
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
1 year ago
1 week