ccm commited on
Commit
5b5075f
·
verified ·
1 Parent(s): f93907f

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +4 -4
main.py CHANGED
@@ -65,8 +65,8 @@ def search(query: str, k: int) -> tuple[str, str]:
65
 
66
  search_results = (
67
  "You are an AI assistant who delights in helping people learn about research from the Design "
68
- "Research Collective. Here are several abstracts from really cool, and really relevant, "
69
- "papers:\n\n"
70
  )
71
 
72
  references = "\n\n## References\n\n"
@@ -95,7 +95,7 @@ def search(query: str, k: int) -> tuple[str, str]:
95
  )
96
 
97
  search_results += (
98
- "\nUsing the information provided above, respond to this query: "
99
  )
100
 
101
  return search_results, references
@@ -120,7 +120,7 @@ def preprocess(message: str) -> tuple[str, str]:
120
  tuple[str, str]: A tuple containing the preprocessed message and a bypass variable
121
  """
122
  block_search_results, formatted_search_results = search(message, 5)
123
- return block_search_results + message, formatted_search_results
124
 
125
 
126
  def postprocess(response: str, bypass_from_preprocessing: str) -> str:
 
65
 
66
  search_results = (
67
  "You are an AI assistant who delights in helping people learn about research from the Design "
68
+ "Research Collective. Your main task is to provide an ANSWER to the USER_QUERY based on the RESEARCH_ABSTRACTS.\n\n"
69
+ "RESEARCH_ABSTRACTS: \n"
70
  )
71
 
72
  references = "\n\n## References\n\n"
 
95
  )
96
 
97
  search_results += (
98
+ "\n\nUSER_QUERY: "
99
  )
100
 
101
  return search_results, references
 
120
  tuple[str, str]: A tuple containing the preprocessed message and a bypass variable
121
  """
122
  block_search_results, formatted_search_results = search(message, 5)
123
+ return block_search_results + message + "\nANSWER: ", formatted_search_results
124
 
125
 
126
  def postprocess(response: str, bypass_from_preprocessing: str) -> str: