– Introduction to the exciting world of generative AI and its use in various applications
– Benefits of using Workflows to orchestrate and automate gen AI models
– Example of generating histories of a list of countries using Workflows in parallel with Vertex AI’s PaLM 2 for Text model
Generative AI, or gen AI, has captured the interest of many people as it allows for text generation, image creation, code translation, and more. Workflows, a service used to orchestrate and automate other services, is especially useful when working with gen AI models as it allows for easy integration and automation through SDKs, libraries, or REST APIs. In this post, we will explore how to call gen AI models from Workflows and discuss the benefits of using Workflows in a gen AI context.
One practical use case involves generating histories of a list of countries using a large language model (LLM). Sending the entire list of countries to the LLM may exceed response size limits, while generating histories sequentially may be time-consuming. Workflows offers a solution with parallel steps, allowing the LLM to generate histories for each country simultaneously, thus avoiding response size limits and reducing processing time.
To implement this use case with Workflows, we can use Vertex AI’s PaLM 2 for Text model. Familiarizing oneself with the Vertex AI REST API and the predict method for text generation with the text-bison model is essential. A provided workflow file (country-histories.yaml) demonstrates how to call Vertex AI PaLM 2 for Text from Workflows in parallel, streamlining the process of generating histories for a list of countries efficiently.