Siddhant Kumar
Project A12 · NLP & LLM

Multilingual Chatbot.

A context-aware assistant that converses fluently across Indian languages — understanding, remembering, and replying in the user's own tongue.

Advanced 14–20 hours 23 min read LLMChatbotMultilingual
Jump to source Bill of materials
Multilingual Chatbot — reference build illustration MCU VCC · GND · SIG · NC
Difficulty
Advanced
Build time
14–20 hours
Indicative cost
Software; compute/API-dependent
Platform
CPU/GPU workstation or server (+ LLM API optional)
Category
NLP & LLM
Last updated
28 July 2026
Contents — 26 sections

Project Overview

A context-aware assistant that converses fluently across Indian languages — understanding, remembering, and replying in the user's own tongue.

India is multilingual by default — hundreds of languages, constant code-switching between English and regional tongues, and hundreds of millions of people far more comfortable in Hindi, Tamil, Bengali or Marathi than in English. A chatbot that only works well in English shuts most of them out. This project builds a multilingual chatbot that converses fluently across Indian languages: it understands the user's language, keeps track of the conversation, and replies in the same language, so people can interact naturally in their own tongue.

Two capabilities define it. The first is genuine multilingual understanding and generation — comprehending input and producing fluent replies across many languages, including the very common case of code-switching (mixing English and a regional language, or writing a regional language in Latin script). Modern multilingual language models make this feasible in one model, rather than bolting a translator onto an English bot. The second is context awareness: a real assistant remembers what was said earlier in the conversation, so it can handle follow-ups ("and what about tomorrow?") and multi-turn tasks — the difference between a conversation and a series of disconnected queries.

The value is genuinely inclusive access — services, support and information available to people in the language they actually speak. It is honest about the hard realities of Indian-language NLP: many languages are lower-resource (less training data → weaker fluency and more errors than English), script and transliteration vary (Devanagari vs romanised Hindi), dialects and code-switching are messy, and quality is uneven across languages; and, as with any chatbot, it can be confidently wrong and needs guardrails. Built honestly — a strong multilingual model, real conversation memory, and clear-eyed about the resource gap between languages — it is both a genuinely inclusive assistant and a rich lesson in multilingual, context-aware conversational AI.

A schematic of a feed-forward artificial neural network
A multilingual chatbot lets people converse in their own Indian language — inclusive access, not English-only. Photograph sourced from Wikimedia Commons — Artificial neural network.svg. Reused under the licence stated on that page; please check it before republishing.

What this project does

  • Converses fluently across multiple Indian languages
  • Understands input and replies in the user's language
  • Handles code-switching (mixed English/regional, romanised)
  • Keeps conversation context across turns (memory)
  • Handles follow-ups and multi-turn tasks
  • Makes services accessible in people's own tongue
  • Is honest about uneven quality across languages

Real-World Applications

SettingHow it is used
Inclusive customer supportHelp users in their own language.
Government / public servicesAccess to services across languages.
Education / informationAnswering questions in regional languages.
Commerce / assistantsConversational interfaces for all users.

Deployment contexts where a build of this kind earns its keep.

Features & Capabilities

  • Multilingual understanding + generation
  • Code-switching / transliteration handling
  • Conversation context/memory
  • Language detection and matching
  • Multi-turn task handling
  • Guardrails for safe replies
  • Honest about low-resource-language limits

Difficulty, Time & Required Skills

AttributeValue
Difficulty levelAdvanced
Estimated completion time14–20 hours
Indicative build costSoftware; compute/API-dependent
Primary disciplineNLP & LLM
Reference platformCPU/GPU workstation or server (+ LLM API optional)

Skills you should have (or will pick up)

  • Multilingual NLP (understanding + generation)
  • Code-switching and transliteration handling
  • Conversation state/memory management
  • Language detection and response matching
  • Guardrails and honest quality scoping

Bill of Materials

Every part below is commonly available from Indian and international hobby-electronics suppliers. Prices are indicative 2026 retail figures in Indian rupees and will drift — treat them as a budgeting guide, not a quotation.

