Articles in this section
Calculus AI Overview Natural Language Query (NLQ) Deal Health - A Calculus AI Feature Calculus GPT FAQs Ask Calculus AI Using GPT features in Vtiger Calculus Calculus AI Prompt Builder

RAG Model in Generative Designer

In this article, you will learn how to create and use RAG models to retrieve information from CRM modules and generate AI responses.
V
Vinusha Balasubramanian
13 Mar, 2026 - Updated  1 day ago
 

Feature Availability

Vtiger Editions: One Growth | One Professional | One Enterprise | One AI

Introduction

RAG (Retrieval-Augmented Generation) Models in the Generative AI Designer allow AI assistants to generate responses by retrieving relevant information from existing CRM data before generating an answer.

Instead of relying only on the AI model’s knowledge, the system first retrieves information from selected CRM modules and then uses that information as context to generate accurate responses.

RAG models help ensure that AI responses are based on actual CRM data, making them more reliable and relevant.

RAG models are commonly used for:

  • AI-powered chatbots
  • Knowledge base automation
  • Customer support assistance
  • Internal CRM data retrieval

For example, if a user asks a question related to a support article, the system retrieves the relevant Articles or FAQ records and generates an answer based on that information.

Understanding the RAG Models 

A RAG model combines information retrieval with AI-generated responses.

When a user asks a question, the system first searches the configured CRM modules to retrieve relevant information. The retrieved content is then provided to the AI model as context to generate a response.

This process ensures that the generated responses are based on actual CRM data instead of only the AI model’s knowledge.

The process works as follows:

1. User asks a question:

  • The process begins when a user asks a question.
  • Example: How can I reset my account password?
  • The system gathers relevant information from the trained RAG models. This information is then used to generate the response.

2. Convert the question into embeddings:

  • The user's question is converted into embeddings.
  • An embedding is a numerical representation of text that captures the meaning of words or sentences.
  • This allows the system to identify similar content, even if the exact words are different
Example:

Test 

Vector 

How can I reset my account password?

[0.24, -0.11, 0.89, …]

How do I change my password?

[0.22, -0.10, 0.87, …]

Since the vectors are similar, the system understands that both phrases are related.

3. Search the knowledge base

  • The system compares the question embedding with embeddings stored in a vector database.
  • These embeddings are generated from the trained RAG models for different modules such as:
    • Documents
    • Articles
    • FAQs
    • Other CRM modules
  • The system retrieves the most relevant content.
  • Example retrieved content:
    • To reset your password, click the Forgot Password option on the login page and follow the instructions sent to your registered email address.

4. Provide retrieved content to the AI model

  • The retrieved information is sent to the AI model along with the user's question.
  • Input provided to the model:
  • User Question + Retrieved Context
  • Example:
    • User Question: How can I reset my account password?
    • Retrieved Context: To reset your password, click the Forgot Password option on the login page and follow the instructions sent to your registered email address.

5. Generate the final response

  • The AI model analyzes the retrieved information and generates a response.
  • Example response:
    • You can reset your account password by clicking the Forgot Password option on the login page and following the instructions sent to your registered email address.
  • Because the response is generated using retrieved CRM data, the answer is accurate and relevant to the user’s question. 

Simple Flow of a RAG Model

User Question

Convert Question to Embeddings

Search Vector Database

Retrieve Relevant Information

Provide Context to AI Model

AI Generates Final Response

Use Case

Acme Electronics uses Vtiger CRM to manage customer support and stores troubleshooting guides in the Articles module.

To automate responses to common customer questions, Priya, the CRM administrator, creates a RAG model using the Articles module. She then adds the RAG model to a Prompt and connects it to a Chatflow used by the company’s chatbot.

When a customer asks a question such as How do I register my product warranty?, the system retrieves relevant article content using the RAG model, and the Prompt generates a response based on that information.

This allows customers to receive instant answers, while support agents can focus on more complex issues.

Benefits of Using RAG Models

