RAGOfGold is a chatbot that answers questions about gold and silver prices. It uses blog data and a smart AI model to give answers based on real information.
🖥️ Client: HTML, CSS, JS
🛠️ Server: Node, Express, Socket.io
🧠 AI & NLP: OpenAI, LangChain
📄 Text Extraction: Cheerio, SanitizeHTML
- 🔎 Collects blog posts from a website
- 🧹 Cleans the content and breaks it into smaller parts
- 🧠 Converts those parts into embeddings using OpenAI
- 📦 Stores the data in memory for fast retrieval
- 💬 Searches for the most relevant chunks when a question is asked
- 🤖 Sends those chunks to the AI to generate an answer
This was my first time trying something like this. I followed helpful guides and examples from LangChain’s official docs, just learned and built it step by step.
The front-end uses a simple chat interface made with HTML, CSS, and Socket.IO so users can chat with the bot easily.
Clone the project
git clone https://github.com/malhotraarshdeepsingh/RAGOfGold
Go to the project directory
cd RAGOfGold
Install dependencies
npm install
Add your Environment Variables
OPENAI_API_KEY=your_openai_api_key
Start the server
npm run start
To run this project, you will need to add the following environment variables to your .env file
OPENAI_API_KEY