ComponentKey specificationQtyApprox. cost
Compute + LLMCPU/GPU; a multilingual LLM (local or API)1
Multilingual modelModel with strong Indian-language coverage1
Language toolsLanguage ID, transliteration handling1
Conversation storeSession memory for context1

Estimated total: ₹0, excluding tools, shipping and consumables.

Tools and consumables

  • Soldering iron (temperature controlled, 350 °C) with 0.8 mm 60/40 or lead-free solder
  • Digital multimeter — continuity, DC volts and current ranges
  • Wire strippers, flush cutters and a small set of precision screwdrivers
  • Heat-shrink tubing and a heat gun (or a lighter, carefully)
  • A laptop with a USB port and the toolchain listed above

Hardware Specifications

This is a pure-software conversational system — no electronic hardware to specify. The "platform" is a computer plus a multilingual language model: a GPU (local model) or a hosted LLM API handles generation, and a CPU handles language detection and session management.

Memory and storage scale with concurrent conversations and retained context; a deployment adds the chat interface and a session store. Everything else is the software stack, models and libraries below.

Software Requirements & Development Environment

Reference toolchain: Python 3.11 + multilingual LLM / NLP. Anything newer normally works; anything older may lack the board definitions used here.

  • Install the Arduino IDE 2.3.x (or PlatformIO if you prefer a real editor and dependency locking).
  • Add https://espressif.github.io/arduino-esp32/package_esp32_index.json under File → Preferences → Additional Board Manager URLs, then install esp32 from the Boards Manager.
  • Set the correct port under Tools → Port. On Linux add yourself to the dialout group: sudo usermod -aG dialout $USER and log out and back in.
  • Open the Serial Monitor at 115200 baud — every sketch here logs its state there.
  • Keep File → Preferences → Show verbose output during: compilation switched on while you are debugging build errors.

Required libraries

LibraryWhy it is neededInstall
Python 3.11+Runtime for the analysis, training and service code.sudo apt install python3 python3-venv python3-pip
Hugging Face Transformers 4.44+Pre-trained language and vision transformers with a uniform API.pip install transformers
sentence-transformers 3.0+Sentence embeddings for semantic search and RAG retrieval.pip install sentence-transformers
FastAPI + Uvicorn 0.115+Typed async REST API with automatic OpenAPI docs.pip install fastapi uvicorn[standard]
SQLite 3.45+Zero-configuration embedded database for local logs.Bundled with Python (`import sqlite3`)

Block Diagram

The block diagram shows the functional decomposition of the system — what senses, what decides, what acts, and where the data ends up.

Multilingual Chatbot — system block diagramFunctional block diagram of the Multilingual Chatbot system. UnderstandUser messageany languageLanguage IDdetectContextMemoryconversationGenerateMultilingual LLMreplyGuardrailssafeRespondReplyuser's languageUpdate memorycontextrightrightnone
Multilingual Chatbot — system block diagram

Circuit Diagram & Wiring

The "wiring" is the conversation data flow — user text is language-detected, combined with conversation memory, sent to a multilingual model, and the reply is returned in the user's language.

Multilingual Chatbot — wiring schematicConnection schematic showing which controller pin drives each peripheral. Sensors / InputsControllerActuators / OutputsCPU/GPU workstationor server (+ LLM APIoptional)3.3 V logic / 5 V USBUser messageAny languageLanguage ID + memoryLang + historyMultilingual LLMReplyResponseUser's language
Multilingual Chatbot — wiring schematic
PeripheralPeripheral pinController pinSignal
User messagetextAny language
Language ID + memorycontextLang + history
Multilingual LLMgenerateReply
ResponsereplyUser's language

Wire one row at a time and tick it off — most "it does not work" reports trace back to a single swapped pair.

Wiring explanation

  • Detect the user's language (including code-switching/romanised input).
  • Combine the message with conversation memory for context.
  • Send to a multilingual model that understands and generates the language.
  • Reply in the user's language; update the conversation memory.
  • Expect uneven quality across languages — lower-resource languages are harder.
