FAQs

Do you have a query, suggestion or bug you would like to discuss? Discuss in our forum.

What is Sunbird AI Assistant?

Sunbird AI Assistant is a building block of Sunbird that provides capabilities to build AI bot-related solutions. It is a DPG, a Digital Public Good, which is designed based on micro-services architecture and is open source.

What types of content can be ingested or indexed?

The following content format types are supported:

  • Documents - PDF, DOCX, PPT, CSV, EPUB, TXT

  • Videos - mp4

  • Audios - mp3

  • Images - JPEG, JPG, PNG

Note that all the contents should be in English language only.

What is the level of configurable customisation available?

Following are the different configurations supported:

  1. GenAI service - Open AI, Azure Open AI

  2. Language service - Bhashini, Google

  3. Supported languages - This can be English and the set of Indian languages supported by Bhashini

  4. Response types - Can be text, audio or both

  5. Gen AI GPT Model value - Can be 3.5 or 4

  6. Enable or disable telemetry events logging to Sunbird Telemetry service

How to add new documents to the index for AI bots to use?

Please check the data ingestion document: Data Ingestion Process

How to change the Welcome message or other static messages of a bot (in Mobile App, Telegram and WhatsApp)?

The configuration that applies to the static messages of Telegram and WhatsApp is explained in the document “Sunbird AI Assistant - Technical Overview” under the section “Configurations”.

If the page numbers of the sources given in the bot replies are not matching with the page numbers in the documents, what could be the issue?

This typically is seen when there are pages in the document ingested that don't carry a page number. In these cases, you can cross-check the content against the page number and remove these pages before ingestion so that the ingestion script can correctly tag the page number against the content.

If the bot replies “I am not currently trained with relevant documents to provide a specific answer for your question” - what could be the possible reasons? How to validate it?

This is an expected behavior when the Bot is not able to find a relevant answer to the user’s question. In such cases, it politely declines to answer by providing the message. You can also cross-check the content by using text searches to see if you are able to find any close matches. Additionally, you can cross-check the logs by engaging the operations team to check what information is retrieved from Marqo and check the relevance of the content.

How can I support more languages in the bots?

The configuration that enables the languages for Telegram and WhatsApp “request.supported_lang_codes” is explained in the document “Sunbird AI Assistant - Technical Overview” under the section “Configurations”. This section covers the configuration that helps with language enablement in all the services.

If I am not getting correct answers in an Indian language, what could be the problem?

If it is an audio query that you are doing, try repeating it again. Maybe because a certain word is not correctly pronounced or maybe due to some external noise, it is not able to detect the question well. For audio or text, you can also check to make sure that it is the language you have selected in which you have sent the question. For example, if you selected a language as Kannada and if your question is in Hindi, the system will not detect the question. You can recheck the language that you have previously selected or select the language again and submit your question. The other possibility is that there are no relevant answers to the question you have asked.

What is the difference between the AI Assistant and a normal search engine?

Unlike a traditional search engine, an AI Assistant can accept input in any language, understand context, and generate answers by collating information from different parts of the content. The AI Assistant allows users to input queries in their own language or vocabulary and provides answers based on context rather than just matching specific words.

What is the infrastructure required for running Sunbird AI Assistant?

The infrastructure depends on the scale. Following is the suggested cloud infrastructure to run Sunbird AI Assistant in production with a minimum load of 1000 users per day:

Cloud Infra requirements:

  1. Number of VMs - 2

  2. Size of VMs (size of memory, No of CPU cores and type of processor) - 4 CPU Core, 16 GB RAM, 60 GB Disk

Apart from cloud infrastructure following are required:

  1. Access to Language Service like Bhashini

  2. Access to GenAI service and Open AI or Azure Open AI is the currently supported GenAI

Refer to Sunbird AI Assistant - Technical Overview document for the detailed architecture

InfrastructureRequired specifications

Number of VMs

2

Size of VMs (size of memory, No of CPU cores and type of processor)

4 CPU Core, 16 GB RAM, 60 GB Disk

OS type ~ linux or windows or paid linux

Ubuntu 22.04 LTS

No. of clusters

1

No of worker nodes

2

Size of worker node (size of memory, No of CPU cores and type of processor)

4 CPU Core, 16 GB RAM, 60 GB Disk

Storage types ~ frequent access, infrequent access and archival

Object storage buckets - 5 GB

Replication criteria across different availability zones

Open AI subscription

1

Bhashini/Google translate subscription

1

Domain name and SSL certs

1

Database managed service(s)

Managed Postgres service

What will be the cost for running Sunbird AI Assistant?

The cloud infrastructure would cost approximately Rs. 60K per month for a user base of 10,000 users per day, and open AI would cost approximately Rs. 4 per message.

If you access the bot's front end through WhatsApp, there would be an additional cost. It is approximately Rs. 0.3 per user per day.

For a large-scale deployment, Bhashini language services might also have some costs, which the Bhashini team must obtain.

How long will it take to setup Sunbird AI Assistant and run?

A minimal testing instance can be set up in half a day using one-click installer (available for AWS). It would take around two to three days if you install it from scratch.

What is the scale of Sunbird AI Assistant?

It can horizontally scale to any scale. It is only limited by the OpenAI token limit. OpenAI has a limit on the number of tokens that it can service within a given time.

How fast will the responses to messages be?

This depends on the latency of OpenAI and Bhashini services. It can take from 20 seconds to a minute to get the response.

Has Sunbird AI Assistant been adopted in any live use case?

