diff --git a/notebooks/ch03/functions/air_quality_data_retrieval.py b/notebooks/ch03/functions/air_quality_data_retrieval.py index 1abcef18..90911628 100644 --- a/notebooks/ch03/functions/air_quality_data_retrieval.py +++ b/notebooks/ch03/functions/air_quality_data_retrieval.py @@ -21,8 +21,8 @@ def get_historical_data_for_date(date: str, feature_view, weather_fg, model) -> date_datetime = datetime.datetime.strptime(date, "%Y-%m-%d").date() features_df, labels_df = feature_view.training_data( - start_time=date_datetime - datetime.timedelta(days=1), - end_time=date_datetime, + start_time=date_datetime, + end_time=date_datetime + datetime.timedelta(days=1), # event_time=True, statistics_config=False ) diff --git a/notebooks/ch03/functions/context_engineering.py b/notebooks/ch03/functions/context_engineering.py index 274af337..19c1d9b8 100644 --- a/notebooks/ch03/functions/context_engineering.py +++ b/notebooks/ch03/functions/context_engineering.py @@ -65,9 +65,12 @@ def get_function_calling_prompt(user_query): ###INSTRUCTIONS: - You need to choose one function to use and retrieve paramenters for this function from the user input. -- If the user query contains 'will', and specifies a single day or date, use get_future_data_for_date function -- If the user query contains 'will', and specifies a range of days or dates, use or get_future_data_in_date_range function. -- If the user query is for future data, but only includes a single day or date, use the get_future_data_for_date function. +- If the user query contains 'will', and specifies a single day or date, use get_future_data_in_date_range function +- If the user query contains 'will', and specifies a range of days or dates, use get_future_data_in_date_range function. +- If the user query is for future data, but only includes a single day or date, use the get_future_data_in_date_range function, +- If the user query contains 'today' or 'yesterday', use get_historical_data_for_date function. +- If the user query contains 'tomorrow', use get_future_data_in_date_range function. +- If the user query is for historical data, and specifies a range of days or dates, use use get_historical_data_for_date function. - If the user says a day of the week, assume the date of that day is when that day next arrives. - Do not include feature_view and model parameters. - Provide dates STRICTLY in the YYYY-MM-DD format.