Planning your Bot

Before you start to build a bot, it’s important to think about your overall goals and plan how you’re going to start.

Your assistant can use different resolution methods to help your customers with their requests. Customers access the assistant through applications that you choose and configure. This section highlights some best practices you should follow before building an assistant using NVIDIA ACE Agent.

Following these best practices ensures a systematic and effective approach to building a bot. Regularly update and improve your bot based on user feedback and evolving requirements to maintain its relevance and efficiency in the chosen domain.

Step 1: Choose your Bot’s Domain of Expertise

Selecting the right domain for your bot is crucial for its success. Identify the area where your bot will provide the most value. Whether it’s customer support, e-commerce, health, or any other domain, understanding your bot’s purpose is the foundation of its development.

Consider the following:

  • Define the specific tasks and queries your bot will handle within the chosen domain.

  • Analyze the target audience and tailor the bot’s personality and language accordingly.

  • Research existing bots in the chosen domain to identify opportunities for improvement.

Step 2: Determine the Conversation Flow and Knowledge Bases

Determine how your bot will fulfill user queries. This step may involve figuring out the custom business logic that enables your bot to understand and respond appropriately.

Consider the following:

  • Identify the types of queries your bot will encounter and design appropriate responses.

  • Develop a robust conversation flow to handle user interactions seamlessly.

  • Implement error handling mechanisms to manage unexpected user inputs.

  • Determine if integration with external systems or APIs for additional data or functionality is needed. In case you are implementing a RAG kind of pipeline, determine the knowledge bases that will be needed to retrieve answers for your queries.

Step 3: Determine the Language Model

After you have determined the conversation flows for your domain, the next step is to determine which language model to use for Natural Language Processing and Natural Language Generation. NVIDIA ACE Agent provides out of the box integrations with common service providers like OpenAI and the NVIDIA API Catalog.

Choosing the right language model is crucial for the natural language understanding capabilities of your bot. Assess different language models and select one that aligns with your bot’s requirements.

Consider the following:

  • Evaluate pre-trained models based on their performance, available languages, and supported functionalities.

  • Consider the balance between model size and computational resources available.

  • Explore fine-tuning options to tailor the model to your specific domain and user interactions.

Step 4: Determine the Dialog Modeling Language

You can start building your bot after you have determined all the above steps using the aceagent tool within a Python virtual environment. The aceagent tool allows you to build and test your bot using a text-in text-out interface using a sample UI. This is really useful for a quick develop-test iteration cycle. A bot is defined by a set of configuration files, which is consumed by NVIDIA ACE Agent.

To build and model the conversation flows that were designed in step 2, there are two options:

Option 1

Use third party frameworks like LangChain and LlmaIndex. After you have built your bot using these frameworks you can onboard these onto NVIDIA ACE Agent seamlessly.

Option 2

Use NVIDIA proprietary dialog modeling language Colang. Colang is more useful if you are looking to:

  • Building a hybrid kind of pipeline, some queries are addressed using Large Language Models and some queries use traditional classifiers like BERT.

  • Applying guardrails on a conversation at the input and output level.

  • Want more granular control on conversations and build traditional Joint Intent & Slot model classification driven use cases.

Step 5: Plan More Modalities

After you are satisfied with the bot’s accuracy, you can now consider adding speech AI or avatar AI to your assistant, if needed, for your use case. To add other modalities, you need to deploy your bot using a Docker setup.

In this step, once you add speech AI, for example, you may need to fine-tune some parameters to tweak the speech models accuracy like word boosting and custom pronunciation handling.

Step 6: Determine the Frontend Channel

After your bot is developed, it needs a production grade frontend to interact with users. Create a user-friendly interface and integrate it with channels where your target audience is present. The bot’s functionalities will be exposed by NVIDIA ACE Agent through a RESTful API or gRPC API. The frontend will need to be integrated with these APIs exposed by NVIDIA ACE Agent.

Consider the following:

  • Develop a frontend using web technologies (HTML, CSS, JavaScript) or platform-specific frameworks (for example, React, Angular).

  • Ensure a consistent user experience across different channels (web, mobile, messaging applications).

Step 7: Determine the Deployment Infrastructure

The last stage in bot development cycle is actually deploying your bot for production. Selecting the right deployment method is essential for making your bot accessible to users. Consider factors such as scalability, security, and ease of maintenance. More specifically, consider the following:

  • Deploy on cloud platforms (AWS, Azure, Google Cloud) for scalability and reliability. NVIDIA ACE Agent provides a Helm chart to facilitate the same.

  • Implement continuous integration and continuous deployment (CI/CD) pipelines for efficient updates.