summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuren Hao <97327730+YurenHao0426@users.noreply.github.com>2025-03-30 20:33:34 -0700
committerGitHub <noreply@github.com>2025-03-30 20:33:34 -0700
commit864a62d1e97a7fbda50539e8bb6c92ffe82b3f31 (patch)
treed364b1601a6f6ea730428b262657fb5c17f37028
parent6a3b1ea70661c2c7570263b225f5ee60e6d67a58 (diff)
Update fetch_papers.py
-rw-r--r--scripts/fetch_papers.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/fetch_papers.py b/scripts/fetch_papers.py
index 68a9fe9..79246c9 100644
--- a/scripts/fetch_papers.py
+++ b/scripts/fetch_papers.py
@@ -36,9 +36,10 @@ def advanced_filter(entry):
API_URL = "https://uiuc.chat/api/chat-api/chat"
MODEL_NAME = "qwen2.5:14b-instruct-fp16"
SYSTEM_PROMPT = (
- "Based on the given title and abstract, please determine if the paper "
- "is relevant to both language models and bias (or fairness). "
- "If yes, respond 1; otherwise respond 0."
+ "You are a helpful assistant. The user will give you a paper title and abstract. "
+ "Your task: Decide if this paper is about large language models (or generative text models) AND about bias/fairness. "
+ "If yes, respond with just a single character: 1. Otherwise, respond with a single character: 0. "
+ "No extra explanation, no punctuation—only the number."
)
def is_relevant_by_api(title, summary, api_key):
@@ -56,7 +57,7 @@ def is_relevant_by_api(title, summary, api_key):
},
{
"role": "user",
- "content": f"Title: {title}\nAbstract: {summary}"
+ "content": SYSTEM_PROMPT + f"Title: {title}\nAbstract: {summary}"
}
],
"api_key": api_key,