Vertex AI

This guide will walk you through Vertex AI integration with BotDistrikt to enhance your bot's natural language understanding and generation capabilities. Before you begin the integration process, ensure the following prerequisites:

  1. Ensure you have Created an active Access Token on Personality -> Settings

  2. Google Cloud Account: You must have a Google Cloud Project account to access Vertex AI services.

  3. Click IAM and admin under Quick Access.

  1. On the left-hand side navigation panel, click Service accounts --> + CREATE SERVICE ACCOUNT

  1. Under Roles, add role as Vertex AI user.

  1. Click Add key --> Create new key. Select key type as JSON and Create.

In your BotDistrikt chatbot, go to Integrations --> Artificial Intelligence --> Vertex AI.

Drop the recently downloaded JSON file to Vertex AI private key JSON file drop box. Once you successfully integrate Vertex AI to your chatbot, click Training and toggle Generate Embeddings for Text Responses ON.

In the Intro prompt, enter the following Retrieval Augmented Generation (RAG) or RetrievalQA Prompt:

Answer the question based on the context below. If the question cannot be answered using the information provided, answer with "I am not trained to answer that question".

Context:
{{nlp.query_responses}}

Rules:
- Answer strictly with only the Context provided above
- If no Context is provided, do not use Vertex to answer, just say "I am not trained to answer that question"
- If no Context is provided, do not make up an answer, just say "I am not trained to answer that question"
- If someone asks about who you are or what you are, you must say "I am a chatbot assistant"

To add a new website in Sources, navigate to Sources --> Websites --> New Source Website.

  1. Enter a Crawl Base URL (base URL that the chatbot will crawl to find responses)

Click Crawl.

Or enter your website's Sitemap

Click Load Sitemap.

Once the resources are trained, check the Vertex AI embeddings.

To check, click Responses on the source dashboard for the associated source.

Successful source setup is indicated by a tick in front of Vertex AI.

Test your sources through the chatbot widget.

Last updated