Skip to main content

How does your AI expert learn? Insight into the training process

Before you start uploading content, it's helpful to understand what's happening "under the hood" with it. This insight will help you better structure your materials and optimize the resulting behavior of your AI. BuddyPro learns in two main phases: by processing your know-how and then generating expert pods.

7.1 Processing your know-how: from file to smart database

The first step is to prepare and upload your expert materials. Your AI will learn the basic knowledge and facts from them.

  1. Uploading to Google Drive: you upload your materials (PDFs, .gdocs, audio MP3s, video MP4s, URL links to YouTube, Vimeo or websites) to a prepared folder structure in your linked Google Drive account. The key folder for your resources is Sources and its corresponding subfolders(Files, Texts, URLs).

    • Tip: To help you keep track, name your files systematically (e.g. NameCourse_ModuleX_LessonY.mp4). BuddyPro does not allow you to create subfolders; appropriately chosen file names will help you keep track.
  2. Running an update ( /updatecommand ): after you upload or edit any materials in the sources folder, or change settings in the configuration files(system_prompt.gdoc, onboarding.gdoc, transcription_settings.gdoc), you instruct your BuddyPro instance in Telegram:

    /update

    This command is key - it tells your AI to "read", process, and save any new or changed information. What exactly is happening?

  3. Transcription (transcription) and content extraction:

    • BuddyPro automatically transcribes audio and video files into text. You can influence the quality of the transcription and specific terms in the transcription_settings.gdoc file (see Chapter 9).
    • It extracts text content from PDF documents, Google Docs in the Texts folder, and from web pages you link to in URLs/URL SOURCES.
    • It also saves these plain text transcriptions (transcriptions) for your review in Google Drive, in the appropriate transcriptions subfolders (e.g., sources/Files/TRANSCRIPTIONS/).
      • Note: You usually do not need to interfere with these automatically generated transcripts. BuddyPro also stores its own metadata in them (file summary, draft roles from the file), which is important for further processing.
  4. Segmentation and vectorization. Each of these chunks is then converted into a special mathematical format - vector embedding. These vectors store not only the words, but above all the semantic meaning of a given chunk of text.

  5. Storing in a vector database: all these vector embeddings (representing the different parts of your know-how) are stored in a specialised vector database. This database forms the "knowledge brain" of your AI. It allows the AI to lightning-fast search and compare the meanings of words and entire concepts, and thus find the most relevant parts of your know-how to any user query.

7.2 Automatic generation of expert sub-roles: specialising your AI

After your know-how is processed and stored in the vector database (following the /update command), BuddyPro can proceed to the next step: the creation of expert subtrees. These sub-roles allow your AI to act as a specialist on a specific sub-topic in different situations.

  1. Role design: Based on a comprehensive analysis of all your uploaded and /updated know-how, BuddyPro automatically identifies the key topics, sub-domains, and specializations contained in your materials. The list of names of these potential expert sub-roles is saved as a text file list_of_roles.gdoc in the ROLES folder on your Google Drive.

    • You can consult this list, or even manually add a new role that the AI has not suggested.
  2. Generate the content of the roles (command /updateRoles): when you are satisfied with the list of proposed roles (or after completing it), you instruct your BuddyPro instance in Telegram:

    /updateRoles

    This command starts the process where the AI creates a detailed content definition for each role name from the list_of_roles.gdoc file. This definition, stored as a separate Google Document in the ROLES folder (e.g., Role_ExpertNaX.gdoc), contains key information, procedures, and instructions for that specialty, extracted from your overall know-how. The command thus takes the already processed know-how and "forms" your AI's specific expert identity from it.

    • For more targeted role generation, there are also variants of this command, such as /updateNextRole (generates content for the next role in the list) or /updateRole:{name_of_role} (generates content for a specific, named role).

7.3 User interaction: dynamic selection of knowledge and roles

When a user asks your AI a question, a very sophisticated process takes place in the background to make the answer as relevant and useful as possible:

  1. Query Analysis: The AI first analyzes the user's query itself to understand its intent and key themes.
  2. Applying System Prompt: The global instructions, values, and personality defined in your main configuration file system_prompt.gdoc are always applied. This is the "heart" of your AI (see Chapter 12).
  3. Expert subrole selection: Based on the query topic and the current context, the AI intelligently selects the most appropriate expert subrole (one of those whose contents were created by the /updateRoles command).
  4. Finding relevant know-how: the AI scans the vector database of your know-how (populated after the /update command) and selects the few most relevant sections ("chunks") of information that are relevant to the query.
  5. Consideration of user and context:
    • User profile: the AI has access to the user profile that it builds about the user across all interactions with BuddyPro instances. So it knows what the user has dealt with before, what their preferences are, etc.
    • Short-term memory: the AI remembers the last few dozen messages from the current conversation.
    • Long-term memory: the AI can recall the most relevant "memories" (snippets of conversations) from the entire history of interactions with a given user, even if they took place long ago.
  6. Answer Synthesis: from all these inputs - the query, System Prompt, selected role, relevant snippets of know-how, user profile and conversation context - the AI synthesizes and generates a final answer.

