An intelligent retail support chatbot built with Node.js, Express, semantic search, and embeddings.
The chatbot can be integrated with platforms such as BLiP through a webhook, allowing it to answer customer questions about products using natural language.
- Semantic product search using embeddings
- Natural language responses generated by an LLM
- Product catalog stored in a JSON dataset
- Webhook integration for chatbot platforms (BLiP)
- Simple and scalable Node.js + Express API
- Retrieval-Augmented Generation (RAG) architecture
- Conversation memory per user
- Intent detection for routing messages
User:
Do you have a white men's t-shirt?
Bot:
Yes! We have a white cotton men's t-shirt available for $49.90.The chatbot uses a simplified RAG (Retrieval-Augmented Generation) pipeline:
- The user sends a message
- The message arrives at the webhook
- The message is converted into an embedding
- The system searches for the most relevant products
- The relevant products are used as context
- The LLM generates a natural response
- The response is returned to the user
blip-llm-webhook-bot/
│
├── data/
│ └── products.json
│
├── services/
│ └── productSearch.js
│
├── scripts/
│ └── generateEmbeddings.js
│
├── routes/
│ └── webhook.js
│
├── app.js
└── package.json
Products are stored in a JSON file.
Example:
{
"id": 1,
"name": "White Men's T-Shirt",
"price": 49.90,
"description": "Basic cotton t-shirt"
}
⚠️ Note: Whenever new products are added, embeddings should be regenerated.
Clone the repository:
git clone https://github.com/Gustaavo-404/blip-llm-webhook-botEnter the project folder:
cd blip-llm-webhook-botInstall dependencies:
npm installCreate a .env file in the root directory:
PORT=3000
GITHUB_TOKEN=your_api_key_here
MODEL=your_llm_model_name_here
Whenever the product dataset changes, run:
node scripts/generateEmbeddings.jsThis generates the embeddings used for semantic search.
npm startThe server will start at:
http://localhost:3000
POST /webhook
Example request:
{
"from": "user123",
"content": "Do you have a white men's t-shirt?"
}Example response:
{
"reply": "Yes! We have a white cotton men's t-shirt available for $49.90."
}- Node.js – Runtime environment
- Express – Web framework
- Transformers.js – Local embedding generation
- Semantic Search – Product relevance matching
- RAG Architecture – Context-aware responses
- BLiP Chatbot Integration – Platform connectivity
- Vector database (Pinecone, Weaviate, Supabase)
- Product catalog connected to a real database
- Product recommendation system
- Multi-language support
- Analytics dashboard
Gustavo Dev
Systems Analysis and Development – FATEC
📝 Note: This project is designed to be easily deployable and customizable for different retail scenarios.
