@@ -172,6 +172,9 @@ def main():
172172 print ("report_date: " )
173173 print (report_date )
174174
175+ # Get the date range of news we are interested in, as a sentence.
176+ news_range_of_interest = f"Please only find recent articles, created on or later than { str (logical_dag_date )} ."
177+
175178 # Check both input files exist, if not, error out
176179 gcs_fpath2 = GCS_BUCKET + INPUT_FPATH_2 + logical_dag_date_str + ".txt"
177180 gcs_fpath3 = GCS_BUCKET + INPUT_FPATH_3 + logical_dag_date_str + ".txt"
@@ -232,8 +235,10 @@ def main():
232235
233236 # Prompt #1 - New Features in Popular Browsers
234237 prompt1 = (
235- "Look for articles from the past month about what new features have been added to popular web browsers, "
236- "how they are incorporating AI, and how they are navigating challenges like the windows 10 transition. Then summarize these findings."
238+ "Look for articles about what new features have been added to popular web browsers, "
239+ "and how popular browsers are incorporating AI. "
240+ f"{ news_range_of_interest } "
241+ "Then summarize these findings."
237242 "Firefox should be omitted from this search as we are focusing on Firefox's competitors."
238243 )
239244 final_output_1 , response_object_1 = summarize_with_open_ai (
@@ -290,10 +295,13 @@ def main():
290295More details can be found here: [Chrome Dev Tools](https://developer.chrome.com/docs/devtools/news?hl=en#whats-new)"""
291296
292297 # Prompt #5 - Browser & Device Partnership News
293- prompt5 = """Please find articles related to browser & device partnerships.
298+ prompt5 = (
299+ """Please find articles related to browser & device partnerships.
294300Firefox should be omitted from this search as we are focusing on Firefox's competitors.
295301Please find all recent announcements of browser-device partnerships with browsers like Chrome, Edge, Safari, etc. and
296302devices like mobile phones, Smart TVs, or VR (virtual reality), then summarize these findings."""
303+ + news_range_of_interest
304+ )
297305 final_output_5 , response_object_5 = summarize_with_open_ai (
298306 client ,
299307 MODEL_TYPE ,
@@ -306,7 +314,10 @@ def main():
306314 final_report += f"\n { final_output_5 } \n \n "
307315
308316 # Prompt #6 - Online Advertising News
309- prompt6 = "Look for articles from the past month about news related to online advertising, and summarize the findings."
317+ prompt6 = (
318+ "Look for articles about news related to online advertising, and summarize the findings."
319+ + news_range_of_interest
320+ )
310321 final_output_6 , response_object_6 = summarize_with_open_ai (
311322 client ,
312323 MODEL_TYPE ,
@@ -320,7 +331,8 @@ def main():
320331
321332 # Prompt #7 - AI News
322333 prompt7 = (
323- "Look for articles from the past month about news related to AI in general."
334+ "Look for articles about news related to AI in general."
335+ + news_range_of_interest
324336 )
325337 final_output_7 , response_object_7 = summarize_with_open_ai (
326338 client ,
0 commit comments