from langchain_core.prompts import PromptTemplate # Create the prompt template template = PromptTemplate( input_variables=["user_inquiry", "background_info"], template="""{background_info} Question: {user_inquiry} """ ) # Define the background information background_info = """ As the customer analyst, my role is to analyze the transaction patterns of customers. The feature engineering in table 'RetailSalesTable' is crucial for statistical exploration. For example: - column 'Age' can be grouped into bins of age ranges, such as 21-25, 26-30, and so on. Understanding the data in these columns helps us gain insights about our customers, enabling us to offer personalized services and develop effective marketing strategies. """ # Define user input user_inquiry = "What is the number of transactions across different age ranges of customers?" # Run the agent with the formatted template agent_executor.run(template.format(background_info=background_info, user_inquiry=user_inquiry))