Slackbot
08/02/2023, 7:14 PMJason Bosco
08/02/2023, 7:23 PMGustavo
08/02/2023, 7:23 PMJason Bosco
08/02/2023, 7:24 PMJason Bosco
08/02/2023, 7:24 PMGustavo
08/02/2023, 7:25 PMJason Bosco
08/02/2023, 7:26 PMGustavo
08/02/2023, 7:26 PMGustavo
08/02/2023, 7:28 PMembedding field is computed from the topics field which is an array of strings. After looking for a bug in my search functionality, I noted that a document in Typesense didn't have the embedding field when I retrived it with the SDK.Gustavo
08/02/2023, 7:29 PMGustavo
08/02/2023, 7:33 PMJason Bosco
08/02/2023, 7:34 PMGustavo
08/02/2023, 7:48 PMposts-v1 collection? There's a document there with ID z3xMqOyt8d0xdTeEaPyb that contains the topics field, but not the embedding.Gustavo
08/02/2023, 7:48 PMv601y2x3upjea4tipJason Bosco
08/02/2023, 8:01 PMGustavo
08/02/2023, 8:02 PMJason Bosco
08/02/2023, 8:13 PMJason Bosco
08/03/2023, 4:10 AMJason Bosco
08/03/2023, 4:10 AMJason Bosco
08/03/2023, 4:11 AMGustavo
08/03/2023, 10:22 AMJason Bosco
08/03/2023, 2:32 PMGustavo
08/03/2023, 4:20 PMJason Bosco
08/03/2023, 4:21 PMJason Bosco
08/03/2023, 4:21 PMJason Bosco
08/03/2023, 4:24 PMGustavo
08/03/2023, 4:26 PMJason Bosco
08/03/2023, 4:31 PMGustavo
08/03/2023, 5:01 PMJason Bosco
08/03/2023, 5:48 PMGustavo
08/03/2023, 6:11 PMGustavo
08/03/2023, 8:00 PMGustavo
08/14/2023, 10:16 PMJason Bosco
08/14/2023, 10:17 PMGustavo
08/14/2023, 10:19 PMJason Bosco
08/14/2023, 10:24 PMcreatedAt timestamp), but the cluster was upgraded to rc59 only on Aug 3. So this is an old document that was created on a prior RC build which didn’t have the error handling for this particular case.
See this: https://typesense-community.slack.com/archives/C01P749MET0/p1691079700751459?thread_ts=1691003672.362599&cid=C01P749MET0Jason Bosco
08/14/2023, 10:26 PMGustavo
08/14/2023, 10:28 PMGustavo
08/14/2023, 10:28 PMJason Bosco
08/14/2023, 10:29 PMGustavo
08/14/2023, 10:30 PMGustavo
08/14/2023, 11:01 PMGustavo
08/14/2023, 11:01 PMGustavo
08/14/2023, 11:01 PMJason Bosco
08/14/2023, 11:01 PMGustavo
08/14/2023, 11:01 PMGustavo
08/14/2023, 11:02 PMJason Bosco
08/14/2023, 11:02 PMGustavo
08/14/2023, 11:02 PMGustavo
08/14/2023, 11:04 PMGustavo
08/16/2023, 4:46 PMtopics array. I have a document with:
id: 'WtSy5f9KgdvxGB0i6HGz',
topics: [
'Direito Trabalhista',
'Direito Previdenciário',
'Benefícios trabalhistas',
'Auxílio maternidade',
'Licença maternidade'
]
Weirdly, when I make a semantic search with "Auxílio maternidade", it doesn't appear.Gustavo
08/16/2023, 4:47 PMtopics doesn't include it? I wonder if there's something wrong with the embedding itself.Gustavo
08/16/2023, 4:48 PM"embed": {
"from": [
"topics"
],
"model_config": {
"api_key": "...",
"model_name": "openai/text-embedding-ada-002"
}
},
"facet": false,
"index": true,
"infix": false,
"locale": "",
"name": "embedding",
"num_dim": 1536,
"optional": false,
"sort": false,
"type": "float[]"
},Gustavo
08/16/2023, 4:48 PMlocale because the topics include diacritics?Gustavo
08/16/2023, 4:55 PMtopics: ['Software development'] just to make it have a topic that's different from all other documents in the collection. I search for "Software development" and it still doesn't appear in the first 50 results. There's no other document with anything even close to that topic.Gustavo
08/16/2023, 4:56 PMJason Bosco
08/16/2023, 4:57 PMJason Bosco
08/16/2023, 4:57 PMquery_by: topics,embeddingGustavo
08/16/2023, 4:59 PMGustavo
08/16/2023, 5:00 PMGustavo
08/16/2023, 5:01 PMJason Bosco
08/16/2023, 5:02 PMGustavo
08/16/2023, 5:02 PMGustavo
08/16/2023, 5:02 PMJason Bosco
08/16/2023, 5:02 PMGustavo
08/16/2023, 5:03 PMtopics field is different.Gustavo
08/16/2023, 5:05 PMtopics is the same as how it was before I manually changed it to test.Gustavo
08/16/2023, 5:05 PMGustavo
08/16/2023, 5:06 PMGustavo
08/16/2023, 5:07 PMJason Bosco
08/16/2023, 5:11 PMGustavo
08/25/2023, 6:54 PMposts-v1, cluster v601y2x3upjea4tip) here missing the embedding field:
DdsfazcfhV2KaZoHZVdk
SY7nMf9i1FIdxXrBmKKt
UQG0x9SS4HXC1Ayk16Wx
JsieTqFhhn6OlC2Ol6bs
Can you take a look?Jason Bosco
08/25/2023, 8:57 PMKishore Nallan
08/26/2023, 1:35 PMGustavo
08/26/2023, 1:44 PMKishore Nallan
08/26/2023, 1:44 PMGustavo
08/26/2023, 1:50 PMDdsfazcfhV2KaZoHZVdk isn't missing the embedding field anymore. Not sure why.Jason Bosco
08/26/2023, 2:45 PMJason Bosco
08/26/2023, 6:33 PM0.25.1.rc4? The issue was most likely because of this OpenAI issue that we weren't handling in Typesense. We've updated logic to handle blank embeddings and return the error in the import API response.Jason Bosco
08/26/2023, 6:33 PMGustavo
08/26/2023, 6:34 PMGustavo
08/30/2023, 6:12 PMembedding field: f4fr0cpFeTIyrhtoxKf6 (collection posts-v1, cluster v601y2x3upjea4tip). The embedding was there before the document was updated today.Jason Bosco
08/30/2023, 6:14 PMnull or missing, or is it an empty array?Gustavo
08/30/2023, 6:15 PMGustavo
08/30/2023, 6:16 PMvkuH7LxZpdrWbSxah6er, the field is there and seems OK, but when I search for "Pilates" (which is one of the keywords used in the embedding), it doesn't appear in the results. It was also showing up a few moments ago before being updated.Gustavo
08/30/2023, 6:17 PMJason Bosco
08/30/2023, 6:22 PMembed.from fields in these documents, to see if the embeddings are regenerated fine?Gustavo
08/30/2023, 6:32 PMvkuH7LxZpdrWbSxah6er, recreated it and now it's searchable. Exact same values in all its fields.Gustavo
08/30/2023, 6:33 PM{
code: 'PDFIS0080',
createdAt: 1683575032503,
embedding: [
-0.005973665975034237, 0.016291815787553787, 0.007027072831988335,
-0.021735507994890213, -0.0018189257243648171, 0.04381124675273895,
0.00911425705999136, -0.006199396215379238, 0.012424963526427746,
0.002208228223025799, 0.00143207679502666, 0.022049566730856895,
0.023358145728707314, 0.003556065261363983, -0.005882065277546644,
-0.008335652761161327, 0.018948232755064964, -0.006811156868934631,
-0.0003819416742771864, -0.005038031842559576, 0.0243395809084177,
-0.0006596059538424015, -0.003408849937841296, -0.0294430423527956,
-0.013412941247224808, 0.005394619423896074, 0.015480496920645237,
-0.040461283177137375, -0.011718330904841423, -0.015166438184678555,
0.03773943707346916, -0.005551649257540703, -0.01372699998319149,
-0.03321175277233124, -0.015585183165967464, -0.010377036407589912,
0.0027905460447072983, 0.0036607515066862106, 0.028500864282250404,
0.010684552602469921, 0.0013453834690153599, 0.002723481273278594,
0.002067555906251073, 0.009003028273582458, -0.015362724661827087,
0.006376054137945175, -0.0255042165517807, -0.013177396729588509,
-0.018293943256139755, 0.01177721656858921, -0.0020315698347985744,
0.015637526288628578, -0.008551567792892456, -0.0003418664273340255,
0.006232110317796469, -0.004315041471272707, -0.0007229902548715472,
0.02750634402036667, 0.017835941165685654, -0.028212977573275566,
-0.008100108243525028, -0.02800360508263111, -0.02721845731139183,
-0.006405497435480356, -0.013897115364670753, 0.008636625483632088,
-0.006843871437013149, 0.01868651807308197, -0.0035135364159941673,
0.010841581970453262, 0.013367140665650368, 0.009218943305313587,
0.007838391698896885, -0.0025533661246299744, 0.043156955391168594,
-0.01052752323448658, -0.013792429119348526, -0.0031602198723703623,
0.01115564163774252, 0.010730353184044361, 0.023318888619542122,
-0.023711463436484337, -0.016291815787553787, -0.021369105204939842,
0.031196538358926773, -0.005410976707935333, 0.007707533892244101,
0.023436661809682846, 0.020976532250642776, 0.004877730738371611,
0.004154740367084742, 0.011175270192325115, 0.02282162941992283,
0.022834714502096176, -0.019026748836040497, 0.02078024484217167,
-0.008643168956041336, 0.01432894729077816, -0.022887058556079865,
-0.01284370943903923,
... 1436 more items
],
id: 'vkuH7LxZpdrWbSxah6er',
image: {
highRes: {
base: 'https://firebasestorage.googleapis.com/v0/b/publiko-f9288.appspot.com/o/posts%2FvkuH7LxZpdrWbSxah6er%2F1080x1920-base.jpg?alt=media&token=1zqdQmjb',
mask: 'https://firebasestorage.googleapis.com/v0/b/publiko-f9288.appspot.com/o/posts%2FvkuH7LxZpdrWbSxah6er%2F1080x1920-mask.png?alt=media&token=phyNz5g0'
},
lowRes: {
base: 'https://firebasestorage.googleapis.com/v0/b/publiko-f9288.appspot.com/o/posts%2FvkuH7LxZpdrWbSxah6er%2F360x640-base.jpg?alt=media&token=HFWI3YJP',
mask: 'https://firebasestorage.googleapis.com/v0/b/publiko-f9288.appspot.com/o/posts%2FvkuH7LxZpdrWbSxah6er%2F360x640-mask.png?alt=media&token=uTcdq4l3'
}
},
imageAspect: 'portrait',
imageLogoRegion: {
height: 0.10572916666666667,
width: 0.28055555555555556,
x: 0.3592592592592593,
y: 0.2296875
},
imageText: 'Você sabia que o pilates podem ser um ótimo complemento para outras atividades físicas que você pratica, como corrida ou natação?',
status: 'available',
text: 'O Pilates é uma ótima opção para quem pratica atividades físicas como corrida e natação, pois ajuda a melhorar a postura, o equilíbrio e a flexibilidade, além de fortalecer o core e prevenir lesões. 🧘♀️\r\n' +
'\r\n' +
'Como essas atividades envolvem movimentos repetitivos, o Pilates pode ser utilizado para trabalhar diferentes grupos musculares e aumentar a resistência do corpo, melhorando o desempenho geral. 👩🦰\r\n' +
'\r\n' +
'Além disso, o Pilates pode ajudar a reduzir o estresse e a ansiedade, proporcionando um equilíbrio mental e emocional para quem pratica.',
title: 'Pilates',
topics: [
'Educação Física',
'Fisioterapia',
'Pilates',
'Condicionamento físico',
'Complemento para outras atividades físicas'
],
updatedAt: 1683575032503
}Gustavo
08/30/2023, 6:33 PM{
code: 'PDFIS0080',
createdAt: 1683575032503,
embedding: [
-0.005973665975034237, 0.016291815787553787, 0.007027072831988335,
-0.021735507994890213, -0.0018189257243648171, 0.04381124675273895,
0.00911425705999136, -0.006199396215379238, 0.012424963526427746,
0.002208228223025799, 0.00143207679502666, 0.022049566730856895,
0.023358145728707314, 0.003556065261363983, -0.005882065277546644,
-0.008335652761161327, 0.018948232755064964, -0.006811156868934631,
-0.0003819416742771864, -0.005038031842559576, 0.0243395809084177,
-0.0006596059538424015, -0.003408849937841296, -0.0294430423527956,
-0.013412941247224808, 0.005394619423896074, 0.015480496920645237,
-0.040461283177137375, -0.011718330904841423, -0.015166438184678555,
0.03773943707346916, -0.005551649257540703, -0.01372699998319149,
-0.03321175277233124, -0.015585183165967464, -0.010377036407589912,
0.0027905460447072983, 0.0036607515066862106, 0.028500864282250404,
0.010684552602469921, 0.0013453834690153599, 0.002723481273278594,
0.002067555906251073, 0.009003028273582458, -0.015362724661827087,
0.006376054137945175, -0.0255042165517807, -0.013177396729588509,
-0.018293943256139755, 0.01177721656858921, -0.0020315698347985744,
0.015637526288628578, -0.008551567792892456, -0.0003418664273340255,
0.006232110317796469, -0.004315041471272707, -0.0007229902548715472,
0.02750634402036667, 0.017835941165685654, -0.028212977573275566,
-0.008100108243525028, -0.02800360508263111, -0.02721845731139183,
-0.006405497435480356, -0.013897115364670753, 0.008636625483632088,
-0.006843871437013149, 0.01868651807308197, -0.0035135364159941673,
0.010841581970453262, 0.013367140665650368, 0.009218943305313587,
0.007838391698896885, -0.0025533661246299744, 0.043156955391168594,
-0.01052752323448658, -0.013792429119348526, -0.0031602198723703623,
0.01115564163774252, 0.010730353184044361, 0.023318888619542122,
-0.023711463436484337, -0.016291815787553787, -0.021369105204939842,
0.031196538358926773, -0.005410976707935333, 0.007707533892244101,
0.023436661809682846, 0.020976532250642776, 0.004877730738371611,
0.004154740367084742, 0.011175270192325115, 0.02282162941992283,
0.022834714502096176, -0.019026748836040497, 0.02078024484217167,
-0.008643168956041336, 0.01432894729077816, -0.022887058556079865,
-0.01284370943903923,
... 1436 more items
],
id: 'vkuH7LxZpdrWbSxah6er',
image: {
highRes: {
base: 'https://firebasestorage.googleapis.com/v0/b/publiko-f9288.appspot.com/o/posts%2FvkuH7LxZpdrWbSxah6er%2F1080x1920-base.jpg?alt=media&token=1zqdQmjb',
mask: 'https://firebasestorage.googleapis.com/v0/b/publiko-f9288.appspot.com/o/posts%2FvkuH7LxZpdrWbSxah6er%2F1080x1920-mask.png?alt=media&token=phyNz5g0'
},
lowRes: {
base: 'https://firebasestorage.googleapis.com/v0/b/publiko-f9288.appspot.com/o/posts%2FvkuH7LxZpdrWbSxah6er%2F360x640-base.jpg?alt=media&token=HFWI3YJP',
mask: 'https://firebasestorage.googleapis.com/v0/b/publiko-f9288.appspot.com/o/posts%2FvkuH7LxZpdrWbSxah6er%2F360x640-mask.png?alt=media&token=uTcdq4l3'
}
},
imageAspect: 'portrait',
imageLogoRegion: {
height: 0.10572916666666667,
width: 0.28055555555555556,
x: 0.3592592592592593,
y: 0.2296875
},
imageText: 'Você sabia que o pilates podem ser um ótimo complemento para outras atividades físicas que você pratica, como corrida ou natação?',
status: 'available',
text: 'O Pilates é uma ótima opção para quem pratica atividades físicas como corrida e natação, pois ajuda a melhorar a postura, o equilíbrio e a flexibilidade, além de fortalecer o core e prevenir lesões. 🧘♀️\r\n' +
'\r\n' +
'Como essas atividades envolvem movimentos repetitivos, o Pilates pode ser utilizado para trabalhar diferentes grupos musculares e aumentar a resistência do corpo, melhorando o desempenho geral. 👩🦰\r\n' +
'\r\n' +
'Além disso, o Pilates pode ajudar a reduzir o estresse e a ansiedade, proporcionando um equilíbrio mental e emocional para quem pratica.',
title: 'Pilates',
topics: [
'Educação Física',
'Fisioterapia',
'Pilates',
'Condicionamento físico',
'Complemento para outras atividades físicas'
],
updatedAt: 1683575032503
}Gustavo
08/30/2023, 6:34 PMJason Bosco
08/30/2023, 6:34 PMGustavo
08/30/2023, 6:35 PMGustavo
08/30/2023, 6:35 PMJason Bosco
08/30/2023, 6:37 PMJason Bosco
08/30/2023, 6:37 PMGustavo
08/30/2023, 9:08 PMvkuH7LxZpdrWbSxah6er in Firestore and it triggered an upsert with the Typesense JS SDK. After that, the post can't be found anymore in the vector search (even though the embedding field is present). So it seems there's something wrong happening on the upsert path somewhere in Typesense.Gustavo
08/30/2023, 9:12 PMKishore Nallan
08/31/2023, 9:34 AMGustavo
08/31/2023, 11:18 AMJason Bosco
08/31/2023, 3:13 PM0.25.1.rc6? This should solve the issue with missing embeddings. It happened whenever there's an upsert with no changes to any of the fields in the docs - this would cause the embedding field to be dropped.Jason Bosco
08/31/2023, 3:14 PMGustavo
08/31/2023, 7:18 PMJason Bosco
09/04/2023, 6:21 PMGustavo
09/04/2023, 6:22 PMGustavo
09/04/2023, 6:24 PMGustavo
09/04/2023, 7:26 PMGustavo
09/15/2023, 4:00 PMJason Bosco
09/15/2023, 4:01 PM