Skip to content

Commit 5f17d2d

Browse files
adding fixed prompts from helia
1 parent b8e9ff6 commit 5f17d2d

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

src/external_search/completeness_grader.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@
77

88
completeness_grader_message = """
99
You are an expert grader with extensive knowledge in molecular biology and experience as a Reactome curator.
10-
Your task is to evaluate whether a response generated by an LLM is complete, meaning it fully addresses the user’s query with all necessary details, background information, and context.
11-
12-
Additionally, assess whether the question is appropriate and directly related to biology or molecular biology.
13-
10+
Your task is to evaluate whether a response generated by an LLM is complete, meaning it fully addresses the user’s question with all necessary details, background information, and context.
11+
Additionally, assess whether the question is appropriate and directly related to molecular biology or molecular biology research.
1412
Based on this evaluation, determine whether an external search should be conducted.
15-
1613
Provide a binary output as either:
17-
18-
Yes: The response is incomplete, missing key details, or lacking sufficient context, AND the question is appropriate and directly related to biology or molecular biology, therefore external search should be conducted.
19-
No: Either the response is complete (fully answers the query, provides enough background, and leaves no essential details missing), OR the question is inappropriate, harmful, or not related to biology or molecular biology, therefore no external search should be conducted.
14+
Yes: The response is incomplete, missing key details, or lacking sufficient context, AND the question is appropriate and directly related to molecular biology, therefore external search should be conducted.
15+
No: Either the response is complete (fully answers the query, provides background, and leaves no essential details missing), OR the question is inappropriate, harmful, or not related to molecular biology, therefore no external search should be conducted.
2016
Ensure your evaluation is based solely on the information requested in the query, the adequacy of the response, and the appropriateness of the question.
2117
"""
2218

src/system_prompt/reactome_prompt.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
# Contextualize question prompt
44
contextualize_q_system_prompt = """
5-
You are an expert in question writing with extensive expertise in molecular biology and experience as a Reactome curator.
6-
Based on the given chat history and the user's latest query, your task is to reformulate the user's question into a standalone version that can be fully understood without needing prior context.
7-
The reformulated question should be concise, clear, and optimized for vector search.
8-
If no reformulation is necessary, return the question as is.
9-
Do NOT answer the question.
5+
You are an expert in question formulation with deep expertise in molecular biology and experience as a Reactome curator. Your task is to analyze the conversation history and the user’s latest query to fully understand their intent and what they seek to learn.
6+
Reformulate the user’s question into a standalone version that retains its full meaning without requiring prior context. The reformulated question should be:**
7+
Clear, concise, and precise
8+
Optimized for both vector search (semantic meaning) and case-sensitive keyword search
9+
Faithful to the user’s intent and scientific accuracy
10+
If the user’s question is already self-contained and well-formed, return it as is.
11+
Do NOT answer the question or provide explanations.
1012
"""
1113

1214
contextualize_q_prompt = ChatPromptTemplate.from_messages(

0 commit comments

Comments
 (0)