Yes, it is adopted as part of eJaaduiPitara recently launched by the Ministry of Education. Leveraging the potential of Sunbird AI Assistant, three Bots are developed as part of My Jaadui Pitara.

  1. Story Generation Bot: This generates stories as per the context given by the user.This is not a replacement for the traditional storytelling forms and skills, but it helps the user by creating contextual stories in the local language. It also helps with generating interesting questions related to the story that can be asked to children. This virtual assistant is trained on a collection of traditional Indian stories mentioned in the NCF, like Panchatantra, Hitopadesh and Jataka katha to start with.

  2. Parent Assistance Bot: This enables Parents to understand and relate to the definitions, key concepts and principles of foundation stage learning, using examples and illustrations in their simple and contextual language. Additionally, it offers guidance on day-to-day activities such as suggesting content, teaching activities, and connecting day-to-day activities to learning outcomes. The Bot is trained to answer questions based on the information from a predefined set of policy documents, training manuals, guidebooks, etc- such as Unmukh, Jaadui Pitara Manual, NCF, etc.

  3. Teacher Assistance Bot: This enables Teachers to ask questions on multiple topics related to foundational stage learning. It also offers guidance on day-to-day activities such as selecting content, teaching methods, assessments, connecting assessments to learning outcomes, and managing the classroom. The Bot is trained to answer questions based on the set of documents trained for the Parent bot, plus an additional set of documents that are only relevant to Teachers, such as NISHTHA course materials.

Following are a few work-in-progress use cases that are being worked on for adoption:

  1. An assistant for children on Child Abuse

  2. An assistant for citizens with information on government administrative processes

How to configure a new bot context in sakhi-api-service?

To configure a new bot context, you will have to add below configurations in 'config.ini' of sakhi-api-service. Let us look at it with an example where our context is "test_bot" and the corresponding vector collection/index it should refer to is "test_documents_collection".

  1. Configure the bot context in 'supported_context' for performing bot context validation. Incoming requests to API will be validated with the configured bot context.

  2. In order to handle bot specific queries from the user, configure 'enable_bot_intent' to 'true' and add 'bot_prompt' which will contain information of your bot that you want to reply with.

  1. To generate answers for user queries, configure the 'activity_prompt' which will have the steps to perform by LLM using the passed documents from vector db.

How to configure a new bot in Telegram?

Single Bot configuration

If you are using single bot under your Telegram bot channel, configure the 'context' value under the 'default' section for the bot in 'config.ini' of 'sakhi-telegram-unified-service'

Default context information, 'default_context_selection', is to be configured in all language files (ex: 'en.json') under 'languages' folder.

Multiple Bots Configuration

Steps to configure multiple bots under your Telegram bot channel:

  1. Go to 'BotFather' in your Telegram application where you have created the channel

  2. select '/mybots' and select the channel under which you wants to create bots.

  3. Click on 'Edit Bot' button and the click on 'Edit Commands' button.

  4. Add the list of commands to the channel. Example: select_language - user language selection select_context - user bot context selection

For both of the scenarios, necessary context information is to be configured in corresponding language file (ex: 'en.json') under 'languages' folder.

How to configure a new bot in WhatsApp?

This guide describes how to configure a new bot for the WhatsApp application. We'll use the example of a "farmer_bot" to illustrate the process.

User Interface:

Modify the initial screen where users choose bots. Include a new quick reply button labeled "Farmer Assistant" alongside the existing options (Story Sakhi, Parent Tara, Teacher Tara).

  • Update the bot_selection section in your language file (e.g., en.json) located under assets/language.

  • Add a new option object within the options array for "Farmer Assistant."

  • Set the title to "Farmer Assistant" and the postbackText to "bot__bot_4" (assuming this is the new identifier for the farmer bot).

Here's an example of the updated JSON snippet:

en.json
{
  "bot_selection": {
    "message": {
      "type": "quick_reply",
      "msgid": "bot",
      "content": {
        "type": "text",
        "header": "e-Jaadui Pitara",
        "text": "... (Welcome message content) ...\n\nPlease select below option to proceed",
        "caption": "Please select below option to proceed",
        "options": [
          {
            "type": "text",
            "id": "bot",
            "title": "Story Sakhi",
            "postbackText": "bot__bot_1"
          },
          {
            "type": "text",
            "id": "bot",
            "title": "Parent Tara",
            "postbackText": "bot__bot_2"
          },
          {
            "type": "text",
            "id": "bot",
            "title": "Teacher Tara",
            "postbackText": "bot__bot_3"
          },
          {
            "type": "text",
            "id": "bot",
            "title": "Farmer Assistant",
            "postbackText": "bot__bot_4"  // New postback text for Farmer Assistant
          }
        ]
      }
    }
  },
  ....
}

Individual Bot Configurations

Each bot (Story Sakhi, Parent Tara, Teacher Tara) has its own welcome message defining its capabilities and providing examples of prompts users can provide.

Let's configure the welcome message for Farmer Assistant as below:

en.json
{
  "bot_selection": {
   ....
  "bot_1": { ... (Existing Story Sakhi configuration) ... },
  "bot_2": { ... (Existing Parent Tara configuration) ... },
  "bot_3": { ... (Existing Teacher Tara configuration) ... },
  "bot_4": {  // New welcome message section for Farmer Assistant
    "Welcome": {
      "message": {
        "type": "text",
        "text": "Welcome to Farmer Assistant! I can help you with various farming related tasks. Here are some examples:\n- Ask me about weather forecasts for the next week.\n- What are some good pest control methods for tomatoes?\n- Tell me about crop rotation techniques for corn.\n\nFeel free to ask me anything related to farming."
      }
    },
  }
}                                                                                              

Note: Remember to repeat this configuration process for all supported languages within their respective language files under the assets/language folder.

Last updated