Racks of servers in a data centre
A single multilingual model understands and replies in the user's language, handling code-switching natively. Photograph sourced from Wikimedia Commons — Datacenter servers.jpg. Reused under the licence stated on that page; please check it before republishing.

System Architecture

Read the stack from the bottom up: physical hardware, the firmware that drives it, the transport that moves data off the device, and the software a human actually looks at.

Multilingual Chatbot — architecture stackLayered architecture from hardware to user interface. Hardware layerESP32 DevKit V1 (ESP-WROOM-32) · sensors and actuatorsDriver layerpython · transformers · sentencet · fastapiApplication logicsampling loop · filtering · thresholds · state machinePresentation layerlocal display · serial console · logged output
Multilingual Chatbot — architecture stack

Working Principle

The case for a multilingual chatbot in India is not a nicety, it is access: a huge share of people are far more comfortable — or only comfortable — in a regional language, and constantly code-switch (Hinglish, romanised Tamil, mixed sentences). An English-only assistant simply excludes them. So the design goal is that a user can speak in their own language, naturally, and be understood and answered in it. Meeting that goal well rests on two capabilities that must both be genuine, not faked.

The first is real multilingual understanding and generation. The naïve approach — translate the user's input to English, run an English bot, translate the reply back — is brittle: it loses nuance, mangles code-switched and romanised text, and compounds errors across two translation steps. The better approach uses a multilingual language model that natively understands and generates many languages in one model, so it can handle mixed-language input, transliteration, and idiom directly. This is what makes fluent, natural conversation across languages feasible rather than clunky.

The second is context awareness, which is what separates an assistant from a stateless query box. Real conversation is multi-turn: people ask follow-ups ("and tomorrow?"), refer back ("the first option"), and carry a task across several messages. A useful chatbot therefore maintains memory of the conversation — the history (or a summary of it) that is supplied as context on each turn — so it can resolve references, keep track of the task, and respond coherently over many turns. Without this, every message is an island and the "conversation" is an illusion.