The benefits of using RAG models are:

  • Accurate Responses- Responses are generated using actual CRM records and knowledge base data.
  • Improved Customer Support - Customers can receive instant answers to common questions.
  • Reduced Manual Effort - Support agents spend less time answering repetitive queries.
  • Contextual AI Responses - AI responses are based on real data stored in the CRM rather than generic AI knowledge.

In this article, you will learn about:

  • Accessing RAG model
  • Types of RAG model
  • Creating a RAG model
  • Training a RAG model
  • Viewing a RAG model
  • Using RAG model

Key Terminology

 

Field Name

Description

Generative AI Designer

The Generative AI Designer in Vtiger CRM is a centralized hub for managing bot interactions. 

RAG Model

A model that retrieves information from CRM modules before generating AI responses.

Embedding Model

A model that converts CRM data into a format that allows the system to retrieve relevant information.

Prompt

Instructions that define how the AI should generate responses.

Chatflow

A workflow that controls chatbot conversations and interactions

Customer-Facing Model

A RAG model used for AI assistants interacting with customers

Non-Customer-Facing Model

A RAG model used internally within the CRM for employees

Accessing RAG Model

Before accessing the RAG model, ensure the Calculus AI Add-on is installed from the Extension Store > Add-ons.

Follow these steps to access the RAG Models page:

  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens. 
  5. Click on the GenAI Setup tab. The GenAI Setup page opens. 
  6. Select RAG Models from the left panel.

The RAG Models page will be displayed.

Types of RAG Models

RAG models can be configured depending on how they will be used.

You can configure the following types of models:

  • Customer Facing RAG model
  • Non-Customer-Facing RAG model 

Customer-Facing RAG Models

Customer-facing models are used by chatbots or AI assistants that interact with customers.

These models typically retrieve information from knowledge base modules such as:

  • Articles
  • FAQ
  • Documents

They are commonly used in:

  • Customer support chatbots
  • Website chat assistants

Non-Customer-Facing RAG Models

Non-customer-facing models are used internally within the CRM by employees.

These models retrieve information from CRM modules such as:

  • Cases
  • Contacts
  • Deals
  • Other CRM records

They help employees quickly retrieve CRM information using AI.

Creating a RAG Model

Follow these steps to create a RAG model.

  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens. 
  5. Click on the GenAI Setup tab. The GenAI 
  6. Select RAG Models from the left panel.
  7. Click + Add Model. The Add Model window opens.
  8. Enter or select the following information:
    1. Model Name – Enter a name for the RAG model.
    2. Embedding Model – Select the embedding model used to convert module data into embeddings for retrieval.
    3. Is Customer Facing Agent – Enable this option if the model will be used in customer-facing agents or chatbots.
    4. Module – Select the CRM module from which information should be retrieved.
    5. Fields – Select the fields of the module whose data should be used for generating responses.
    6. Conditions – Define conditions to filter the records that should be included in the model.
      1. All – Retrieves records that match all the specified conditions.
      2. Any – Retrieves records that match any of the specified conditions.
    7. Click Save.

The RAG model will be created and displayed in the RAG Models list.

Note: After the model is created, the Module and Embedding Model cannot be edited.

Editing a RAG Model

You can edit a RAG model to update its configuration, such as the selected fields, conditions, or other settings used for retrieving data.
Note: The Module and Embedding Model fields cannot be edited after the RAG model is created.

Follow these steps to edit a RAG model.

  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens. 
  5. Click on the GenAI Setup tab. The GenAI 
  6. Select RAG Models from the left panel.
  7. Click + Add Model. The Add Model window opens.
  8. Enter or select the following information:
    1. Model Name – Enter a name for the RAG model.
    2. Embedding Model – View the embedding model used to convert module data into embeddings for retrieval.
    3. Is Customer Facing Agent – Enable this option if the model will be used in customer-facing agents or chatbots.
    4. Module – View the CRM module from which information should be retrieved.
    5. Fields – Select the fields of the module whose data should be used for generating responses.
    6. Conditions – Define conditions to filter the records that should be included in the model.
      1. All – Retrieves records that match all the specified conditions.
      2. Any – Retrieves records that match any of the specified conditions.
    7. Click Save.

