Author: Sreekumar Kj

  • RabbitMQ installation fails in in the last leg of setting up in ubuntu 20.04

    Error:

    Setting up rabbitmq-server (3.8.16-1) …
    Job for rabbitmq-server.service failed because the control process exited with 
    error code.
    See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript rabbitmq-server, action "start" failed.

    Reason: libtinfo.so library missing.

    Solution:

    sudo apt install libncurses5

    Note: No need to reattempt the installation.

  • An “eat dosa!” reminder for busy kids 🙂

    Here is a one hour HTML app that you can use to repeat recorded audio to remind your busy kids they have to finish that food on the table, while watching their favorite videos on YouTube.

    Launch Dosa Reminder HTML App

    To use the app is this simple –

    • Click on record button. Give permission to access microphone if it asks for it.
    • The recording automatically stops in 4 seconds and replays what it recorded. You can re-record till you are satisfied with the playback.
    • Now you can set the number of seconds of interval, between which the above audio has to be repeated.
    • Click on “Start Reminder” button to start the reminders.
    • When your kid is done eating, you can stop the reminders by clicking “Stop Reminder” button

    Happy parenting !

  • Enable dark mode for Chrome on desktop

    Here is how you can apply dark more on chrome on your desktop –

    • In the address bar paste this address : chrome://flags/#enable-force-dark
    • Change the setting “Force Dark Mode for Web Contents” from default to “enabled”

    That’s it. Now you can have easy on eyes theme on Chrome, just like your IDE !

  • NPM install gives error : Cannot find module ‘semver’

    Problem:
    We get this error when we do npm install –

    Error: Cannot find module ‘semver’
    Require stack:

    • /usr/share/npm/lib/utils/unsupported.js
    • /usr/share/npm/bin/npm-cli.js
      at Function.Module._resolveFilename (node:internal/modules/cjs/loader:924:15)
      at Function.Module._load (node:internal/modules/cjs/loader:769:27)
      at Module.require (node:internal/modules/cjs/loader:996:19)
      at require (node:internal/modules/cjs/helpers:92:18)
      at Object. (/usr/share/npm/lib/utils/unsupported.js:2:14)


    Reason:
    Version issues

    Fix:
    Run these commands

    sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* ~/.npm
    sudo rm -rf /usr/local/lib/node*
    sudo rm -rf /usr/local/bin/node*
    sudo rm -rf /usr/local/include/node*
    
    sudo apt-get purge nodejs npm
    sudo apt autoremove
    sudo apt-get install nodejs npm

    Try now. Should be fixed !

    Note: In case the version didn’t get updated even after following the above command use these set of commands:

    sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* ~/.npm
    sudo rm -rf /usr/local/lib/node*
    sudo rm -rf /usr/local/bin/node*
    sudo rm -rf /usr/local/include/node*
    
    sudo apt-get purge nodejs npm
    sudo apt autoremove
    
    Download the latest installable archive for your OS from https://nodejs.org/en/download/
    
    tar -xf your-archiveFile
    sudo mv extracted-archiveFolder-name/bin/* /usr/local/bin/
    sudo mv extracted-archiveFolder-name/lib/node_modules/ /usr/local/lib/
  • Fix : Docker node down after restartIP Telephony – bit rates of audio formats, and other notes

    The bit rates for the most common audio formats –

    ALAW8 BITS
    ULAW8 BITS
    PCM16 BITS SIGNED/UNSIGNED
    ADPCM8 BITS

    The endian-ness for more than one byte systems:

    Motorola ProcessorsBig Endian
    Intel ProcessorsSmall Endian
  • Cannot connect to DB from a process inside Docker container ? This could fix it.

    I had recently hit a blocker to production deployment, when my processes just won’t connect to my Cassandra DB from within their containers.

    This is how I could fix it –

    • Start by checking if the target port is open. For eg, if it is the Cassandra DB that the processes cannot access, make sure that its host port 9042 is not blocked by any firewall rules (or security group settings in case of AWS)
    • From the host machine where your docker’ed process has a connectivity issue, use telnet or netcat to check if you can access the target machine and port.
     nc -vz dbhost 9042
    • Once you verify that you can access the port of the service you want to access, from the host machine where your docker process is failing, and still the problem persists, do these steps-
    • Verify the IP address of the problem container –
    docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' your-container-name-or-id
    172.32.15.36
    • If the IP address so obtained is found to be conflicting with the IP addresses of your network, provide a new sub-net for the the docker containers within the host as below-
      • vim /etc/docker/daemon.js
      • Add the following lines with the subnet address of your preference
    {
    "bip": "10.0.0.1/16"
    }
    • Restart docker service and start your containers.
    • Check your connectivity issue is solved.
    • If your application still cannot connect to your target service, lets reset docker by deleting the docker inventories and restarting it-
    sudo service docker stop

    sudo rm -rf /var/lib/docker

    sudo service docker start

    #init your swarm if needed
    docker swarm init

    pull your images

    start your containers
    • The above steps usually fixes the faulty bridge network created previously by deleting and recreating it.

  • Make a new disk available in Ubuntu on AWS or Azure

    To make a new disk you just added to the Ubuntu device, please go through the following steps –

    Check whats the /dev path of the disk. On terminal, run-

    lsblk
    
    NAME        MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    loop0         7:0    0  97M  1 loop /snap/core/9289
    loop1         7:1    0  18M  1 loop /snap/amazon-ssm-agent/1566
    nvme0n1     259:0    0   1T  0 disk 
    nvme1n1     259:1    0  10G  0 disk 
    

    You would have got a result as above. ( In Azure the disk names are the usual sda, sdb etc, unlike the nvme* in AWS.)

    In this case, the disk I wanted add is the 1 TB disk, which is /dev/nvme0n1

    Format the disk with a new compatible filesystem (XFS).

    sudo mkfs -t xfs /dev/nvme0n1

    Wait for the file-system creation to finish.

    sudo mkdir /data
    sudo mount /dev/nvme0n1 /data
    sudo cp /etc/fstab /etc/fstab.orig
    sudo blkid
    

    From the output of the last command, find the UUID of your disk

    sudo vim /etc/fstab

    Append the line –

    UUID=[your disk's UUID]  /data  xfs  defaults,nofail  0  2

    Note that in the above replace your disk’s UUID without the square brackets, and save the file.

    sudo umount /data
    sudo mount -a
    df -h

    Verify that /data is listed as a disk in the last command. If not, please check the /etc/fstab file, apply correction of UUID, spaces etc, and repeat the above test block again.

  • host-name getting reset after a reboot

    Problem:

    The newly set hostname reverts back to older one after reboot

    Reason :

    Hostname is reset by cloud-init

    Solution :

    Inactivate cloud-init.

    On terminal, key in –

    [bash] hostnamectl set-hostname YourNewHostName sudo touch /etc/cloud/cloud-init.disabled sudo reboot [/bash]

  • Planning conversational Automation – Here’s what you should look for !Machine Learning – the basics

    dhee । தீ । ধী । ధీ । धी । ಧೀ । ധീ । ઘી । ଢ଼ୀ

    Are you planning to bring in conversational automation using AI to make your processes more cost effective and consistent ? There are certain things I would like to share with you from my few years experience on-boarding customers to conversational AI platforms. These can be used as high levels checkpoints to save ourselves from getting into avoidable activity traps or creating bots that fail to attract customer interest. Goal thus, is to gain high ROI on your time and money invested for adopting AI supported processes.

    Identifying the right platform or vendor

    This one decision will determine how easy or difficult your overall journey of adopting a virtual conversational agent is going to be. These are the questions that can help one choosing a right AI partner –

    Do they own the NLP and dialogue automation stack ?

    NLP is the fundamental layer every conversational bot depends on. Having an in-house developed stack for these functions provides a high level of adaptability to the vendor in supporting your use cases.

    You might already be aware that usually a virtual agent can be trained only for about 60-70% of user queries and variations at the time it is released to the public. As the usage increases and the gaps in training are identified, the bot achieves higher and higher accuracy by a systematic retraining process employed by your vendor. Many times, such remediation will require a change or a retraining of the underlying NLP and NLU modules too. Unless your vendor has the capability to do that, you might have to live with a lot of gaps in your conversational automation.

    Can they support the languages your customers would wish to converse in ?

    The conversational AI technology is language dependent. Almost every attempt to make it language independent using a translation layer above a “single language stack”, has been shoddy when it came to user interactions in the non-main language.

    You should definitely go for the vendor who has the NLP , NLU and dialogue-automation capabilities for each of the natural languages you wish to support for your customers.

    How seamless or sticky is the on-boarding process ?

    Does your vendor need you to annotate your data before they can automate your process ? Do they ask your engineers to learn their stack for creating intent automation ?

    While doing things yourselves might be exciting when you begin, (and might even work if yours is a small business with a single user intent), it can soon grow into a pain especially when your use cases grow and your processes changes.

    It is better to work with a vendor who would understand the user facing processes you want to automate, and then on will do all the bot training and preparation without your active involvement. Also designing a flexible dialog is an art and its always better a more experienced person on the automation stack works on it, rather than you having to train some of your employees for the same.

    How many channels of interaction can they support ?

    Although you might start off with conversational automation as a chat-bot on your website or app, it’s very likely you would quickly want to deliver the same automation to work with your customers on other channels, like Facebook messenger, Whatsapp, VoIP (or telephone call), Smart IOT devices etc.

    The vendor you choose should be able to provide these value added channels seamlessly as and when you are ready to absorb them into your business processes.

    Do they have continuous learning employed for your bot ?

    Most providers do have a continuous learning process employed for their conversational bots. This is very important for the user experience of your bot to improve with time. Nonetheless, its always better to make sure your prospective vendor has such a process, and even better, they provide it to you free of cost (as a part of the sales contract).

    Do they provide statistics of bot usage ?

    Its important that you be able to see the bot usage, number of human interventions, intent wise distribution etc to understand the impact the bot is making to your business. The vendor should ideally provide you with detailed analytics portal where you can see the vitals and key performance indices of your bot. Depending on your business the KPI may be total sales generated, total appointments booked etc.

    Can a human supervisor intervene when needed ?

    When we release an AI to serve your customers, it’s always possible that a user is going to have a query which the bot is not trained to answer. It’s good from user experience perspective that the AI can at this point, transfer the conversation for attendance by a human supervisor, who can answer this query (or a series of related queries) and then handover the conversation back to the AI.

    Additionally its desirable that the users be able to talk to human supervisors whenever they demand so.

    Can they support visual interaction ?

    If you want to engage your customers via visual medium too, your vendor should additionally have an avatar for the bot, and decent amount of machine vision and OCR capabilities. The more realistic and lip synced the avatar is, the better for a holistic user experience.

    How robust is their infrastructure and live support ?

    These are general tech-maturity concerns like scalability with respect to concurrency and content, guaranteed up time, support for live upgrades etc.

    A cumulative scoring based on all the check points mentioned above will help us to reduce the risk of choosing an unsuitable AI vendor.

    Now that we have discussed what to look for in a conversational AI vendor, here are observations on how to reap best returns from the bots we deploy.

    Effective bots : Start early ! Start small !

    Its important that once you have decided to improve your processes using a conversational AI, you release the bot quickly to your users – to get them accustomed to it early on – and introduce automations in small gradients.

    Let AI begin as a process catalyst

    It works better if the AI starts off as an enabler or a catalyst to improve your existing processes, rather than it taking over the whole process as such.

    For E.g, Assume you are in the Insurance domain. Assume you are switching to an AI based process flow for on-boarding new customers. This should ideally start off as a process which just collects the lead details and updates your sales platform. Initially these leads generated by the bot should be taken up and on boarded by a sales executive. This is better than the bot going all the way up to collecting some 50 to 100 information points from the end user and performing the on-boarding all by itself.

    Such an approach helps your customers get accustomed to, and appreciate the bot in short useful interactions. Long processes can quickly dry out the users’ interest – especially if they are using it for the first time – causing them to disengage and leave.

    Quick wins first to gain user’s trust on the AI

    Its important that when you begin, your focus should be on providing several quick wins to the end user via the bot. A quick successful interaction is where the user needs to provide just 2 to 5 data points to the bot and the task gets done. Few such examples are – finding the nearest branch, status of a consignment, NAV value of a fund, total value of SIP, fixing appointment with an adviser etc.

    More of such short use cases will result in the AI getting easily adopted and trusted by your end users, preparing them for lengthier and higher value processes that you should automate down the line.

    Iterative releases of higher value automations

    Once the users are comfortable in their interactions with the bot, its time to surprise them with higher value automations. E.g, making a premium payment, adding a nominee to their insurance plan etc. A new automation per fortnight or month would be a nice pace to maintain the user interest and optimum engagement on all released automations.

    Iterative releases of higher value automations in this manner would also provide us enough time to reallocate the human resources who are freed from the mundane activities thus automated.

    Is your AI learning ?

    After the bot owning up all the automations you had planned for it, you still have to monitor the usage data of your bot to make sure things work as you had envisioned. Particularly important is the number of human interventions/escalations that happen. Ideally this number should come down with time, as the bot learns from the gaps, and should not be repeating previous misses after each of it’s learning cycles.

    Conclusion

    We have discussed briefly all important aspects to be considered while zeroing in on the right AI platform to automate your business.

    These pointers will definitely help to set the expectations right for those among us who are planning to adopt AI based automations. Feel free to let me know in comments if I have missed anything.

    Also: If you work for an Indian company and wish to engage your customers using automations in Indian languages (including “Indian English”), feel free to inbox me. Dhee.AI – which is developed by my company DheeYantra – might fit just right for you.

  • Fix : Touchpad not working in Ubuntu

    Could fix the touch-pad of my Ubuntu system which went off due to an unknown reason with these commands  –

    1. On terminal run –
      • sudo rmmod i2c_hid
      • sudo modprobe i2c_hid
    2. Restart the system.