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:
Google Console --> Quick Access --> IAM and admin
- 5.On the left-hand side navigation panel, click Service accounts --> + CREATE SERVICE ACCOUNT
Setup a Service Account in Google Console
- 6.Under Roles, add role as Vertex AI user.
Roles --> Vertex AI user
- 7.On the Service accounts dashboard, click on the three vertical dotsunder Action and select Manage keys.
- 8.Click Add key --> Create new key. Select key type as JSON and Create.
Create JSON key
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.
Toggle Generate Embeddings 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".
- 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"
Retrieval Augmented Generation (RAG) or RetrievalQA Prompt to Intro Prompt
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)
Enter a Crawl Base URL
Or enter your website's Sitemap
Click Load Sitemap.
You will see a list of the URLs available on the website. Once the webpages are loaded, click
beside each URL to inspect responses. Click Add to add individual resources, or Bulk Add to add resources in bulk.
Once the resources are trained, check the Vertex AI embeddings.
To check, click Responses on the source dashboard for the associated source.
Click associated URL Responses to check Vertex AI response.
Successful source setup is indicated by a tick in front of Vertex AI.
Test your sources through the chatbot widget.