> For the complete documentation index, see [llms.txt](https://ai-assistant.sunbird.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ai-assistant.sunbird.org/technical-overview/architecture.md).

# Architecture

Below is a high-level diagram of the various components powering the AI Assistant.

<figure><img src="/files/o0p00LfMWQ1O3bZVuScp" alt=""><figcaption></figcaption></figure>

## Components

#### sakhi-api-service

This is the backend service that takes a question and generates a relevant answer using the RAG mechanism. The answers are based on the information in a set of ingested documents. The service has to be configured with the specific marqo indexes to retrieve the sections of relevant documents and the GenAI prompts to generate a response in the required form.

Code:&#x20;

{% embed url="<https://github.com/Sunbird-AIAssistant/sakhi-api-service>" %}

#### Ingest-Documents Script

Document ingestion into the Marqo vector database is done through the below standalone python script.&#x20;

{% embed url="<https://github.com/Sunbird-AIAssistant/sakhi-api-service/blob/main/index_documents.py>" %}

Details on how to run is available under “To ingest data to marqo” section in the below readme file:&#x20;

{% embed url="<https://github.com/Sunbird-AIAssistant/sakhi-api-service/blob/main/README.md>" %}

#### sakhi-telegram-unified-service

This is a webhook service that registers with Telegram Service to oer the bot flow in the Telegram client. This doesn’t have any APIs exposed to the consumers. The calls to this service are delegated through the Telegram Service.

Code:&#x20;

{% embed url="<https://github.com/Sunbird-AIAssistant/sakhi-telegram-unified-servicewhatsapp-bot>" %}

#### whatsapp-bot

This is a webhook service that registers with WhatsApp Gupshup Service to oer the bot flow in the WhatsApp client. This doesn’t have any APIs exposed to the consumers. The calls to this service are delegated through the WhatsApp Gupshup Service.

Code:&#x20;

{% embed url="<https://github.com/Sunbird-AIAssistant/whatsapp-bot>" %}