This dynamic process ensures that the answers are not only informationally correct (based on your know-how), but also contextually relevant, personalized and delivered in the right "expert" style for the situation. As a result, users don't have to be experts at writing complex prompts.

7.4 Key distinction: /update versus /updateRoles - when to use which command?

This is absolutely critical to properly training your AI. These two commands have different functions and are used at different stages:

🚀 The /update command (Updating the KNOWLEDGE BASE and basic configurations):

  • When to use it? ALWAYS when you make any change to your know-how or basic configuration files. That is:
    • When you first upload your know-how to the sources folder.
    • When you add new files/URLs to your sources.
    • When you edit the contents of existing files/Google Docs in sources.
    • When you delete some files/URLs from sources.
    • When you make any change to the files system_prompt.gdoc, onboarding.gdoc, or transcription_settings.gdoc.
  • What does /update do?
    • It processes your materials: Transcribes audio/video to text, extracts text from documents and URLs.
    • Populates/updates the vector database: It stores your know-how in a form that AI understands and can quickly search from.
    • Updates role name suggestions: Based on the current state of your know-how, it suggests (or updates the list of names for) expert sub-roles in the ROLES/list_of_roles.gdoc file. WARNING: The /update command by itself does NOT create the detailed content (definitions) of these roles! This is done only by /updateRoles.
    • Loads the basic configurations: applies changes from system_prompt.gdoc, onboarding.gdoc and transcription_settings.gdoc.
  • How often? As often as you need to update the knowledge or basic behavior of your AI. If the process takes longer (BuddyPro will let you know), you can possibly interrupt it with the /stopUpdate command.

🎓 The /updateRoles command (Create/Update the CONTENTS of the expert subroles):

  • When to use it? AFTER you have executed /update and you want the AI to create detailed definitions for its expert subroles based on the current know-how.
    • Typically, you will use it for the first time after you have uploaded and processed the first batch of your core know-how using /update.
    • You will use it again if you have made a very significant extension or change to your know-how (e.g. you have added content to several new courses) and you want this change to be fully reflected in the definitions of all roles. In this case, it is recommended that you first delete the old role definition files on Google Drive (see Chapter 11, subsection 11.6).
    • You can also use it (or variants of it such as /updateRole:{name_of_role}) for a targeted update of the definition of one or a few roles, if you have e.g. edited their list in list_of_roles.gdoc or know that the new know-how only applies to a specific role.
  • What does /updateRoles do?
    • It takes the list of role names from ROLES/list_of_roles.gdoc.
    • For each role name, it performs an in-depth analysis of your entire current knowledge base (populated after /update).
    • It synthesizes and writes a detailed description (definition) of the role and saves it as a Google Document in the ROLES folder.
  • How often? Not as often as /update. Only when you want to (re)generate expert specializations for your AI. If the process takes longer, you can possibly interrupt it with /stopUpdateRoles.

💡 Proper sequencing for best results (especially for first training or big changes):

  1. Upload/edit your know-how in the sources folder and configuration files(system_prompt.gdoc etc).
  2. Run the /update command. (This will populate the knowledge base and update the list of suggested role names).
  3. Only then run the /updateRoles command. (This will create the detailed content of the roles based on the current knowledge).

If you're only adding a small amount of new know-how, or only slightly tweaking the System Prompt, you don't always need to run /updateRoles after each /update - the new knowledge will be available to the AI anyway. The /updateRoles command mainly deals with "shaping" specializations.

This section was key to understanding the dynamics of training. We will now take a closer look at each step.


Frequently Asked Questions (FAQ) for this step:

  • Do I need to run both /update and /updateRoles every time I add a file to sources? Not necessarily. You need to /update whenever you make any changes to the sources or configuration files to keep the knowledge base up to date. Only run /updateRoles when you want the newly added (or significantly changed) know-how to be reflected in the expert subroles definitions themselves (e.g. after the first big know-how upload, or when you add a completely new topic). For minor knowledge updates, just /update.
  • What happens if I add a new file and don't run /updateRoles? Will the AI use my new information? Yes. If you run /update, the new information will be uploaded to the vector database and the AI will be able to use it to find relevant snippets of know-how for the answer. However, if you have previously generated roles, the definitions of those existing roles will not automatically reflect this new added content until you purposefully update the relevant role.
  • Why does the /update or /updateRoles command sometimes take a long time? Processing large amounts of data (especially transcribing long audio/video files) or generating content for many complex roles can be time consuming. BuddyPro will keep you informed of the progress. You can possibly interrupt the process with an appropriate command.
  • How do I know when the /update or /updateRoles command is complete? BuddyPro will send you a message in Telegram when the process is complete (e.g. "Updating Buddy Pro Finished Successfully"). You will also be notified if there was an error. If the command handles many roles and completes them all, re-entering /updateRoles will be very fast because it will have nothing new to generate.