Upload 17 files

#19
by awinml - opened
Files changed (1) hide show
  1. utils/retriever.py +6 -6
utils/retriever.py CHANGED
@@ -37,7 +37,7 @@ def query_pinecone_sparse(
37
  "Quarter": {"$in": ["Q1", "Q2", "Q3", "Q4"]},
38
  "Ticker": {"$eq": ticker},
39
  "QA_Flag": {"$eq": participant},
40
- '$and': filter_dict
41
  },
42
  include_metadata=True,
43
  )
@@ -59,7 +59,7 @@ def query_pinecone_sparse(
59
  "Quarter": {"$eq": quarter},
60
  "Ticker": {"$eq": ticker},
61
  "QA_Flag": {"$eq": participant},
62
- '$and': filter_dict
63
  },
64
  include_metadata=True,
65
  )
@@ -74,7 +74,7 @@ def query_pinecone_sparse(
74
  "Quarter": {"$eq": quarter},
75
  "Ticker": {"$eq": ticker},
76
  "QA_Flag": {"$eq": participant},
77
- '$and': filter_dict
78
  },
79
  include_metadata=True,
80
  )
@@ -125,7 +125,7 @@ def query_pinecone(
125
  "Quarter": {"$in": ["Q1", "Q2", "Q3", "Q4"]},
126
  "Ticker": {"$eq": ticker},
127
  "QA_Flag": {"$eq": participant},
128
- '$and': filter_dict
129
  },
130
  include_metadata=True,
131
  )
@@ -146,7 +146,7 @@ def query_pinecone(
146
  "Quarter": {"$eq": quarter},
147
  "Ticker": {"$eq": ticker},
148
  "QA_Flag": {"$eq": participant},
149
- '$and': filter_dict
150
  },
151
  include_metadata=True,
152
  )
@@ -160,7 +160,7 @@ def query_pinecone(
160
  "Quarter": {"$eq": quarter},
161
  "Ticker": {"$eq": ticker},
162
  "QA_Flag": {"$eq": participant},
163
- '$and': filter_dict
164
  },
165
  include_metadata=True,
166
  )
 
37
  "Quarter": {"$in": ["Q1", "Q2", "Q3", "Q4"]},
38
  "Ticker": {"$eq": ticker},
39
  "QA_Flag": {"$eq": participant},
40
+ "Keywords": {"$in": keywords}
41
  },
42
  include_metadata=True,
43
  )
 
59
  "Quarter": {"$eq": quarter},
60
  "Ticker": {"$eq": ticker},
61
  "QA_Flag": {"$eq": participant},
62
+ "Keywords": {"$in": keywords}
63
  },
64
  include_metadata=True,
65
  )
 
74
  "Quarter": {"$eq": quarter},
75
  "Ticker": {"$eq": ticker},
76
  "QA_Flag": {"$eq": participant},
77
+ "Keywords": {"$in": keywords}
78
  },
79
  include_metadata=True,
80
  )
 
125
  "Quarter": {"$in": ["Q1", "Q2", "Q3", "Q4"]},
126
  "Ticker": {"$eq": ticker},
127
  "QA_Flag": {"$eq": participant},
128
+ "Keywords": {"$in": keywords}
129
  },
130
  include_metadata=True,
131
  )
 
146
  "Quarter": {"$eq": quarter},
147
  "Ticker": {"$eq": ticker},
148
  "QA_Flag": {"$eq": participant},
149
+ "Keywords": {"$in": keywords}
150
  },
151
  include_metadata=True,
152
  )
 
160
  "Quarter": {"$eq": quarter},
161
  "Ticker": {"$eq": ticker},
162
  "QA_Flag": {"$eq": participant},
163
+ "Keywords": {"$in": keywords}
164
  },
165
  include_metadata=True,
166
  )