The RAG model will be updated and displayed in the RAG Models list.

Training a RAG Model

After creating a RAG model, it must be trained before it can retrieve information.

Follow these steps to edit a RAG model.

  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens. 
  5. Click on the GenAI Setup tab. The GenAI 
  6. Select RAG Models from the left panel.
  7. Locate the RAG model in the list.
  8. Click Train.

Note: 

  • When you click the Train button, the Status changes to In Progress. The Scheduled Time updates automatically to the time when the training is initiated. 
  • When the training starts, the Start Time is updated. Once the training is completed, the End Time is updated automatically and the Status changes to Completed. 

Viewing a RAG Model

Follow these steps to view a RAG model:

  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens. 
  5. Click on the GenAI Setup tab. The GenAI 
  6. Select RAG Models from the left panel.
  7. Click the RAG model in the list.
  8. View the following information in the RAG model:
    1. Training Details
      1. Status – Displays the current training status (Completed, In Progress, etc.).
      2. Total Trained Records – Shows the total number of records processed during training.
      3. Modified Records Count – Displays the number of records modified after training.
    2. Model Details
      1. Model Name – Displays the name of the RAG model.
      2. Module – Shows the module selected while creatin the RAG model.
      3. Status – Indicates the training status of the model.
      4. Is Customer Facing Model – Indicates whether the model is used for customer-facing agents.
    3. Fields - Displays the fields selected from the module that are used for generating embeddings.
    4. Conditions
      1. All Conditions – Displays conditions where all rules must be satisfied.
      2. Any Conditions – Displays conditions where at least one rule must be satisfied.
    5. Additional Details
      1. Scheduled Time – Displays the time when the training was scheduled.
      2. Record Sync Start Time – Shows when the record synchronization started.
      3. Record Sync End Time – Shows when the record synchronization ended.
      4. Start Time – Displays when the training process started.
      5. End Time – Displays when the training process was completed.

Testing a RAG Model

After training a RAG model, you can test it by running a Test Query. Testing helps verify whether the model retrieves relevant information from the selected CRM module.

Note: To test a RAG model, it must be connected to a Prompt. RAG models retrieve relevant information, and the prompt uses that information to generate the response. To know more about Prompt Builder, click here

Testing a query helps verify:

  • Whether the correct records are retrieved.
  • Whether the selected fields contain the required information.

Follow these steps to test a RAG model.

  1. Log in to the CRM.
  2. Click the main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens.
  5. Click the GenAI Setup tab.
  6. Select RAG Models from the left panel.
  7. Click Test Query. The Test Query window opens. 
  8. Select the Prompt to which the RAG model is added.
  9. Enter a query in the Test Query field.
  10. Click Run.

The system retrieves relevant information from the trained data and displays the response based on the retrieved content.

Managing Logs in a RAG Model

Logs help you to monitor and troubleshoot the RAG model. They provide details about training activities, record processing, and any issues that occur during the process.

Follow these steps to view logs.

  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens.
  5. Click the GenAI Setup tab.
  6. Select RAG Models from the left panel.
  7. Click the required RAG Model from the list.
  8. Click Logs.
  9. View the following details:
    1. Model Name – Displays the name of the RAG model used for training.
    2. Status – Shows the training status (for example, Completed).
    3. Trained Records – Displays the number of records processed during training.
    4. Reused Records – Shows the number of records reused from previous training.
    5. Scheduled Time – Displays the time when the training was scheduled.
    6. Start Time – Shows when the training process started.
    7. End Time – Shows when the training process was completed.
    8. Tokens Consumed – Displays the number of tokens used during the training process.

You can use logs to identify issues and ensure that the RAG model is functioning correctly.

Resetting a RAG Model

You can reset a RAG model if you want to clear the existing training data and retrain the model from the beginning.

