Train your AI

Write your agent's prompt, choose the Gemini model and tools, test the agent, and connect it to your Messenger welcome message.

13:39 video9 stepsUpdated 2026.09.28

Your AI assistant answers messages on your page freely, the way a person would. You train it by giving it your business information as a prompt. This guide shows how to turn on AI auto reply, set up your agent, write the prompt, test it, and make the AI reply as soon as a customer taps Get Started (Эхлэх).

Open the Artificial intelligence menu

Once you have paid and your access is active, an Artificial intelligence (Хиймэл оюун ухаан) menu appears in the left menu of the Chatbot panel. This is where you add, edit and train everything related to your AI.

Turn on AI auto reply

  1. In the left menu, open Settings (Тохиргоо).
  2. Open the Integrations (Интеграци) tab.
  3. Click Google Gemini. Smartbot connects Google Gemini for you.
  4. Make sure AI auto reply (AI автомат хариулт) is on, then click Save (Хадгалах) at the top.

While this is on, the AI replies to customer messages right away. If you turn it off and save, the AI stops working. You can switch it off for a while when you're testing.

Open your agent and choose its tools

The Artificial intelligence menu has two tabs: AI agents (AI агентууд) and AI tools (AI хэрэгслүүд). An agent is one version of your AI, and you can add as many as you like.

However, only one default agent answers on a page, so you can't run several agents at once. The default agent has a Default agent (Үндсэн агент) badge next to it.

Click an agent's name (for example Main agent) to open its settings. Write the information you want to teach the AI in the System message (Prompt) field.

Scroll down to AI tools to connect extra functions to the agent. The video explains three of them:

  • Web Search: the agent isn't limited to your information and can search Google to answer.
  • Image Reader: the agent recognizes images customers send and replies about them.
  • Document Reader: the agent reads PDF, DOC and Word files.

The tools are covered in more depth in later videos.

Choose the model and reply settings

Click the settings icon in the top-right corner of the prompt field. These settings appear:

  • Model (Gemini): choose a model. The list includes Gemini 3 Flash, Gemini 3.1 Pro Preview, Gemini 2.5 Flash-Lite, Gemini 2.5 Flash and Gemini 2.5 Pro. Smartbot generally recommends Gemini 2.5 Flash-Lite. Gemini 2.5 Flash also works.
  • Temperature: a value from 0 to 2 that sets the tone and emotion of the AI's conversation. At 0 the AI keeps things serious. The closer it gets to 2, the more playful and light its replies become. Set it to suit your page's purpose and your customers.
  • Max tokens: limits how long a reply can be. One token is roughly 4 to 5 letters, or about one word. It's an estimate, not an exact count. A higher number allows longer replies. Around 3000 to 5000 is enough. The video sets it to about 3000.

Write your prompt in three parts

The prompt is the most important part of training. Don't worry if you don't speak English. Gemini understands Mongolian well, so you can write the prompt in Mongolian.

Write the prompt in this order:

  1. Rules: start by telling the AI how it must work. For example: “You are Smartbot's AI assistant. Answer in Mongolian, using emoji, based only on the data below. Ask customers what information they're interested in and build the conversation around their answers.”
  2. General information: add your organization's and page's details, such as the address, phone number, website, services, products and app download instructions, together with links.
  3. Frequently asked questions: list the questions your page gets again and again and how to answer them, using Q (question) and A (answer). For example, write what to reply when someone asks “QPay суулгахад төлбөртэй юу?” (Is there a fee to set up QPay?).

When you're done, click Save at the top and the agent starts working.

Add a new agent and make it the default

  1. On the AI agents tab, click Add new (Шинээр нэмэх).
  2. Name the agent and click Continue (Үргэлжлүүлэх).
  3. In the prompt field, start with something like “Чи манай пэйжийн AI туслах” (You are our page's AI assistant), then write your rules and information. Choose the settings and tools, then click Save.
  4. In the agent list, click the three-dot icon at the end of the agent's row and choose Set as default agent. This agent now starts working on your page.

From the same menu you can Duplicate (Хувилах) an agent, Delete (Устгах) it, or Rename (Нэр өөрчлөх) it.

Test your agent

  1. Click the agent's three-dot icon and choose Try now (Одоо турших).
  2. A test chat page opens. Type a message and check the agent's reply.

In the video, typing “hi” makes the AI greet the user and ask what information they'd like.

Create a flow so the AI replies to Get Started

The default agent answers when a customer sends a message. If you want the AI to start the conversation as soon as a customer taps Get Started, create a flow for it.

  1. In the left menu, open Flows (Өрөлт) and click Create new (Шинээр үүсгэх). Name the flow, for example “AI эхлэл” (AI start), and click Continue.
  2. Use the + button at the bottom to add an Action (Үйлдэл) block. In the left panel, click Add content (Контент нэмэх) and choose Google Gemini.
  3. Under AI agents (AI агентууд), choose your default agent (for example Main agent). You don't need to change the User Message field.
  4. Under Save the answer to a custom field (Хариуг тусгай талбарт хадгалах), choose the field that will store the AI's answer. If you need a new one, click Add new to create it, for example “hariult” (answer). If the new field doesn't appear in the list, reload the page.
  5. To keep earlier messages in memory, set Remember Conversation to Yes (Тийм) and click Continue.
  6. In the toolbar above the Action block, click Set as start step (Эхлэх алхам болгож тохируулах).
  7. From the block's Success (Амжилттай) output, connect a new Send message (Мессеж илгээх) block. Under Message type (Мессежийн төрөл), choose Messenger (or Instagram for Instagram), and put your saved field in the message as {{hariult}}. This sends the AI's answer to the customer.
  8. From the Failed (Амжилтгүй) output, connect another Send message block with the text “Алдаа гарлаа” (An error occurred). Customers get this message if Google Gemini doesn't work.
  9. Click Publish (Нийтлэх) at the top.

Set the flow as your welcome message

  1. Go to Settings, open the Channels (Сувгууд) tab and choose Facebook Messenger.
  2. Under Welcome message (Угтах мессеж), choose your new flow, for example “AI эхлэл”.
  3. Click Save at the top.

Now when a customer taps Get Started, your AI sends the very first welcome message. You can also set it under Conversation starter message (Харилцан яриа эхлүүлэх мессеж). If these settings are new to you, watch the earlier tutorial videos.

For the AI to keep working, AI auto reply must stay on. If you switched it off for testing, turn it back on afterwards.

If you have more questions, contact Smartbot through its Facebook page.

You do this in the Chatbot panel.login.smartbot.mn

Open Chatbot panel

Questions and comments

Loading…