arrow_back

Build Vertex AI Search Apps using AI Applications

Sign in Join
Get access to 700+ labs and courses

Build Vertex AI Search Apps using AI Applications

Lab 1 hour 30 minutes universal_currency_alt 1 Credit show_chart Introductory
info This lab may incorporate AI tools to support your learning.
Get access to 700+ labs and courses

GSP1152

Overview

Vertex AI Search brings together the power of deep information retrieval, state-of-the-art natural language processing, and the latest in large language processing to understand user intent and return the most relevant results for the user.

You can deploy Vertex AI Search applications from AI Applications within the Google Cloud Console.

In this lab you will learn how to create search applications based on:

  • websites
  • structured data
  • unstructured data

You will then configure, visualize, and analyze the search results that are returned from the search app.

Objectives

In this lab, you will learn how to perform the following tasks:

  • Index public website data, structured and unstructured data.
  • Perform search on your indexed data.
  • Configure the display of your search results.
  • Integrate Vertex AI Search with your web application.

Setup and requirements

Before you click the Start Lab button

Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.

This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.

To complete this lab, you need:

  • Access to a standard internet browser (Chrome browser recommended).
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
  • Time to complete the lab—remember, once you start, you cannot pause a lab.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.

How to start your lab and sign in to the Google Cloud console

  1. Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the left is the Lab Details pane with the following:

    • The Open Google Cloud console button
    • Time remaining
    • The temporary credentials that you must use for this lab
    • Other information, if needed, to step through this lab
  2. Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).

    The lab spins up resources, and then opens another tab that shows the Sign in page.

    Tip: Arrange the tabs in separate windows, side-by-side.

    Note: If you see the Choose an account dialog, click Use Another Account.
  3. If necessary, copy the Username below and paste it into the Sign in dialog.

    {{{user_0.username | "Username"}}}

    You can also find the Username in the Lab Details pane.

  4. Click Next.

  5. Copy the Password below and paste it into the Welcome dialog.

    {{{user_0.password | "Password"}}}

    You can also find the Password in the Lab Details pane.

  6. Click Next.

    Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
  7. Click through the subsequent pages:

    • Accept the terms and conditions.
    • Do not add recovery options or two-factor authentication (because this is a temporary account).
    • Do not sign up for free trials.

After a few moments, the Google Cloud console opens in this tab.

Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field.

Task 1. Enable the Discovery Engine API for AI Applications

  1. Navigate to AI Applications by searching for it at the top of the Cloud Console.

  2. On the welcome page, click Continue and Activate the API.

Click Check my progress to verify the objective. Enable required API

Task 2. Create and preview a website search app

A website search app makes it easier for users to find the information they are looking for on your website.