Resetting removes the current training data and allows the model to be trained again using the configured module records.

Follow these steps to reset a RAG model:

  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens.
  5. Click the GenAI Setup tab.
  6. Select RAG Models from the left panel.
  7. Click the required RAG Model in the list to open it.
  8. Click More
  9. Click Reset. The confirmation window opens. 
  10. Click Yes

After resetting, the model training data is cleared, and you can train the model again.

Using RAG Models with Prompts

A RAG Model must be connected to a Prompt to generate responses. The RAG model retrieves relevant information from CRM records or documents, and the prompt uses that information to generate a contextual AI response.

Once configured, the prompt can be used by AI components such as Agents or Chatflows to interact with users.

  • To know more about Prompts, click here. 
  • To know more about Agents, click here. 

RAG Model Support in Prompt Types

After creating a RAG model, it can be used in different Prompt Types within the Prompt Builder.

The supported prompt types are:

  • Dynamic
  • Customer
  • Chatbot

Each prompt type supports specific types of RAG models.

Dynamic Prompt

When the Prompt Type is set to Dynamic, CRM-end RAG models can be used.

CRM-end RAG models are those created without enabling the Is Customer Facing Model option during RAG model creation. These models retrieve information directly from CRM modules and are primarily used for internal AI interactions within the CRM.

Dynamic prompts are the only prompt type that supports CRM-end RAG models.

Customer Prompt

When the Prompt Type is set to Customer, only customer-facing RAG models can be used.

Customer-facing RAG models are those created by enabling the Is Customer Facing Model option while creating the RAG model. These models are designed to retrieve information that can be safely shared with external users such as customers.

Chatbot Prompt

When the Prompt Type is set to Chatbot, only customer-facing RAG models can be selected.

These RAG models are created with the Is Customer Facing Model option enabled, ensuring that only appropriate information is used when generating responses for users.

Follow these steps to connect a RAG model with a prompt:

  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens.
  5. Click the GenAI Setup tab.
  6. Create a RAG Model. Ths Add RAG model page opens.
  7. Train the model using relevant CRM data.
  8. Click the Prompt. The Prompt page opens. 
  9. Click Add Prompt. The Add Prompt Template window opens. 
  10. Enter or select the following information:
    1. Prompt Name – Enter a unique name for the prompt.
    2. Status – Select the status to make the prompt active or inactive.
    3. Prompt Type – After selecting one of the following types, the RAG Model option appears, displaying the models supported for the selected prompt type.
      1. Dynamic
      2. Customer
      3. Chatbot
        1. RAG Model - Select the RAG Model for the prompt.
    4. Module – Select the CRM module whose data will be used in the prompt.
    5. LLM Selection – Select the Large Language Model that will generate the AI response.
  11. Click Save

Once configured, the prompt can be used in AI components such as Agents or Chatflows to generate responses based on retrieved CRM data.
 

Deleting a RAG Model

You can delete a RAG model if it is no longer required.
Deleting a model permanently removes it from the system. Once deleted, the model cannot be recovered.
Follow these steps to delete a RAG model:
  1. Log in to the CRM.
  2. Click main Menu.
  3. Go to Platform.
  4. Select Generative AI Designer. The Generative AI Designer page opens.
  5. Click the GenAI Setup tab.
  6. Select RAG Models from the left panel.
  7. Click the required RAG Model in the list to open it.
  8. Click More
  9. Click Delete. The confirmation window opens. 
  10. Click Yes

The selected RAG model will be permanently removed from the system

Best Practices

Follow these best practices when working with RAG models:

  • Keep the knowledge base content updated.
  • Use clear titles and structured documentation.
  • Apply filters or conditions to improve search accuracy.
  • Retrain models after adding large amounts of data.
  • Test queries regularly to verify response quality

Reference

Home Privacy Policy Terms of Service Security Center Policy & Legal Center Contact Us
© Copyright 2025 Vtiger. All rights reserved.
Powered by Vtiger
Facebook Twitter Linkedin Youtube