A beginner-friendly Retrieval-Augmented Generation (RAG) project that allows users to chat with any website using Groq API and Llama 3 models.
This project demonstrates how modern AI applications like ChatGPT-style “chat with website” systems work under the hood.
- 🌐 Scrapes any website from a URL
- 🧹 Cleans and extracts readable text
- ✂️ Splits content into chunks
- 🔍 Stores embeddings in a vector database (ChromaDB)
- 🤖 Retrieves relevant context using similarity search
- 🧠 Uses Groq LLM (Llama 3) for answering questions
- 💬 Simple Streamlit UI
User enters URL
│
▼
Web Scraping (BeautifulSoup)
│
▼
Text Cleaning
│
▼
Chunking
│
▼
Embedding Generation (Sentence Transformers)
│
▼
Vector DB (ChromaDB)
│
▼
User Question
│
▼
Similarity Search (Retrieval)
│
▼
Context + Question → Groq LLM
│
▼
Generated Answer
website-qa/
│
├── app.py # Streamlit UI
├── scraper.py # Website scraping logic
├── rag.py # Chunking, embeddings, retrieval, LLM logic
├── .env.example # Environment variables template
├── .gitignore
├── requirements.txt
├── chroma_db/ # Vector database storage (ignored in git)
└── README.md
| Component | Technology |
|---|---|
| LLM | Groq API |
| Model | Llama 3 (70B / 8B) |
| Embeddings | SentenceTransformers |
| Vector DB | ChromaDB |
| Web Scraping | BeautifulSoup |
| UI | Streamlit |
| Language | Python |
git clone https://github.com/your-username/website-qa.git
cd website-qapython -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # Mac/Linuxpip install -r requirements.txtCreate a .env file in the project root:
GROQ_API_KEY=your_groq_api_keyGet your API key from the Groq Console.
Start the application:
streamlit run app.pyEnter a website URL System scrapes and cleans text Text is split into chunks Chunks are converted into embeddings Stored in ChromaDB User asks a question System retrieves relevant chunks Groq LLM generates final answer
Extracting raw HTML content from websites.
Breaking large text into LLM-friendly segments.
Converting text into numerical vectors.
Finding similar content using cosine similarity.
Combining retrieval + LLM generation.
- 🌍 Multi-page crawling
- 📚 Website sitemap support
- 🔍 Hybrid search (BM25 + vectors)
- 🧠 Better embeddings (BGE / E5 models)
- 💬 Chat memory
- 📎 Source citations in answers
- ⚡ Async scraping for speed
- 🧾 PDF + Website combined QA system
Some websites block scraping (403 / bot protection) No JavaScript rendering (no Playwright yet) Basic chunking strategy
After building this project, you understand:
How ChatGPT-style website Q&A systems work RAG architecture end-to-end Vector databases and embeddings LLM integration using Groq API Real-world GenAI app design patterns
Feel free to fork this project and improve it with:
Better retrieval strategies UI enhancements Multi-source ingestion Chat memory
Groq for fast LLM inference (https://groq.com) Meta Llama models ChromaDB for vector storage SentenceTransformers for embeddings
Built as a learning project while exploring Retrieval-Augmented Generation (RAG) and Generative AI application development.