Lightweight TF-IDF retrieval-based chatbot
130
Lightweight TF-IDF retrieval chatbot container.
A lightweight, retrieval-based chatbot powered by TF‑IDF similarity and the UltraChat dataset. The bot responds to your messages by finding the most similar user input in its precomputed index and returning the corresponding assistant reply.
This image runs a Flask web service (port 5000) that exposes a single endpoint /chat.
When you send a JSON payload with a "message" field, the bot vectorises the text, compares it against 2 million user‑assistant pairs from the openbmb/UltraChat dataset, and returns the most relevant answer – or a polite fallback if the confidence is too low.
docker pull sajithjeewantha/chat-bot:v1.0
docker run --name chat-bot-live -p 5001:5000 sajithjeewantha/chat-bot:v1.0
You can also open http://localhost:5001 in a browser for a simple chat interface (if one is included).
-p 5001:5000 – maps host port 5001 to container port 5000.-d to run in the background.| Port | Purpose |
|---|---|
| 5000 | App |
| 5001 | Host |
| Variable | Default | Description |
|---|---|---|
| THRESHOLD | 0.25 | Minimum cosine similarity required to return an answer. |
| DATA_PATH | /app/pairs.jsonl | Path to the JSONL file containing the input–output pairs. |
| MAX_FEATURES | 200000 | Vocabulary size for the TF‑IDF vectorizer. |
Content type
Image
Digest
sha256:00227e013…
Size
687.4 MB
Last updated
8 months ago
docker pull sajithjeewantha/chat-bot:v1.0