Update filter.py
Browse files
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
|
10 |
-
|
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(
|