Skip to content

Commit e559bf1

Browse files
sts07142Umpire2018
authored andcommitted
fix: system prompt to correct in rag.py
fix JSON format key - score to relevance_score
1 parent f64c9aa commit e559bf1

File tree

1 file changed

+1
-1
lines changed
  • repo_agent/chat_with_repo

1 file changed

+1
-1
lines changed

repo_agent/chat_with_repo/rag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def rerank(self, query ,docs): # 这里要防止返回值格式上出问题
4747
response_format={"type": "json_object"},
4848
temperature=0,
4949
messages=[
50-
{"role": "system", "content": "You are an expert relevance ranker. Given a list of documents and a query, your job is to determine how relevant each document is for answering the query. Your output is JSON, which is a list of documents. Each document has two fields, content and score. relevance_score is from 0.0 to 100.0. Higher relevance means higher score."},
50+
{"role": "system", "content": "You are an expert relevance ranker. Given a list of documents and a query, your job is to determine how relevant each document is for answering the query. Your output is JSON, which is a list of documents. Each document has two fields, content and relevance_score. relevance_score is from 0.0 to 100.0. Higher relevance means higher score."},
5151
{"role": "user", "content": f"Query: {query} Docs: {docs}"}
5252
]
5353
)

0 commit comments

Comments
 (0)