Create a search engine and data store

  1. After you enable AI Applications, you will be taken to a Create App page to create your first app.

  2. On the Search for your website card, click Create.

  3. Leave the checkboxes checked, and for App name enter:

    Google Cloud docs
  4. For Company Name, enter:

    Google Cloud Documentation
  5. Click Continue.

  6. On the Create a data store for your app page, click +CREATE DATA STORE.

  7. Find the Website Content card and click Select.

  8. Leave Advanced website indexing unchecked, and under the Specify URL patterns to index header, include the following URL pattern:

    cloud.google.com/docs/*
  9. Click Continue.

  10. On the Configure your data store page, in the Data store name field, enter:

    Google Cloud Docs Website Content

    Click CREATE.

  11. On the data store page, make sure Google Cloud Docs Website Content is selected, and then click Create.

Click Check my progress to verify the objective. Create a website search app

This search app will take about 2-3 minutes to deploy. You may want to take a take a brief break here before you can use the search app.

Preview the website search app

  1. In the side panel, select Preview.

  2. In the search bar at the top of the Preview window, enter Document AI and press Enter.

  3. Click the view icons to switch between mobile view and desktop view.

    Note: If you see the pop-up Search preview isn't ready yet, wait for few minutes and again search for Document AI in preview section.
You created a search engine and a data store where you indexed a website and then performed a search across that website.

Task 3. Create and preview a structured data search app

Structured data can be used to make website content more visible to search engines. A structured data search app improves the discoverability of website content and provides users with a more relevant search experience.

  1. Click the AI Applications logo to navigate back to the Apps page.

  2. Click +CREATE APP.

  3. On the Create App page, find the Custom search card and click Create.

  4. Leave the checkboxes checked, and for App name enter:

    Movie Database Search
  5. For Company Name, enter:

    Movie Searchers
  6. Click Continue.

  7. On the Data store for your app page, click +CREATE DATA STORE.

  8. Find the Cloud Storage card and click Select.

  9. Select the Structured data (JSONL) radio option.

  10. Under the header Select a folder or a file you want to import, select FILE as the import type and enter the following value:

    cloud-samples-data/gen-app-builder/search/kaggle_movies/movie_metadata.ndjson

    This Cloud Storage bucket contains an NDJSON-formatted dataset of movies made available by Kaggle.

  11. Click Continue.

  12. On the Review schema and assign key properties page, review the columns available for each field and then click Continue.

  13. On the Configure your data store page, in the Data store name field, enter:

    Structured Movie Data

    Click CREATE.

  14. On the data stores page for your app, ensure Structured Movie Data is selected and click CREATE.

  15. On the left-hand navigation menu of your app, select the Data page.

  16. Select the Activity tab.

Note: Please wait until the documents import before proceeding. This process may take several minutes to complete.

Upon success you will see the Status column change to Succeeded as shown in the image below:

  1. Click the DOCUMENTS tab to see the number of documents imported.

  2. Click the Schema tab to see the auto-generated schema for your dataset. Notice that for auto-generated schemas, all fields are retrievable, indexable, facetable and searchable.

Note: Click on the image to zoom further.

Preview the Movies search app and configure the search results display

  1. In the navigation menu, click Preview to test the search app.

  2. In the search bar, enter:

    Google

    Then press Enter to view the results.

    Notice that the full schema is returned. Often times you will not need to display all of the items returned by the full schema. To customize the values to display, AI Applications allows you to configure only the values you want to display. You will see how this is achieved in the next steps.

  3. In the left-hand navigation panel, click Configurations.

  4. Open the Configure fields in results dropdown and map fields in your data store to the attributes to be displayed in search results:

Key Value
Title title
Thumbnail poster_path
URL homepage
Tex 1 tagline
Tex 2 release_date
  1. Click SAVE AND PUBLISH.

Click Check my progress to verify the objective. Create a structured data search app

  1. Back on the Preview page, enter the following in the search bar:

    Harry Potter

    Press Enter to view the search results.

    The output results have been formatted according to the fields you configured and should look similar to the results pictured below.

Integration

In this section you will review available methods of integrating configured search capabilities into your web or server based applications.

Web

  1. In the left-hand side panel, click Integration. Notice at the top of the resulting page that you are on the Widget tab with code to embed your search app in web-based integrations.

    Here you could select the authorization type used to allow users to interact with the search widget. Select JWT or OAuth Based or Public Access depending on your needs. If using JWT or OAuth Based you will need to configure your application to provide a JSON Web Token or an OAuth token provided by your backend. See Add a widget with an authorization token for more details.

    You can also restrict the widget's usage to specific domains specified in the Add allowed domains for the widget list.

  2. Next, click on the API tab.

    Here you can enter a search query and see the API call that could be used to query your app.

Task 4. Create and Preview an unstructured data search app

Unstructured data is data that does not have a predefined format. This type of data can be difficult to search within using traditional search engines. An unstructured data search app can be used to make this data more accessible to gain insights that can be used to improve business operations.

  1. Click the AI Applications logo to navigate back to the Apps page.

  2. Click +CREATE APP.

  3. On the Create App page, find the card for Custom search and click Create.

  4. Once again, leave the checkboxes checked. Enter the following for App name:

    Alphabet Investor PDF Search
  5. For Company Name enter:

    Alphabet Investors

    Then click Continue.

  6. On the Data Stores page for your app, click +CREATE DATA STORE.

  7. Find the card for Cloud Storage and click Select.

  8. For the data type, select Unstructured documents (PDF, HTML, TXT and more).

  9. Under the header Select a folder or a file you want to import, select the Folder type and enter the following value:

    cloud-samples-data/gen-app-builder/search/alphabet-investor-pdfs

    Then click Continue.

This Cloud Storage bucket contains earnings report PDFs from the Alphabet investor site.
  1. On the Configure your data store page, in the Data store name field, enter:

    Unstructured PDF Data
  2. Click the Document Processing Options dropdown to see the parser options.

  3. Select the Layout Parser for Vertex AI Search to identify content elements like text blocks, tables, lists, and structural elements such as titles and headings and use them to define the organization and hierarchy of a document.

  4. Click CREATE.

  5. On the Data Stores page for your app, ensure the Unstructured PDF Data data store is selected and click CREATE.

  6. From the left-hand navigation menu, click Data, then click on the Activity tab.

    When the import process is finished, you will see Import completed in the Status column.

Note: It may take 5-10 minutes to index all of the unstructured data found in the PDF documents. You can complete the progress check below, then take a break for a few minutes to allow it to complete before completing the steps to see the query in action.
  1. Click the DOCUMENTS tab to see the number of documents imported.

Preview the Alphabet Investor PDFs search app

  1. In the navigation menu, click Preview to test the search app.

  2. In the search bar, enter Google revenue in 2008, and then press Enter to search the PDFs.

    Notice the summary as well as the results. Below is an example of search results for the query provided.

Click Check my progress to verify the objective. Create an unstructured data search app

Congratulations!

You learned how to create Vertex AI Search apps using different types of data stores. You configured the display of the search results. You also viewed the code to embed your search app in a web application and viewed an example query to call your app via an API call.

Next steps

Google Cloud training and certification

...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.

Manual Last Updated: April 17, 2025

Lab Last Tested: April 17, 2025

Copyright 2025 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

Before you begin

  1. Labs create a Google Cloud project and resources for a fixed time
  2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
  3. On the top left of your screen, click Start lab to begin

This content is not currently available

We will notify you via email when it becomes available

Great!

We will contact you via email if it becomes available

One lab at a time

Confirm to end all existing labs and start this one

Use private browsing to run the lab

Use an Incognito or private browser window to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.