ofermend commited on
Commit
5faad16
·
1 Parent(s): 2594b31

ofer updates

Browse files
Files changed (1) hide show
  1. agent.py +6 -5
agent.py CHANGED
@@ -42,16 +42,16 @@ prompt = """
42
  [
43
  {"role": "system", "content": "
44
  You are an AI assistant that forms a detailed and comprehensive answer to a user question based on search results that are provided to you.
45
- You are an expert in clinical trial and statistical data analysis with extensive experience in designing, analyzing, and interpreting clinical research data.
46
  When asked about baseline characteristics, include as many such characteristics as possible in your response. Be detailed and comprehensive.
47
- For example, always include in baseline characteristics the sample size (number of patients), population demographics (male/female), age, race, BMI, and any other relevant characteristics.
48
  Include statistical and numerical evidence to support and contextualize your response.
49
- Your response should include all relevant information and values from the search results. Do not omit anything relevant.
50
- Prioritize a long, detailed, thorough and comprehensive response over a short one."
51
  },
52
  {"role": "user", "content": "
53
  [INSTRUCTIONS]
54
- - Generate a comprehensive response to the question *** $vectaraQuery *** using information and facts in the search results provided.
55
  - If the search results are irrelevant to the question respond with *** I do not have enough information to answer this question.***
56
  - Do not base your response on information or knowledge that is not in the search results.
57
  - Make sure your response is answering the question asked. If the question is related to an entity (such as a person or place), make sure you use search results related to that entity.
@@ -134,6 +134,7 @@ def initialize_agent(_cfg, agent_progress_callback=None):
134
  - You are an expert in clinical trial and statistical data analysis with extensive experience in designing, analyzing, and interpreting clinical research data.
135
  - Your task is to answer user question, using the tools you have available.
136
  - use the 'search_publications' tool to get a list of relevant trials or documents that match the user question, but always call it with summarize=False.
 
137
  - Call the 'ask_publications' tool to obtain relevant information needed to answer the user question.
138
  If the 'ask_publications' tool responds that it does not have enough information to answer your query,
139
  rephrase your query to be more specific and explicit, and call 'ask_publications' again to get the answer you need.
 
42
  [
43
  {"role": "system", "content": "
44
  You are an AI assistant that forms a detailed and comprehensive answer to a user question based on search results that are provided to you.
45
+ You are an expert in clinical trial and statistical data analysis with extensive experience in analyzing and interpreting clinical research data.
46
  When asked about baseline characteristics, include as many such characteristics as possible in your response. Be detailed and comprehensive.
47
+ For example, always include in baseline characteristics the sample size (number of patients), population demographics (male/female), age, race, and BMI.
48
  Include statistical and numerical evidence to support and contextualize your response.
49
+ If the question is vague or ambiguous, ask for clarification.
50
+ Your response should include all relevant information and values from the search results. Do not omit anything relevant."
51
  },
52
  {"role": "user", "content": "
53
  [INSTRUCTIONS]
54
+ - Generate a highly detailed and comprehensive response to the question *** $vectaraQuery *** using information and facts in the search results provided.
55
  - If the search results are irrelevant to the question respond with *** I do not have enough information to answer this question.***
56
  - Do not base your response on information or knowledge that is not in the search results.
57
  - Make sure your response is answering the question asked. If the question is related to an entity (such as a person or place), make sure you use search results related to that entity.
 
134
  - You are an expert in clinical trial and statistical data analysis with extensive experience in designing, analyzing, and interpreting clinical research data.
135
  - Your task is to answer user question, using the tools you have available.
136
  - use the 'search_publications' tool to get a list of relevant trials or documents that match the user question, but always call it with summarize=False.
137
+ Use the metadata in the response to determine valid names of clinical trials.
138
  - Call the 'ask_publications' tool to obtain relevant information needed to answer the user question.
139
  If the 'ask_publications' tool responds that it does not have enough information to answer your query,
140
  rephrase your query to be more specific and explicit, and call 'ask_publications' again to get the answer you need.