the "prod" workspace.import tectonworkspace = tecton.get_workspace("prod")feature_service = workspace.get_feature_service("user_transaction_metrics")Prompts‚ÄãHere we will set up a custom TectonPromptTemplate. This prompt template will take in a user_id , look up their stats, and format those stats into a prompt.Note that the input to this prompt template is just user_id, since that is the only user defined piece (all other variables are looked up inside the prompt template).from langchain.prompts import PromptTemplate, StringPromptTemplatetemplate = """Given the vendor's up to date transaction stats, write them a note based on the following rules:1. If they had a transaction in the last day, write a short congratulations message on their recent sales2. If no transaction in the last day, but they had a transaction in the last 30 days, playfully encourage them to sell more.3. Always add a silly joke about chickens at the endHere are the vendor's stats:Number of Transactions Last Day: {transaction_count_1d}Number of Transactions Last 30 Days: {transaction_count_30d}Your response:"""prompt = PromptTemplate.from_template(template)class TectonPromptTemplate(StringPromptTemplate):    def format(self, **kwargs) -> str:        user_id = kwargs.pop("user_id")        feature_vector = feature_service.get_online_features(            join_keys={"user_id": user_id}        ).to_dict()        kwargs["transaction_count_1d"] = feature_vector[            "user_transaction_counts.transaction_count_1d_1d"        ]        kwargs["transaction_count_30d"] = feature_vector[            "user_transaction_counts.transaction_count_30d_1d"        ]        return prompt.format(**kwargs)prompt_template = TectonPromptTemplate(input_variables=["user_id"])print(prompt_template.format(user_id="user_469998441571"))    Given the vendor's up to date transaction stats, write them a note based on the following rules:        1. If they had a transaction in the last day, write a short congratulations
Feature stores are a concept from traditional machine learning that make sure data fed into models is up-to-date and relevant. For more on this, see here.
Feature stores are a concept from traditional machine learning that make sure data fed into models is up-to-date and relevant. For more on this, see here. ->: the "prod" workspace.import tectonworkspace = tecton.get_workspace("prod")feature_service = workspace.get_feature_service("user_transaction_metrics")Prompts‚ÄãHere we will set up a custom TectonPromptTemplate. This prompt template will take in a user_id , look up their stats, and format those stats into a prompt.Note that the input to this prompt template is just user_id, since that is the only user defined piece (all other variables are looked up inside the prompt template).from langchain.prompts import PromptTemplate, StringPromptTemplatetemplate = """Given the vendor's up to date transaction stats, write them a note based on the following rules:1. If they had a transaction in the last day, write a short congratulations message on their recent sales2. If no transaction in the last day, but they had a transaction in the last 30 days, playfully encourage them to sell more.3. Always add a silly joke about chickens at the endHere are the vendor's stats:Number of Transactions Last Day: {transaction_count_1d}Number of Transactions Last 30 Days: {transaction_count_30d}Your response:"""prompt = PromptTemplate.from_template(template)class TectonPromptTemplate(StringPromptTemplate):    def format(self, **kwargs) -> str:        user_id = kwargs.pop("user_id")        feature_vector = feature_service.get_online_features(            join_keys={"user_id": user_id}        ).to_dict()        kwargs["transaction_count_1d"] = feature_vector[            "user_transaction_counts.transaction_count_1d_1d"        ]        kwargs["transaction_count_30d"] = feature_vector[            "user_transaction_counts.transaction_count_30d_1d"        ]        return prompt.format(**kwargs)prompt_template = TectonPromptTemplate(input_variables=["user_id"])print(prompt_template.format(user_id="user_469998441571"))    Given the vendor's up to date transaction stats, write them a note based on the following rules:        1. If they had a transaction in the last day, write a short congratulations