The honesty this project requires is about the uneven reality of Indian-language NLP. Languages differ enormously in resource level: English and major languages like Hindi have abundant training data and strong model quality, while many Indian languages are lower-resource, with less data and correspondingly weaker fluency and more errors — quality is genuinely uneven across languages, and it is dishonest to claim uniform excellence. Script and transliteration add friction (Hindi in Devanagari vs romanised "kya haal hai"), dialects and code-switching are messy and underrepresented in training data, and — as with any LLM chatbot — the model can be confidently wrong, so guardrails and honest handling of uncertainty are needed regardless of language. A well-built system therefore uses a strong multilingual model, maintains real conversation memory, and is transparent about which languages it serves well and where quality drops — degrading gracefully rather than pretending. Built that way, it delivers real inclusive value (natural access to information and services in people's own languages) while teaching the substance of multilingual, context-aware conversational AI, resource gaps and all.

The maths behind it

Understand + respond in-language

plainUnderstand + respond in-language
lang = detect(user_message)         # incl. code-switching/romanised
reply = multilingual_LLM(context + user_message, target=lang)

Reply in the USER's language. One multilingual model, not a
translate→English-bot→translate bolt-on.

Context (memory) per turn

plainContext (memory) per turn
context = history (or summary) of the conversation
reply_t = LLM(context_{<t} + message_t)
update: history += (message_t, reply_t)

Enables follow-ups/references — a conversation, not islands.

Honest quality by resource level

plainHonest quality by resource level
quality(lang) ↑ with training data for that language
  high-resource (English/Hindi) → strong
  low-resource                  → weaker, more errors

Be transparent; degrade gracefully; add guardrails.

Program Flowchart

The firmware is a single cooperative loop. Nothing blocks for long, so networking, sensing and the user interface all stay responsive.

Multilingual Chatbot — firmware flowchartControl flow through the main program loop. User sends a messageDetect language (+code-switching)Add conversation memory(context)Multilingual model generatesreplyReply safe + in user'slanguage?Send reply; update memoryGuardrail / clarifyGuardrail / clarifySend reply; update memoryAwait next turn
Multilingual Chatbot — firmware flowchart

Assembly Instructions

Build on a breadboard first and only commit to solder once the whole system has run for an hour without a fault.

  1. Set up multilingual understanding + generation

    Use a strong multilingual model to understand input (including code-switching/romanised) and reply in the user's language — one model, not a translate bolt-on.

  2. Add conversation memory

    Maintain conversation history (or a rolling summary) so the bot handles follow-ups and multi-turn tasks.

  3. Detect language and guardrail

    Detect the user's language (handling romanised/mixed input), reply in it, and apply safety guardrails.

Step-by-Step Implementation Guide

Work through these in order. Each step ends in something you can observe, so a failure is always localised to the step you just finished.

  1. Detect language, use context, reply in-language

    Detect the user's language, add conversation context, and generate a reply in that language with a multilingual model.

    pythonchat.py
    class Chat:
        def __init__(self, llm, detect):
            self.llm, self.detect = llm, detect
            self.history = []                          # conversation memory
    
        def reply(self, message):
            lang = self.detect(message)                # code-switching aware
            context = summarise(self.history)          # context across turns
            prompt = (f"Reply in the user's language ({lang}); be honest if unsure.\n"
                      f"{context}\nUser: {message}")
            out = self.llm.generate(prompt)            # multilingual generation
            self.history.append((message, out))        # remember for follow-ups
            return out
    lang = self.detect(message) # code-switching awareDetecting the user's language (including mixed/romanised input) lets the bot reply in the tongue they actually used.
    context = summarise(self.history) # context across turnsConversation memory is supplied as context so follow-ups and references resolve — the difference between a conversation and disconnected queries.
    out = self.llm.generate(prompt) # multilingual generationOne multilingual model understands and generates the language directly, avoiding the brittle translate-then-English-bot approach.
    self.history.append((message, out)) # remember for follow-upsEach turn is remembered so the next turn has context — real multi-turn conversation.
  2. Guardrail and be transparent about quality

    Apply safety guardrails to every language and be transparent where quality drops for lower-resource languages, degrading gracefully.

Complete Source Code

The listing below is complete and compiles as written — there are no elided sections. Read the annotations under each block before you upload it.

pythonmultilingual_chatbot.py
#!/usr/bin/env python3
"""
Multilingual Chatbot (context-aware)

Converses across Indian languages: detects the user's language (incl.
code-switching/romanised), keeps CONVERSATION MEMORY for follow-ups,
and replies IN THE USER'S LANGUAGE with a single multilingual model.
Quality is uneven across languages — be transparent and guardrail replies.
"""
class MultilingualChatbot:
    def __init__(self, llm, detect_lang, guard):
        self.llm = llm; self.detect = detect_lang; self.guard = guard
        self.history = []                              # conversation memory

    def reply(self, message):
        if not self.guard.input_ok(message):
            return self.guard.refusal(self.detect(message))

        lang = self.detect(message)                    # code-switching aware
        context = self._context()                       # multi-turn memory
        prompt = (
            "You are a helpful, honest assistant. "
            f"Reply in the user's language ({lang}). If unsure, say so.\n\n"
            f"{context}\nUser: {message}\nAssistant:")
        out = self.llm.generate(prompt)                 # multilingual generation
        out = self.guard.output_filter(out)             # safety, every language
        self.history.append((message, out))             # remember the turn
        return out                                      # in the user's language

    def _context(self):
        # supply recent history (or a summary) so references/follow-ups work
        recent = self.history[-6:]
        return "\n".join(f"User: {u}\nAssistant: {a}" for u, a in recent)

if __name__ == "__main__":
    bot = MultilingualChatbot(MultilingualLLM(), detect_language, Guardrails())
    # bot.reply("kal ka weather kaisa hai?")  # code-switched Hindi/English
    # Serves high-resource languages well; lower-resource langs are weaker —
    # be transparent and degrade gracefully.
if not self.guard.input_ok(message):Guardrails apply to every language, since the model can be confidently wrong or misused regardless of tongue.
lang = self.detect(message) # code-switching awareLanguage detection handles code-switched and romanised input, so the bot replies in the language the user actually used.
context = self._context() # multi-turn memoryConversation memory gives the model context, enabling follow-ups and references — a real assistant, not a stateless box.
out = self.llm.generate(prompt) # multilingual generationA single multilingual model generates the reply directly, avoiding the lossy translate-to-English-and-back pattern.
# be transparent and degrade gracefully.The honest reality — strong for high-resource languages, weaker for low-resource ones — is acknowledged rather than hidden.

Configuration & Calibration

Configuration steps

  • Configure the multilingual model and supported languages.
  • Configure language detection (including romanised/mixed input).
  • Configure conversation memory (history/summary length).
  • Configure guardrails and per-language quality expectations.

Calibration procedure

An uncalibrated sensor produces confident, precise, wrong numbers. Do this once per physical unit and record the constants.

  1. Language coverage

    Test understanding/generation per language and code-switching; map quality honestly.

  2. Context

    Verify follow-ups and references resolve using memory.

  3. Safety

    Check guardrails work across languages, not just English.

Dataset, Model & Training

Dataset

A multilingual LLM (pretrained on many languages) provides understanding/generation; Indian-language coverage and code-switching data determine quality.

Optional domain/dialogue data and transliteration resources improve specific languages.

DatasetSizeLicenceUse here
Multilingual LLM (pretrained)LargeModel termsUnderstanding + generation
Indian-language coverageUnevenModel termsPer-language quality
Code-switch / romanised dataScarcerVariesMixed-language robustness
Domain dialogue dataOptionalYoursTask/domain tuning

Data preprocessing

  • Detect language (handle romanised/mixed input); normalise script where needed.
  • Assemble conversation context (history or summary) within the context window.
  • Apply guardrails/safety filtering to input and output.
Multilingual Chatbot — ML pipelineFrom raw data through training to deployed inference. 1Messageany language2Language IDdetect3Contextmemory4Multilingual LLMgenerate5Replyin-language
Multilingual Chatbot — ML pipeline
Layer / stageShape or configurationPurpose
Language IDdetect + romanised/mixedKnow the user's language
Memoryhistory / rolling summaryContext across turns
Multilingual modelone model, many languagesUnderstand + reply in-language
Guardrailssafety/uncertaintySafe, honest replies
Quality mapper-language expectationsTransparent, graceful degradation

Hyperparameters

HyperparameterValueWhy
Modelstrong multilingualIndian-language coverage
Context lengthhistory/summary fitMemory vs cost
TemperaturemoderateFluency vs reliability
GuardrailsonSafety regardless of language

Training process

  • Primarily use a capable pretrained multilingual model; fine-tune for domain/dialogue if needed.
  • Add code-switch/romanised and low-resource examples where possible.
  • Evaluate per language; be transparent about quality differences.

Evaluation, Metrics & Deployment

Quality must be judged per language, not overall — the honest picture is strong for high-resource languages and weaker for low-resource ones, plus context-handling quality.

MetricValueWhat it tells you
Per-language fluencyuneven (honest)High vs low-resource
Context handlingmulti-turnFollow-ups/references
Code-switch robustnesstargetMixed/romanised input
SafetyguardrailedAcross all languages

Figures from the reference training run described above — reproduce them before trusting your own changes.

Quality by language resource levelFluency is strong for high-resource languages and drops for lower-resource ones — the honest reality of Indian-language NLP (illustrative). English94 %Hindi86 %Major regional76 %Low-resource58 %
Quality by language resource level

Inference example

pythonchatbot.py
class MultilingualChat:
    def __init__(self, llm, detect):
        self.llm = llm; self.detect = detect
        self.history = []                          # conversation memory

    def reply(self, message):
        lang = self.detect(message)                # incl. code-switching
        context = summarise(self.history)          # context across turns
        prompt = (f"You are a helpful assistant. Reply in the user's "
                  f"language ({lang}). Be honest if unsure.\n"
                  f"Conversation so far:\n{context}\n\nUser: {message}")
        out = self.llm.generate(prompt)            # multilingual model
        self.history.append((message, out))        # remember the turn
        return out                                 # reply in the user's language
        # Quality is uneven across languages; low-resource langs are weaker.

Testing Procedure & Expected Output

Test from the bottom up. Confirm power, then each sensor in isolation, then the integrated loop — the first failing step tells you exactly where to look.

TestWhat you should see
Chat in HindiFluent, in-language reply
Code-switch (Hinglish)Understood; replies appropriately
Ask a follow-upUses context correctly
Chat in a low-resource languageWorks but weaker — honest quality
Romanised regional inputHandled (transliteration)
Unsafe requestGuardrail refuses in-language

Bench-test checklist. If a row fails, stop and fix it before moving on.

Expected output

Fluent, context-aware replies in the user's language, with honest quality across the resource spectrum.

jsonchat-turn.json
{
  "user": "kal ka weather kaisa rahega?",
  "detected_language": "hi (romanised, code-switched)",
  "reply": "कल मौसम साफ़ रहने की संभावना है...",
  "used_context": true,
  "note": "high-resource langs strong; low-resource weaker"
}

A code-switched, romanised Hindi question understood and answered fluently in Hindi, using conversation context — natural access in the user's own language, with honest expectations across languages.

A city skyline at night
Quality is uneven — high-resource languages are strong, low-resource ones weaker — so honesty and guardrails matter. Photograph sourced from Wikimedia Commons — Smart city.jpg. Reused under the licence stated on that page; please check it before republishing.

Troubleshooting: Common Errors & Fixes

Replies in the wrong language

Likely cause. Detection/instruction

Fix. Improve language ID; instruct reply-in-user-language

Loses the thread

Likely cause. No/short memory

Fix. Add conversation history/summary as context

Weak in some languages

Likely cause. Low-resource

Fix. Use a stronger multilingual model; be transparent; degrade gracefully

Mangles code-switching

Likely cause. Translate bolt-on / poor data

Fix. Use a native multilingual model; add mixed-language handling

Confidently wrong

Likely cause. LLM limitation

Fix. Guardrails; express uncertainty; ground where possible

Unsafe in non-English

Likely cause. English-only guardrails

Fix. Guardrail across all languages

The sketch will not upload — "Failed to connect" or "avrdude: stk500_recv()"

Likely cause. The bootloader is not being reached: wrong port, wrong board, a serial monitor holding the port open, or a USB cable that only carries power.

Fix. Close every serial monitor, confirm Tools → Board and Port, and swap to a known data-capable USB cable. On an ESP32 hold BOOT while the IDE prints "Connecting…", then release. If a peripheral is wired to the UART pins (GPIO 1/3 on ESP32, D0/D1 on Uno) unplug it — it fights the programmer.

The board resets in a loop, or the serial monitor prints "Brownout detector was triggered"

Likely cause. The supply cannot deliver peak current. Wi-Fi transmit bursts, relay coils and servos all pull far more than their average draw.

Fix. Power peripherals from a separate regulated supply with a common ground rather than from the board 5 V pin. Add a 470–1000 µF electrolytic capacitor across the supply near the load, and use a real power adapter rather than a laptop USB port.

Serial monitor shows garbage characters

Likely cause. Baud rate mismatch between Serial.begin() and the monitor, or a floating/shared UART line.

Fix. Set the monitor to 115200 to match the sketch. If it still garbles, the crystal or the USB bridge is being confused by noise — shorten the cable and keep motor wiring away from the USB lead.

Performance Optimisation

  • Use one strong multilingual model, not a translate bolt-on.
  • Maintain conversation memory for real multi-turn dialogue.
  • Handle code-switching and romanised input in detection.
  • Be transparent about uneven per-language quality; guardrail all languages.
  • Replace every delay() with a millis() comparison — blocking delays are the single most common cause of dropped readings.
  • Sample sensors on a fixed cadence and publish on a slower one; you almost never need to transmit at the sampling rate.
  • Move networking into its own FreeRTOS task so a slow DNS lookup cannot stall the control loop.
  • Use uint8_t / uint16_t where the range allows; on an 8-bit AVR a 32-bit add costs four times as much.
  • Profile before optimising — print micros() deltas around each stage and fix the slowest one first.

Safety Precautions

  • The model can be confidently wrong in any language — apply guardrails across all languages, not just English.
  • Be transparent about which languages are served well; do not claim uniform quality.
  • Conversations may contain personal data — handle securely and lawfully.
  • Provide human fallback for high-stakes interactions.
  • Wear eye protection when soldering or cutting, and solder in a ventilated space — rosin flux fumes are a respiratory irritant.
  • Power the circuit through a bench supply with a current limit while you are testing. A 300 mA limit turns a wiring mistake into a beep instead of a dead board.
  • Disconnect power before changing any wiring. Hot-plugging a sensor onto a live bus is the fastest way to lose a controller.

Maintenance

  • Improve coverage for lower-resource languages over time.
  • Re-evaluate per-language quality as models improve.
  • Update guardrails and language detection.
  • Monitor conversations for failures and drift.
  • Re-check every screw terminal and header after the first week — thermal cycling loosens connections that felt tight on day one.
  • Recalibrate at the interval given in the calibration section, and keep the constants in a text file next to the firmware — not only in flash.
  • Keep a short logbook of firmware versions and what changed. Six months later you will not remember why that constant is 1.083.

Future Improvements & Upgrades

A working v1 is a platform, not a finish line. These are the upgrades that add the most capability for the least rework.

  • Add speech in/out for spoken multilingual interaction.
  • Add RAG for grounded, domain-specific answers.
  • Add more languages/dialects and better code-switching.
  • Add per-language quality indicators to users.
  • Design a proper PCB. Once the breadboard version has run for a month, moving to a two-layer board removes the intermittent-contact failures that dominate prototype faults.
  • Add connectivity — an ESP32 and an MQTT publish turn a local gadget into something you can graph, alert on and analyse over months.
  • Add persistent local storage (microSD or the on-chip flash) so a network outage does not create a hole in your data.
  • Move configuration out of the source: a captive-portal setup page or a JSON config file makes the build reusable without a recompile.
  • Add a battery and solar option so the unit survives a power cut and can be sited away from a socket.
  • Write a small test harness that feeds synthetic sensor values through the decision logic, so you can validate thresholds without physically triggering the event.

Frequently Asked Questions

Why not translate to English and use an English bot?

Because that bolt-on is brittle: it loses nuance, mangles code-switched and romanised text, and compounds errors across two translation steps. A single multilingual model understands and generates the language natively, giving far more fluent, natural conversation.

What makes it context-aware?

It keeps a memory of the conversation (the history or a summary) supplied as context each turn, so it resolves follow-ups and references and carries a task across messages — the difference between a conversation and disconnected queries.

Why is quality uneven across languages?

Because languages differ hugely in training data. English and major languages like Hindi are high-resource and strong; many Indian languages are lower-resource, with less data and correspondingly weaker fluency and more errors. Honesty about this is part of the design.

Does it handle Hinglish and romanised text?

It should — code-switching and romanised regional languages are extremely common in India, so language detection and the model must handle mixed and Latin-script input, though these are messier and less represented in training data.

Can I trust its answers?

As with any LLM chatbot, it can be confidently wrong, so it needs guardrails and honest handling of uncertainty in every language — and a human fallback for high-stakes interactions.

References & Learning Resources

These are the primary sources worth reading in full. Manufacturer datasheets always outrank forum posts when the two disagree.

  1. Multilingual NLPReference
  2. Code-switching (linguistics)Reference
  3. Low-resource languages / NLPReference
  4. Large language modelsReference
  5. Languages of IndiaReference