arka7 commited on
Commit
6cd8cb1
·
verified ·
1 Parent(s): 2c75cb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -244,7 +244,7 @@ init_database()
244
  def search_science_breakthroughs(query: str) -> str:
245
  """Search for recent scientific breakthroughs."""
246
  try:
247
- search = TavilySearchResults(max_results=10, include_domains=["sciencedaily.com", "nature.com", "science.org", "newscientist.com", "scientificamerican.com"], search_depth="advanced")
248
  results = search.invoke(query)
249
  return json.dumps(results, indent=2)
250
  except Exception as e:
@@ -501,16 +501,16 @@ def run_discovery(state: EnhancedAgentState, progress_callback=None) -> Enhanced
501
 
502
  system_msg = SystemMessage(content=f"""You are the Discovery Agent for Tuesday Trivia.
503
 
504
- CRITICAL TITLE FOCUS:
505
  1. MUST check TITLE similarity using check_topic_similarity - focus on the TITLE (first line) ONLY
506
- 2. The title is the most important unique identifier - titles should be significantly different
507
  3. When using check_topic_similarity, it specifically checks title word overlap
508
- 4. REJECT stories with titles that have >60% word overlap with existing titles
509
 
510
  OTHER REQUIREMENTS:
511
  1. Use search_science_breakthroughs to find recent articles
512
  2. Use get_all_previous_posts to see existing titles
513
  3. Find 10-15 RECENT breakthroughs (last 1-4 weeks)
 
514
 
515
  Output Format:
516
  **Title:** [Unique, compelling title]
@@ -574,10 +574,11 @@ def run_curator(state: EnhancedAgentState, progress_callback=None) -> EnhancedAg
574
 
575
  system_msg = SystemMessage(content="""You are the Curator Agent.
576
 
577
- PRIMARY FOCUS: Check TITLE uniqueness carefully!
578
  1. Use check_topic_similarity to verify the selected story's TITLE is unique
579
- 2. TITLES must have <60% word overlap with existing posts
580
  3. Prioritize stories with completely unique, fresh titles
 
581
 
582
  Then rank on:
583
  - Recency (1-10): How recent is the discovery?
 
244
  def search_science_breakthroughs(query: str) -> str:
245
  """Search for recent scientific breakthroughs."""
246
  try:
247
+ search = TavilySearchResults(max_results=10, include_domains=["sciencedaily.com", "nature.com", "science.org"], search_depth="advanced")
248
  results = search.invoke(query)
249
  return json.dumps(results, indent=2)
250
  except Exception as e:
 
501
 
502
  system_msg = SystemMessage(content=f"""You are the Discovery Agent for Tuesday Trivia.
503
 
504
+ TITLE FOCUS:
505
  1. MUST check TITLE similarity using check_topic_similarity - focus on the TITLE (first line) ONLY
 
506
  3. When using check_topic_similarity, it specifically checks title word overlap
507
+ 4. REJECT stories with titles that have >80% word overlap with existing titles
508
 
509
  OTHER REQUIREMENTS:
510
  1. Use search_science_breakthroughs to find recent articles
511
  2. Use get_all_previous_posts to see existing titles
512
  3. Find 10-15 RECENT breakthroughs (last 1-4 weeks)
513
+ 4. Avoid any awards and focus more on new breathroughs and discoveries
514
 
515
  Output Format:
516
  **Title:** [Unique, compelling title]
 
574
 
575
  system_msg = SystemMessage(content="""You are the Curator Agent.
576
 
577
+ Requirements:
578
  1. Use check_topic_similarity to verify the selected story's TITLE is unique
579
+ 2. TITLES must have <80% word overlap with existing posts
580
  3. Prioritize stories with completely unique, fresh titles
581
+ 4. Avoid any awards ore recognition posts and focus more on new breathroughs and discoveries
582
 
583
  Then rank on:
584
  - Recency (1-10): How recent is the discovery?