Feature platforms, traditionally known for powering predictive machine learning applications, are now taking on a critical role in Generative AI. While chat applications have emerged as the “hello world” of this Generative AI wave, their full potential often depends on integrating additional data for richer, more personalized experiences. By leveraging feature platforms, companies can leverage the same “AI Ready Data” powering their predictive models to enhance Generative AI applications.
In this blog, we’ll discuss Feature Platforms’ role in Generative AI applications and build out a reference architecture for these types of applications using AWS, Snowflake AI Data Cloud, and Tecton.
What is a Feature Platform?
Feature Platforms are an extension of Feature Stores and offer enhanced functionality like authoring and computation of feature data (for more information on the details of Feature Stores and Feature Platforms, check out this blog post).
While Feature Stores like Feast traditionally focus on the management and serving of feature data, Feature Platforms like Tecton take this a step further by offering tools to streamline feature development through simple SDKs that define features as code, as well as managing the execution of that code to create the features.
Feature Platform’s Role in Generative AI
Generative AI applications, particularly those built for the enterprise, are well-known to rely on privileged, domain-specific data for context. While extremely powerful, foundation models such as the Claude or GPT series of models are trained on mostly public data. If you use one of these models for an internal use case, you’ll need to provide your proprietary data since these models do not know that internal information.
Typically, this has been in the form of unstructured data – taking proprietary documents such as PDFs or PowerPoints and converting them into a format to be used by the model. However, most organizations also have a wealth of structured data that could provide these models with context to further enhance their capabilities.
Imagine you operate a running equipment company and have developed a customer-facing chat application to aid customers in purchasing new running gear. You’ve already personalized the customer’s experience and know their preferences such as brand, average purchase price, etc… A customer comes to the app and says, “Please help with finding me a new pair of running shoes. I’m size 12.”.
A “traditional” AI application without the customer’s context would likely perform some sort of lookup that meets the customer’s criteria of shoe size and return all of those options to the user in natural language using a large language model (LLM).
However, incorporating a feature platform can enable us to pull additional data, such as the customer’s preferred shoe brand, preferred shoe color, and average purchase amount, to tailor the results and provide only the most relevant pairs of shoes.
This is just one simple example of how feature platforms can enhance Generative AI applications. Still, hopefully, it helps illustrate the different ways to leverage structured data to supplement Generative AI applications.
Reference Architecture
Now that we’ve shown the value a feature platform can bring to Generative AI applications let’s highlight a sample architecture using Tecton, Snowflake, and AWS. This architecture focuses on the data and backend components needed to build a Generative AI application that leverages structured feature data. Other components would need to be baked into the architecture to account for the front-end and any other data needs.
Tecton
As mentioned prior, Tecton is a feature platform that manages the feature’s end-to-end lifecycle—everything from computing feature transformation logic to serving features is managed by Tecton. This offloads many of the complex challenges of running a feature platform, such as infrastructure management and low-latency online feature serving.
In Tecton, you can register Data Sources, which are connections to your data that will be used to build features. Our architecture will leverage connections to both Snowflake and Kinesis Data Streams in AWS, showing how Tecton can pull data from various sources in both a batch and streaming fashion.
Once we have data sources registered, we’ll define Feature Views, which are pieces of code that define the transformations needed to compute a feature. Tecton will fully manage the orchestration of this code, meaning you don’t have to worry about orchestrating pipelines to execute the transformation logic. Feature Views can be defined as batch, streaming, or real-time.
These feature views materialize in Offline and Online Feature Stores. Typically, the offline store is used for model training or batch inferencing of machine learning models. In contrast, the online store is used in more real-time applications, such as our flight assistant example earlier. Tecton manages data synchronization between the offline and online stores, letting you focus on building your application logic.
Lastly, Feature Services enable you to group features from different Feature Views for training or serving. Tecton recommends creating a Feature Service per model or application-consuming features. This makes consuming all of the features needed for a prediction through a single API call is easy.
Snowflake
Given that many companies store their data in Snowflake, we can leverage Tecton’s integration with Snowflake to manage batch feature computation and offline storage.
Using Tecton’s Snowflake Data Source enables us to connect to Snowflake data sets to build feature views. We can also leverage Snowflake to compute the feature logic. So while we’re building the Tecton Feature View with Tecton’s SDK, we can use our existing Snowflake environment to create and store the offline features.
This allows us to take advantage of each platform’s strengths – Snowflake is a general data platform for ingestion, transformation, and storage of data, and Tecton is used for feature management and low latency feature serving.
Tecton + Snowflake makes up the first portion of our architecture, which is focused on connecting to our data sources, computing the features, and serving them via a feature service.
AWS
While Tecton and Snowflake manage everything with the feature data, this architecture utilizes AWS services for accessing Generative AI models and the infrastructure needed to host an application.
Amazon Bedrock
Bedrock is a fully managed service in AWS that offers a wide variety of Foundation Models and tooling to better use them.
In Bedrock, we can provision an instance of Anthropic’s Claude 3.5 Sonnet to serve as the LLM in our application. This enables us to secure access to this powerful model. The inputs sent to the model are never shared with the model provider, enabling us to pass proprietary data to these models without worrying about data leakage.
Bedrock also offers a feature called Guardrails, which enables us to build safeguards into the application. Safeguards are critical components in AI chat applications to ensure the model stays on track and doesn’t produce harmful content.
API Deployment
The architecture also leverages an API layer that is responsible for receiving user prompts and orchestrating the necessary calls with Tecton’s Feature Service and our LLM deployed on Bedrock. To keep things simple, we’ll leverage AWS Lambda for serverless API computing, alongside AWS API Gateway to expose our endpoints.
Putting it Together
When combining the various components mentioned above, our architecture diagram looks like this:
Closing
This simple yet powerful architecture will enable the building of contextual Generative AI applications. Benefits of this architecture include:
Scale – Tecton, Snowflake, and AWS are all platforms with proven scale and can meet the requirements of even the most demanding applications.
Infrastructure management – Because these components are managed services, we don’t need to worry about supporting the underlying infrastructure.
Strengths – This architecture leverages each platform’s strengths and combines them to create something greater than the sum of its parts.
At phData, we help many of their customers establish architectures for AI-ready data. If you have any questions about your Gen AI architecture or applications, please contact us!