|
121 | 121 | }, |
122 | 122 | { |
123 | 123 | "cell_type": "code", |
124 | | - "execution_count": 14, |
| 124 | + "execution_count": 16, |
125 | 125 | "metadata": {}, |
126 | 126 | "outputs": [ |
127 | 127 | { |
128 | 128 | "data": { |
129 | 129 | "text/plain": [ |
130 | | - "[{'vector_distance': '0.655903100967',\n", |
| 130 | + "[{'vector_distance': '0.61871612072',\n", |
131 | 131 | " 'job_title': 'Software Engineer',\n", |
132 | | - " 'vector_similarity': '0.672048449516',\n", |
133 | | - " 'text_score': '0',\n", |
134 | | - " 'hybrid_score': '0.470433914661'},\n", |
135 | | - " {'vector_distance': '0.892600417137',\n", |
136 | | - " 'job_title': 'Data Analyst',\n", |
137 | | - " 'vector_similarity': '0.553699791431',\n", |
138 | | - " 'text_score': '0',\n", |
139 | | - " 'hybrid_score': '0.387589854002'},\n", |
140 | | - " {'vector_distance': '0.958741784096',\n", |
| 132 | + " 'vector_similarity': '0.69064193964',\n", |
| 133 | + " 'text_score': '49.6242910712',\n", |
| 134 | + " 'hybrid_score': '15.3707366791'},\n", |
| 135 | + " {'vector_distance': '0.937997639179',\n", |
141 | 136 | " 'job_title': 'Marketing Manager',\n", |
142 | | - " 'vector_similarity': '0.520629107952',\n", |
| 137 | + " 'vector_similarity': '0.53100118041',\n", |
| 138 | + " 'text_score': '49.6242910712',\n", |
| 139 | + " 'hybrid_score': '15.2589881476'},\n", |
| 140 | + " {'vector_distance': '0.859166145325',\n", |
| 141 | + " 'job_title': 'Data Analyst',\n", |
| 142 | + " 'vector_similarity': '0.570416927338',\n", |
143 | 143 | " 'text_score': '0',\n", |
144 | | - " 'hybrid_score': '0.364440375566'}]" |
| 144 | + " 'hybrid_score': '0.399291849136'}]" |
145 | 145 | ] |
146 | 146 | }, |
147 | | - "execution_count": 14, |
| 147 | + "execution_count": 16, |
148 | 148 | "metadata": {}, |
149 | 149 | "output_type": "execute_result" |
150 | 150 | } |
151 | 151 | ], |
152 | 152 | "source": [ |
153 | 153 | "from redisvl.query import HybridQuery\n", |
154 | 154 | "\n", |
155 | | - "text = \"Find a job as a software engineer\"\n", |
| 155 | + "text = \"Find a job as a where you develop software\"\n", |
156 | 156 | "vec = emb_model.embed(text, as_buffer=True)\n", |
157 | 157 | "\n", |
158 | 158 | "query = HybridQuery(\n", |
|
180 | 180 | }, |
181 | 181 | { |
182 | 182 | "cell_type": "code", |
183 | | - "execution_count": 13, |
| 183 | + "execution_count": 17, |
184 | 184 | "metadata": {}, |
185 | 185 | "outputs": [ |
186 | 186 | { |
187 | 187 | "data": { |
188 | 188 | "text/plain": [ |
189 | | - "[]" |
| 189 | + "[{'id': 'jobs:01JR0V1SA29RVD9AAVSTBV9P5H',\n", |
| 190 | + " 'score': 49.62429107116745,\n", |
| 191 | + " 'job_title': 'Software Engineer'},\n", |
| 192 | + " {'id': 'jobs:01JR0V1SA23ZE7BRERXTZWC33Z',\n", |
| 193 | + " 'score': 49.62429107116745,\n", |
| 194 | + " 'job_title': 'Marketing Manager'}]" |
190 | 195 | ] |
191 | 196 | }, |
192 | | - "execution_count": 13, |
| 197 | + "execution_count": 17, |
193 | 198 | "metadata": {}, |
194 | 199 | "output_type": "execute_result" |
195 | 200 | } |
196 | 201 | ], |
197 | 202 | "source": [ |
198 | 203 | "from redisvl.query import TextQuery\n", |
199 | 204 | "\n", |
200 | | - "text = \"Find a job as a software engineer\"\n", |
| 205 | + "text = \"Find where you develop software\"\n", |
201 | 206 | "\n", |
202 | 207 | "query = TextQuery(\n", |
203 | 208 | " text=text,\n", |
|
0 commit comments