Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -411,7 +411,7 @@ def is_content_unique(new_content, existing_contents, similarity_threshold=0.8):
|
|
411 |
return True
|
412 |
|
413 |
def assess_relevance_and_summarize(llm_client, query, document, temperature=0.2):
|
414 |
-
system_prompt = """You are a world-class AI assistant specializing in
|
415 |
|
416 |
user_prompt = f"""
|
417 |
Query: {query}
|
@@ -434,7 +434,7 @@ Your response should be in the following format:
|
|
434 |
Relevant: [Yes/No]
|
435 |
Summary: [Your detailed summary if relevant, or "Not relevant" if not]
|
436 |
|
437 |
-
Remember to focus on
|
438 |
"""
|
439 |
|
440 |
messages = [
|
|
|
411 |
return True
|
412 |
|
413 |
def assess_relevance_and_summarize(llm_client, query, document, temperature=0.2):
|
414 |
+
system_prompt = """You are a world-class AI assistant specializing in news analysis. Your task is to assess the relevance of a given document to a user's query and provide a detailed summary if it's relevant."""
|
415 |
|
416 |
user_prompt = f"""
|
417 |
Query: {query}
|
|
|
434 |
Relevant: [Yes/No]
|
435 |
Summary: [Your detailed summary if relevant, or "Not relevant" if not]
|
436 |
|
437 |
+
Remember to focus on key aspects and implications in your assessment and summary. Aim to make the summary distinctive, highlighting what makes this particular news item unique compared to similar news.
|
438 |
"""
|
439 |
|
440 |
messages = [
|