WebMind AI Agent is a Generative AI-powered web content question-answering application built using Streamlit, LangChain, Google Gemini, and FAISS.
The application extracts content from web URLs, converts the content into vector embeddings, stores them in a FAISS vector database, and allows users to ask questions about the webpage using AI.
- Load content from any website URL
- AI-powered question answering using Gemini
- Retrieval-Augmented Generation (RAG)
- Semantic search using FAISS
- Sentence Transformer embeddings
- Interactive Streamlit UI
- Displays source URLs used for answers
- Python
- Streamlit
- LangChain
- Google Gemini API
- FAISS
- HuggingFace Sentence Transformers
├── Main.py
├── env.txt
├── faiss_store.pkl
├── requirements.txt
└── README.mdInstall the following libraries before running the project:
pip install streamlit
pip install langchain
pip install langchain-community
pip install langchain-google-genai
pip install langchain-text-splitters
pip install faiss-cpu
pip install sentence-transformers
pip install python-dotenv
pip install beautifulsoup4
pip install lxmlOr install everything at once:
pip install -r requirements.txtstreamlit
langchain
langchain-community
langchain-google-genai
langchain-text-splitters
faiss-cpu
sentence-transformers
python-dotenv
beautifulsoup4
lxmlCreate a .env file in the project directory.
GOOGLE_API_KEY=your_google_api_keyGet your Gemini API key from:
https://aistudio.google.com/app/apikey
Run the Streamlit app using:
streamlit run Main.pyThe user enters a website URL in the Streamlit sidebar.
The application uses WebBaseLoader to extract webpage content.
The webpage content is divided into smaller chunks using RecursiveCharacterTextSplitter.
Text chunks are converted into embeddings using:
sentence-transformers/all-MiniLM-L6-v2Embeddings are stored in a FAISS vector database for semantic retrieval.
Users can ask questions related to the webpage content.
Relevant content is retrieved from FAISS and sent to Gemini for answer generation.
- Paste a website URL
- Click "Process URLs"
- Ask questions about the webpage
- Get AI-generated answers instantly
- What is this article about?
- Summarize the webpage
- What are the key points?
- Who is the author?
- Explain the main topic
- Multiple URL support
- PDF document support
- Chat history memory
- Advanced RAG pipeline
- Conversational AI interface
- Source citation improvements
Santhosh S S