The movie expert playbook-based, prebuilt agent can answer a wide range of movie-related questions. The agent references both a BigQuery dataset containing metadata about movies and an unstructured data store of movie plot summaries sourced from Wikipedia.
Sample dialog
This sample dialog shows common scenarios that this prebuilt agent handles.
Plot summary and database search
- The user asks the agent for a summary of Avatar.
- The agent retrieves the movie plot for Avatar from the data store.
- The agent summarizes the plot for the user.
- The user asks how much profit Avatar made.
- The agent searches the database for Avatar's revenue and budget.
- The agent uses this information to answer the user's question.
- The user asks what the highest-earning non-English movie was in the month that Avatar was released.
- The agent searches the database, filtering by date and language, and answers the user's question.
| User Input | Agent Response |
|---|---|
| Hi | |
| Hi there, welcome to Cymbal Movies! I'm here to help with your movie-related questions. Ask away! | |
| Tell me more about Avatar | |
| The plot of the movie "Avatar" is as follows: In 2154, humans have depleted Earth's natural resources, leading to a severe energy crisis. The Resources Development Administration (RDA for short) mines for a valuable mineral --- unobtanium --- on Pandora, a densely forested habitable moon orbiting the gas giant Polyphemus in the Alpha Centauri star system. Pandora, whose atmosphere is poisonous to humans, is inhabited by the Na'vi, a species of 10-foot tall (3.0 m), blue-skinned, sapient humanoids that live in harmony with nature and worship a mother goddess named Eywa. Is there anything else I can help you with? |
|
| How much profit did it make? | |
| Avatar had a budget of $237 million and grossed $2.79 billion, making a profit of $2.55 billion. Is there anything else I can help you with? |
|
| What was the highest-earning non-English movie in the month that Avatar was released? | |
| The highest-earning non-English movie in the month that Avatar was released was 3 Idiots, which grossed $70 million. Is there anything else I can help you with? |
|
| That's all, thanks! | |
| You're welcome! |
Basic setup
To set up this prebuilt agent:
- Import the prebuilt agent.
- Leave the Create dependent resources option selected.
Tool setup
This agent includes tools to
integrate with external services. The service automatically creates the dependent
BigQuery dataset named "Movies" with two tables named
"movies_data" and "credits". The service imports the movie metadata into the
newly created table, and the bq-search OpenAPI tool uses that data.
In addition, the service creates a new Data Store named "Movie Expert-data-store", imports the required documents, and uses it for the "cymbal-movie-plots" data store tool.
Steering
The cymbal-movie-plots tool connects to a data store pointing to a
Cloud Storage bucket containing movie plot summaries.
Searching the movie database
The bq-search OpenAPI tool connects to the BigQuery API, submits the SQL
query generated by the agent, executes it on the BigQuery table
containing metadata on movies, and returns the query outputs to the agent as a
JSON object.
Configure service account authentication for this tool, and provide a service account that you've granted the BigQuery Job User and BigQuery Data Viewer roles.
Complete
You can now test your agent and its integrations.