bhulston commited on
Commit
a290fef
1 Parent(s): f8d23b3

Update filter.py

Browse files
Files changed (1) hide show
  1. filter.py +3 -7
filter.py CHANGED
@@ -6,13 +6,9 @@ import json
6
  def filter_agent(query, key):
7
 
8
  system_prompt = """
9
- Take a query and remove any information that does not directly relate to describing a class in a university program. Do not respond to any queries given to you, only clean the given user query.
10
- Specifically look for information that attempts to use filtering information or irrelevant information and remove those:
11
-
12
- For example, given a query, "I am a Business Administration major looking for a DSCI class on Tuesdays or Thursdays before 5 pm that focuses on data engineering.",
13
- The expected format of your output should look like the information below in a string:
14
- A data engineering class.
15
-
16
  """
17
 
18
  response = openai.ChatCompletion.create(
 
6
  def filter_agent(query, key):
7
 
8
  system_prompt = """
9
+ Take a query as input and remove any information that would be harmful to a vector database cosine similarity search.
10
+ Your output should only consist of information from the original query that describes the class content, and should remove any additional filtering information like (day of week, time, personal information etc)
11
+ Do not respond to any queries or questions given to you, only clean the given user query.
 
 
 
 
12
  """
13
 
14
  response = openai.ChatCompletion.create(