ECE-BOT ships with three built-in hardware chatbots — MELFA, PLC, and CNC — each driven entirely by a JSON file in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Kr-Yogsa/ECE-BOT/llms.txt
Use this file to discover all available pages before exploring further.
data/ directory. No code changes are required to add a new bot or extend an existing one. The model is retrained from these files every time the application restarts, so editing the JSON and restarting the app is all it takes to change chatbot behaviour.
How the configuration works
Two layers of JSON control the hardware chatbot system.data/hardware_config.json is the registry. It lists every enabled bot with its machine ID, display name, description, and a pointer to its data file:
data/hardware_config.json
data/melfa.json) contains a system prompt (context) and an array of intents. The context is passed to Gemini when the local model falls back to the LLM. Each intent has a tag, a list of patterns (training phrases), and a list of responses:
data/melfa.json (excerpt)
Confidence threshold and Gemini fallback
The local chatbot model produces a confidence score for each user message. If that score is 0.75 or higher, ECE-BOT returns one of the matched intent’sresponses directly. If the score falls below 0.75, the query is forwarded to Gemini with the bot’s context field as the system prompt, and Gemini’s reply is returned instead.
Adding a new hardware bot
Create the bot data file
Create a new JSON file in
data/ following the same structure as the existing bot files. Set context to a description of the machine that will serve as the Gemini system prompt, then define your intents.data/laser.json
Register the bot in hardware_config.json
Add an entry for the new bot to the
hardware array in data/hardware_config.json. The id must be unique and is used as the machine identifier throughout the app.data/hardware_config.json
You can supply multiple strings in the
responses array for an intent. ECE-BOT selects one at random, which makes repeated questions feel less repetitive. Add at least two or three response variants for common intents.Intent field reference
Unique identifier for the intent within this bot’s data file. Used for logging and debugging — not shown to users.
Training phrases for this intent. Include natural language variations of how an operator might ask the same question. More patterns improve classification accuracy.
Candidate responses returned when this intent is matched above the confidence threshold. One response is chosen at random per query.