Important
Native Reranking is available as a Preview feature. The feature and the corresponding documentation might change at any time during the Preview period. Therefore, we don't recommend using this feature in production environments. We do not use any customer data from this feature to train our models at this time. To learn more, see Preview Features.
The $rerank aggregation stage reorders input documents using Voyage AI reranking models and returns the same documents sorted by relevance to the query. The $rerank stage can appear anywhere in an aggregation pipeline.
You don't need to create an index to run $rerank queries. However, MongoDB recommends using $rerank after a $vectorSearch, $search, $rankFusion, or $scoreFusion stage, which require creating a MongoDB Vector Search or MongoDB Search index on your collection.
This quickstart demonstrates how to enable and use Native Reranking in Atlas by using the $rerank aggregation stage on queries against the sample_mflix dataset.
Prerequisites
Before you begin, complete the following tasks:
Deploy a Atlas cluster with MongoDB 8.3 or later by selecting Latest Version with Auto-Upgrades in the Atlas UI Cluster Builder page.
To learn more about an Atlas cluster, see Create a Cluster. Native reranking is not available for self-managed deployments.
Load the sample_mflix dataset into your cluster.
To learn more, see Load Sample Data.
Download and install
mongosh.To learn more, see Install the MongoDB Shell.
To learn more about the compatibility and requirements for using $rerank, see Considerations.
Procedure
To get started with native reranking, follow these steps:
Enable Native Reranking.
In Atlas, go to the Project Settings page.
If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
In the sidebar, click the icon next to Project Overview.
The Project Settings page displays.
Scroll down to the Native Reranking section and toggle Enable Native Reranking to On.
Click Confirm.
Run a Native Reranking query.
The following query uses the $rerank stage to find the top ten movies that are most relevant to the query for martial arts.
Switch to the
sample_mflixdatabase:use sample_mflix Run a Native Reranking query.
The following query uses the
$rerankstage to return movies that are most relevant to the query for martial arts using thererank-2.5model. The query prioritizes films about martial arts training and tournaments. It uses the following pipeline stages:Pipeline StageDescriptionFilters the documents to include only documents that have a
fullplotfield of type string.Sorts the documents in descending order of the
releasedfield to ensure deterministic ordering.Reorders the documents to match the query using the
rerank-2.5reranker model. ThenumDocsToRerankparameter specifies the maximum number of documents to consider for reranking. Thepathparameter specifies the field to use for reranking.Adds a field named
rerankScoreto the documents.Limits the output to 10 documents.
Excludes all fields except
title,fullplot, andrerankScorefrom the documents in the results.1 db.embedded_movies.aggregate([ 2 { 3 "$match": { 4 "fullplot": { "$exists": true, "$type": "string" } 5 } 6 }, 7 { 8 "$sort": { "released": -1 } 9 }, 10 { 11 "$rerank": { 12 "model": "rerank-2.5", 13 "query": { 14 "text": "martial arts; prioritize films about martial arts training and tournaments" 15 }, 16 "path": "fullplot", 17 "numDocsToRerank": 100 18 } 19 }, 20 { 21 "$addFields": { 22 "rerankScore": { "$meta": "score" } 23 } 24 }, 25 { "$limit": 10 }, 26 { 27 "$project": { 28 "_id": 0, 29 "title": 1, 30 "fullplot": 1, 31 "rerankScore": 1 32 } 33 } 34 ]) [ { title: 'Ti mene nosis', fullplot: 'No treason, no surrender.', rerankScore: 0.5986876487731934 }, { title: 'The Real Miyagi', fullplot: 'The life of the greatest karate master of a generation.', rerankScore: 0.5986876487731934 }, { title: 'Peter Pan Live!', fullplot: 'A live telecast of the beloved J. M. Barrie story.', rerankScore: 0.5986876487731934 }, { title: "Why Don't You Play in Hell?", fullplot: 'A renegade film crew becomes embroiled with a yakuza clan feud.', rerankScore: 0.5986876487731934 }, { fullplot: "A French police magistrate spends years trying to take down one of the country's most powerful drug rings.", title: 'The Connection', rerankScore: 0.5986876487731934 }, { title: 'Anomalisa', fullplot: "Charlie Kaufman's first stop-motion film about a man crippled by the mundanity of his life.", rerankScore: 0.5986876487731934 }, { title: 'The Master Plan', fullplot: 'Charles Ingvar Jènsson gathers three criminals to take vengeance upon the people who killed his uncle.', rerankScore: 0.5986876487731934 }, { title: 'Redeemer', fullplot: 'A former hit-man for a drug cartel becomes a vigilante to pay for his sins and find redemption.', rerankScore: 0.5986876487731934 }, { title: 'Rise of the Legend', fullplot: 'An orphan, whose father has been killed by dark power, attempts to bring justice back to the town.', rerankScore: 0.5986876487731934 }, { title: 'Darkness on the Edge of Town', fullplot: 'A troubled teenage sharpshooter decides to avenge the death of her estranged sister after she is found murdered in a public bathroom.', rerankScore: 0.5986876487731934 } ]
Create the indexes for running Native Reranking queries with $vectorSearch and $search.
MongoDB recommends using $rerank after a $vectorSearch, $search, $rankFusion, or $scoreFusion stage. To do so, create a MongoDB Vector Search and MongoDB Search index on your collection to run the $vectorSearch and $search stages.
To try the sample queries that use the $vectorSearch and $search stages in this quickstart, you must create a MongoDB Vector Search and MongoDB Search index on your collection.
To create the index, complete the following steps:
Click Search & Vector Search in the sidebar.
Click Create Index.
Start your index configuration:
Select Vector Search as the index type.
Enter
vector_indexas the name of the index.Select the
sample_mflix.embedded_moviescollection.Select JSON Editor as the editor type.
Click Next and paste the following index definition in the JSON editor:
Index on the ``plot_embedding_voyage_4_large`` field.{ "fields": [ { "type": "vector", "path": "plot_embedding_voyage_4_large", "numDimensions": 2048, "similarity": "dotProduct" } ] } Click Next, then click Create Index.
To create the index, complete the following steps:
Click Search & Vector Search in the sidebar.
Click Create Index.
Start your index configuration:
Select Search as the index type.
Enter
search_indexas the name of the index.Select the
sample_mflix.embedded_moviescollection.Select JSON Editor as the editor type.
Click Next and paste the following index definition in the JSON editor:
Dynamic Index on the dynamically indexable fields.{ "mappings": { "dynamic": true } } Click Next, then click Create Index.
Prepare to run $vectorSearch and $search queries with Native Reranking.
Connect to your cluster using
mongosh.Create a file named
embeddings.jsto store the embeddings to use in the queries.Copy and paste the following embeddings into the file.
Embeddings for the query term "martial arts".MARTIAL_ARTS_EMBEDDINGS=[0.02218237891793251, -0.007462590467184782, -0.01691064052283764, 0.0072914301417768, -0.011365045793354511, -0.045186325907707214, -6.846413452876732e-05, -0.0034916705917567015, 0.009995763190090656, 0.025742514058947563, -0.002481824718415737, -0.0029268416110426188, 0.0023106643930077553, -0.04135233536362648, -0.019717669114470482, -0.024510158225893974, -0.008729176595807076, -0.001048356993123889, 0.01033808384090662, 0.008900336921215057, -0.00797607097774744, 0.03258892521262169, 0.00766798248514533, 0.010406548157334328, 0.04107847809791565, -0.020128455013036728, -0.03833991289138794, 0.018348386511206627, -0.01533596497029066, 0.042995475232601166, 0.020813096314668655, -0.0016260230913758278, -0.004364588297903538, -0.011159653775393963, -0.03436899557709694, 0.010817333124577999, -0.0008900337270461023, -0.012118151411414146, -0.0156782865524292, 0.04381704330444336, -0.013350505381822586, 0.003851107321679592, -0.00010537057823967189, 0.011638902127742767, -0.002978189615532756, 0.019033027812838554, 0.006675252690911293, -0.013624361716210842, -0.03806605562567711, -0.003936687484383583, -0.029028791934251785, -0.025742514058947563, 0.023962445557117462, 0.010611940175294876, -0.005614058580249548, -0.009584978222846985, -0.012049687094986439, -0.0004000872722826898, 0.015815213322639465, 0.0032006981782615185, -0.03505363687872887, -0.009448050521314144, -0.0468294657766819, -0.002892609452828765, -0.029439575970172882, -0.012734328396618366, 0.0030124217737466097, 0.001891321619041264, -0.00422766013070941, -0.001283702440559864, -0.0006332932389341295, 0.011433510109782219, -0.01622599922120571, 0.03409513831138611, -0.011228117160499096, -0.04354318603873253, 0.00015083503967616707, 0.018759172409772873, 0.012528936378657818, -0.0176637452095747, 0.016089070588350296, -0.03067192994058132, -0.0005776660982519388, -0.013418969698250294, 0.009653442539274693, 0.03039807453751564, -0.008181463927030563, 0.030808858573436737, 0.0145828602835536, -0.009653442539274693, 0.029439575970172882, 0.01916995644569397, -0.025331728160381317, -0.0468294657766819, -0.025057872757315636, 0.02040231041610241, 0.005203274078667164, 0.03039807453751564, -0.01793760247528553, 0.006332932040095329, -0.022593162953853607, 0.023003948852419853, 0.007633750792592764, -0.027111796662211418, -0.021360808983445168, -0.03916148468852043, 0.03012421727180481, -0.012392007745802402, -0.00547713041305542, 0.01718449778854847, 0.05723601207137108, 0.01369282603263855, -0.010680404491722584, -0.022593162953853607, 0.008694944903254509, -0.020128455013036728, 0.031767357140779495, 0.01643139123916626, -0.045734040439128876, -0.007907606661319733, 0.021634666249155998, 0.008318391628563404, 0.04956803098320961, -0.004415936302393675, -0.004176312126219273, -0.02368859015405178, -0.014514395967125893, 0.012049687094986439, 0.009858834557235241, -0.01622599922120571, 0.03313663974404335, 0.005271737929433584, -0.007907606661319733, -0.005956379231065512, 0.026016369462013245, -0.013145113363862038, -0.026564082130789757, 0.007325661834329367, -0.04135233536362648, 0.02368859015405178, 0.0036457150708884, -0.036970630288124084, -0.06107000634074211, 0.005271737929433584, 0.013761290349066257, 0.01615753397345543, 0.009653442539274693, 0.024784015491604805, 0.029028791934251785, -0.002516056876629591, 0.02190852165222168, 0.016773711889982224, -0.026701010763645172, 0.023003948852419853, 0.00398803548887372, 0.019854597747325897, -0.012871257029473782, -0.005442898254841566, -0.005819451063871384, 0.009653442539274693, -0.02218237891793251, 0.008968801237642765, -0.0291657205671072, -0.0176637452095747, -0.021497737616300583, 0.0002513917279429734, 0.007736446801573038, -0.0043474724516272545, 0.0046213287860155106, 0.014719787985086441, 0.010064227506518364, -0.04710332304239273, 0.03217814117670059, -0.028070293366909027, -0.006743717007339001, -0.010269619524478912, 0.010132691822946072, -0.011912758462131023, 0.03258892521262169, -0.046007897704839706, 0.027248723432421684, 0.0194438137114048, 0.016362927854061127, 0.001300818519666791, -0.0017715094145387411, 0.03409513831138611, 0.017526818439364433, -0.037518344819545746, 0.0033547424245625734, 0.020813096314668655, -0.004159195814281702, -0.059153009206056595, 0.011501974426209927, -0.019033027812838554, 0.022045450285077095, -0.0070860376581549644, -0.007017573341727257, -0.0044844006188213825, 0.018074531108140945, -0.024236302822828293, 0.007565286476165056, -0.0010226829908788204, -0.009242657572031021, -0.029850361868739128, 0.014993644319474697, -0.024373231455683708, 0.007462590467184782, -0.008181463927030563, 0.026837939396500587, 0.013761290349066257, -0.022730091586709023, -0.023551661521196365, -0.005750987213104963, -0.026016369462013245, 0.0036628309171646833, -0.029576504603028297, 0.0030124217737466097, 0.012734328396618366, -0.019991526380181313, 0.013829754665493965, 0.006059075705707073, -0.027248723432421684, -0.018622243776917458, 0.006983341183513403, 0.045460183173418045, 0.03039807453751564, -0.010064227506518364, -0.006504092365503311, -0.042721617966890335, -0.029850361868739128, 0.02765950933098793, 0.017800673842430115, 0.027248723432421684, 0.005032113753259182, -0.002978189615532756, -0.03039807453751564, -0.034779779613018036, 0.010817333124577999, -0.0008429646259173751, 0.026701010763645172, -0.004655560944229364, -0.01889610104262829, -0.009448050521314144, -0.0194438137114048, -0.006572556681931019, 0.0004343193431850523, 0.004415936302393675, -0.03382128104567528, 0.010611940175294876, -0.00516904192045331, -0.0006632462609559298, -0.0032520461827516556, -0.015472893603146076, -0.021771593019366264, 0.03286278247833252, -0.056140586733818054, 0.000329483620589599, -0.013350505381822586, 0.01157043781131506, -0.009379586204886436, -0.0145828602835536, 0.034779779613018036, -0.016089070588350296, 0.0176637452095747, -0.012118151411414146, 0.020265383645892143, 0.024784015491604805, 0.029713433235883713, 0.015472893603146076, -0.001317934482358396, -0.008078766986727715, 0.011981222778558731, -0.007770678959786892, 0.0156782865524292, -0.04381704330444336, -0.0036799469962716103, -0.00013425388897303492, 0.04162619262933731, 0.007531054317951202, -0.0022422003094106913, -0.029576504603028297, -0.007017573341727257, -0.015541357919573784, 0.015609822236001492, 0.0031151180155575275, -0.00910572987049818, 0.004826721269637346, -0.0024304767139256, -0.027522580698132515, 0.0156782865524292, -0.022319307550787926, 0.003851107321679592, 0.014445931650698185, -0.002362012630328536, 0.029850361868739128, -0.0032006981782615185, -0.004518632777035236, 0.01622599922120571, 0.002807029290124774, 0.012871257029473782, 0.034232065081596375, 0.012734328396618366, -0.025742514058947563, -0.0353274904191494, -0.01745835319161415, -0.016842175275087357, -0.004724025260657072, -0.007907606661319733, 0.014788252301514149, 0.03409513831138611, 0.015815213322639465, 0.0023791284766048193, 0.02190852165222168, -0.011981222778558731, 0.043269332498311996, -0.03806605562567711, -0.054223593324422836, 0.012665864080190659, -0.030808858573436737, 0.008386855944991112, 0.02341473288834095, -0.019033027812838554, 0.017116032540798187, -0.030808858573436737, 0.011775830760598183, 0.0006033401587046683, -0.04655560851097107, -0.043269332498311996, 0.000236415202380158, 0.011022725142538548, -0.02889186330139637, 0.019033027812838554, -0.0291657205671072, -0.026974868029356003, -0.02492094412446022, 0.006093307863920927, -0.022867020219564438, -0.0013778406428173184, 0.024236302822828293, -0.07394126057624817, 0.005100577604025602, 0.013008184731006622, 0.02861800603568554, -0.01643139123916626, 0.048198748379945755, 0.028344150632619858, 0.03272585570812225, 0.011981222778558731, 0.02040231041610241, 0.01670524850487709, 0.024373231455683708, 0.014993644319474697, -0.011296581476926804, 0.024373231455683708, -0.009927298873662949, -0.010611940175294876, -0.008421087637543678, -0.026016369462013245, 0.012528936378657818, 0.05531901866197586, 0.016568319872021675, -0.00015939305012580007, -0.003697063075378537, 0.009448050521314144, -0.019991526380181313, 0.025605585426092148, 0.0032178142573684454, -0.02040231041610241, -0.012049687094986439, -0.004758256953209639, 0.010885796509683132, 0.03587520495057106, -0.012186615727841854, 0.012597399763762951, -0.016294462606310844, 0.027522580698132515, -0.036696773022413254, -0.015472893603146076, -0.0005605500773526728, -0.017252961173653603, -0.0046213287860155106, 0.018622243776917458, 0.009174193255603313, 0.005203274078667164, 0.008523784577846527, -0.0176637452095747, -0.005579826887696981, 0.021771593019366264, -0.011981222778558731, -0.037518344819545746, 0.017116032540798187, -0.045460183173418045, -0.02218237891793251, 0.06024843454360962, 0.01519903726875782, 0.004415936302393675, -0.010611940175294876, 0.001737277372740209, 0.039435338228940964, 0.03560134768486023, -0.012939720414578915, 0.0008429646259173751, -0.002259316388517618, -0.0072914301417768, -0.016979103907942772, -0.004997881595045328, -0.010201155208051205, 0.009584978222846985, 0.012802792713046074, 0.02889186330139637, 0.03505363687872887, -0.014788252301514149, -0.03436899557709694, 0.01519903726875782, 0.03067192994058132, -0.026016369462013245, -0.025742514058947563, -0.00578521890565753, -0.03067192994058132, 0.0003080885799136013, -0.01793760247528553, -0.005442898254841566, -0.042995475232601166, -0.0011895642383024096, -0.033958207815885544, -0.034505922347307205, 0.0002802750386763364, -0.013418969698250294, 0.01369282603263855, -0.014719787985086441, -0.04956803098320961, 0.014240539632737637, -0.03833991289138794, -0.008900336921215057, 0.05011574551463127, 0.020813096314668655, -0.014925180934369564, 0.017526818439364433, 0.005340202245861292, 0.010543475858867168, 0.00045571438386105, -0.06572556495666504, 0.04190004989504814, -0.020265383645892143, 0.013145113363862038, -0.0074968221597373486, 0.039983052760362625, 0.01307664904743433, 0.009242657572031021, 0.034779779613018036, -0.006846413016319275, 0.0059906113892793655, -0.01307664904743433, -0.008968801237642765, 0.00845532026141882, -0.0014291887637227774, -0.017252961173653603, -0.019580742344260216, 0.019854597747325897, 0.006812180858105421, -0.0007958955247886479, 0.018622243776917458, 0.004689793102443218, 0.00398803548887372, 0.016294462606310844, -0.019580742344260216, -0.0011039840755984187, -0.023551661521196365, -0.027111796662211418, -0.001048356993123889, 0.017321424558758736, -0.0032178142573684454, -0.018759172409772873, -0.004415936302393675, -0.0018399734981358051, 0.025742514058947563, -0.039435338228940964, -0.023003948852419853, -0.004073615651577711, 0.01533596497029066, 0.010885796509683132, -0.0009884508326649666, 0.04190004989504814, -0.0074968221597373486, -0.006846413016319275, -0.020813096314668655, -0.004296124447137117, 0.04162619262933731, 0.002079597907140851, 0.017252961173653603, 0.05531901866197586, 0.0035087866708636284, -0.004296124447137117, 0.014514395967125893, -0.01793760247528553, 0.025742514058947563, 0.007804911118000746, -0.009995763190090656, 0.013008184731006622, 0.026016369462013245, 0.0009157077292911708, 0.0194438137114048, 0.028207221999764442, -0.050389599055051804, 0.06024843454360962, -0.006606788840144873, 0.012118151411414146, 0.0353274904191494, -0.023003948852419853, -0.019306885078549385, 0.024373231455683708, 0.0003273441398050636, -0.01095426082611084, -0.006401396356523037, 0.03614906221628189, 0.02095002494752407, -0.0046213287860155106, 0.015815213322639465, -0.027933364734053612, -0.010064227506518364, -0.003833991242572665, -0.009379586204886436, -0.021634666249155998, -0.005066345911473036, -0.012049687094986439, 0.0015490009682253003, 0.009448050521314144, -0.013350505381822586, 0.03409513831138611, -0.051211170852184296, 0.012871257029473782, 0.018348386511206627, -7.969652506290004e-05, -0.019033027812838554, -0.0006033401587046683, 0.006127539556473494, -0.01793760247528553, 0.0011039840755984187, -0.002276432467624545, -0.01307664904743433, -0.0072229658253490925, -0.020539239048957825, 0.021771593019366264, 0.008284159936010838, 0.01595214195549488, -0.03039807453751564, 0.013145113363862038, -0.00883187260478735, -0.013966682367026806, -0.030535003170371056, 0.017047569155693054, -0.00015939305012580007, 0.004210543818771839, 0.028207221999764442, 0.0022079681511968374, 0.01821145974099636, -0.003868223400786519, -0.013829754665493965, 0.037244487553834915, 0.011365045793354511, 0.006641020532697439, 0.009311121888458729, -0.011501974426209927, -0.000928544788621366, -0.029850361868739128, -0.025057872757315636, 0.003799759317189455, 0.008763409219682217, -0.0313565731048584, 0.009995763190090656, 0.01157043781131506, 0.017116032540798187, 0.04190004989504814, 0.004107847809791565, 0.005648290738463402, -0.05175888165831566, 0.014445931650698185, -0.04162619262933731, 0.043269332498311996, -0.024784015491604805, 0.016636783257126808, 0.004090731963515282, 0.02218237891793251, 0.009448050521314144, 0.012665864080190659, -0.002327780472114682, -0.058605294674634933, 0.01595214195549488, 0.004364588297903538, 0.043269332498311996, 0.004107847809791565, -0.0033033944200724363, -0.004415936302393675, 0.03464284911751747, 0.019033027812838554, 0.01246047206223011, -0.01718449778854847, 0.0291657205671072, -0.02218237891793251, -0.015130572952330112, 0.0042618922889232635, -0.010475012473762035, -0.030945787206292152, 0.013487434014678001, -0.022593162953853607, 0.01622599922120571, 0.03806605562567711, -0.004193427972495556, 0.022045450285077095, -0.005305970087647438, 0.006469860207289457, 0.008660712279379368, 0.002113830065354705, 0.0349167063832283, 0.006127539556473494, -0.0058536832220852375, 0.014719787985086441, -0.016020607203245163, -0.03505363687872887, 0.05778372660279274, -0.04710332304239273, 0.005750987213104963, 0.018074531108140945, -0.0011039840755984187, 0.009448050521314144, 0.0016174650518223643, -0.047924891114234924, 0.012802792713046074, 0.03286278247833252, 0.03231506794691086, -0.05750986933708191, 0.021360808983445168, 0.03587520495057106, -0.019580742344260216, 0.022593162953853607, 0.002481824718415737, 0.0194438137114048, 0.02642715536057949, 0.0032349301036447287, 0.021497737616300583, -0.004758256953209639, 0.006367164198309183, 0.011981222778558731, 0.021360808983445168, 0.013487434014678001, 0.06380856782197952, -0.04135233536362648, -0.02615329809486866, 0.01745835319161415, -0.029576504603028297, 0.003868223400786519, 0.026290226727724075, -0.024510158225893974, 0.0194438137114048, -0.0007830585236661136, -0.009448050521314144, 0.023962445557117462, -0.0027899134438484907, -0.04655560851097107, -0.013350505381822586, -0.042447760701179504, 0.005066345911473036, -0.0036114829126745462, 0.0004000872722826898, 0.019991526380181313, 0.013008184731006622, 0.0009028707281686366, -0.0028754936065524817, -0.0022079681511968374, 0.014103610999882221, 0.002550288802012801, -0.025194799527525902, -0.008592248894274235, -0.005922147538512945, -0.010269619524478912, 0.030261145904660225, 0.01889610104262829, 0.03614906221628189, -0.013761290349066257, 0.00021929916692897677, -0.013282041065394878, 0.0057167550548911095, 0.011912758462131023, 0.014514395967125893, 0.01615753397345543, 0.006743717007339001, -0.005922147538512945, 0.030535003170371056, -0.0023791284766048193, 0.021497737616300583, -0.004381704609841108, -0.04655560851097107, -0.03231506794691086, -0.02314087562263012, -0.002909725531935692, -0.0023106643930077553, -0.01533596497029066, -0.016362927854061127, 0.0003316231304779649, 0.024099374189972878, 0.050663456320762634, 0.03916148468852043, 0.02190852165222168, -0.020265383645892143, -0.012118151411414146, 0.004724025260657072, 0.013487434014678001, 0.019717669114470482, 0.02218237891793251, 0.010611940175294876, 0.017800673842430115, 0.016020607203245163, -0.006709484849125147, 0.009037265554070473, 0.042721617966890335, 0.008900336921215057, -0.0039195716381073, -0.016979103907942772, -0.001031240914016962, -0.002481824718415737, -0.03642291948199272, 0.018485315144062042, 0.012597399763762951, -0.018759172409772873, -0.018074531108140945, -0.02492094412446022, 0.03560134768486023, -0.020813096314668655, -0.026974868029356003, 0.01307664904743433, 0.033273566514253616, 0.008010303601622581, 0.022045450285077095, -0.025057872757315636, 0.012392007745802402, 0.01821145974099636, 0.01821145974099636, -0.01307664904743433, 0.016842175275087357, 0.0145828602835536, 0.017389889806509018, 0.002113830065354705, 0.01095426082611084, 0.0018656476167961955, -0.009790371172130108, 0.020539239048957825, 0.011501974426209927, -0.018074531108140945, -0.013898218981921673, 0.016499854624271393, 0.0349167063832283, 0.011912758462131023, 0.007325661834329367, -0.025742514058947563, 0.0030980019364506006, -0.026974868029356003, 0.030945787206292152, -0.012049687094986439, -0.009516513906419277, -0.022319307550787926, -0.0072229658253490925, 0.0016602551331743598, 0.04902031645178795, -0.025194799527525902, -0.012597399763762951, -0.020265383645892143, 0.008729176595807076, 0.01916995644569397, -0.025331728160381317, -0.02889186330139637, 0.005750987213104963, 0.01793760247528553, 0.015404429286718369, 0.022730091586709023, -0.03039807453751564, 0.004330356139689684, -0.008147231303155422, -0.02067616768181324, -0.02314087562263012, -0.012323543429374695, 0.033958207815885544, -0.004279008135199547, 0.042173903435468674, -0.002824145369231701, 0.0005947821191512048, 0.05531901866197586, -0.010885796509683132, 0.010543475858867168, -0.04190004989504814, -0.036970630288124084, 0.013213577680289745, -0.026564082130789757, -0.02067616768181324, -0.004296124447137117, 0.007257197983562946, -0.013008184731006622, -0.037244487553834915, -0.0072229658253490925, -0.018074531108140945, -0.0031151180155575275, -0.0023106643930077553, -0.050937313586473465, -0.0028754936065524817, -0.002327780472114682, 0.034232065081596375, 0.023962445557117462, -0.02218237891793251, -0.032999709248542786, 0.0005263179773464799, 0.005134809762239456, 0.03861377015709877, 0.03039807453751564, -0.024236302822828293, -0.010064227506518364, 0.020128455013036728, -0.013898218981921673, 0.004724025260657072, 0.016979103907942772, -0.028481079265475273, -0.021634666249155998, 0.0009028707281686366, -0.031219644472002983, 0.0011895642383024096, 0.009790371172130108, -0.0024647086393088102, -0.01595214195549488, 0.001300818519666791, -0.010543475858867168, -0.0022079681511968374, -0.005374434404075146, 0.01622599922120571, -0.02067616768181324, 0.002978189615532756, -0.017116032540798187, -0.006743717007339001, -0.03614906221628189, 0.016568319872021675, -0.0176637452095747, -0.012186615727841854, -0.012528936378657818, 0.005442898254841566, -0.0013264925219118595, 0.020813096314668655, 0.028344150632619858, 0.01793760247528553, 0.013282041065394878, 0.008284159936010838, -0.004587096627801657, 0.014240539632737637, 0.006264468189328909, -0.025331728160381317, -0.021497737616300583, 0.039983052760362625, -0.005442898254841566, -0.009790371172130108, 0.012186615727841854, -0.0011553321965038776, -0.014925180934369564, -0.005271737929433584, -0.012049687094986439, 0.002190852304920554, -0.03587520495057106, 0.022456234320998192, 0.031767357140779495, 0.02492094412446022, -0.0004343193431850523, 0.006469860207289457, 0.008558016270399094, -0.00516904192045331, -0.003714179154485464, 0.0008429646259173751, -0.0097219068557024, 0.04190004989504814, 0.023962445557117462, 0.010885796509683132, 0.011022725142538548, 0.03067192994058132, 0.022593162953853607, 0.0033376263454556465, 0.028207221999764442, -0.030261145904660225, 0.01095426082611084, -0.005956379231065512, -0.0010269619524478912, 0.008900336921215057, 0.02889186330139637, -0.031082715839147568, -0.012528936378657818, -0.012118151411414146, 0.008181463927030563, 0.010406548157334328, -0.004364588297903538, -0.022593162953853607, -0.013350505381822586, 0.01670524850487709, -0.014445931650698185, -0.028070293366909027, -0.01670524850487709, 0.006880645174533129, -0.010064227506518364, -0.027796437963843346, 0.01369282603263855, 0.022730091586709023, -0.014788252301514149, 0.011365045793354511, -0.00026208924828097224, 0.02040231041610241, -0.015815213322639465, -0.021360808983445168, -0.012118151411414146, 0.03505363687872887, 0.020265383645892143, -0.017800673842430115, -0.00766798248514533, 0.014993644319474697, -0.008900336921215057, -0.008558016270399094, 0.03163042664527893, 1.711603363219183e-05, -0.026564082130789757, -0.03163042664527893, -0.005032113753259182, 0.007941839285194874, 0.0032006981782615185, 0.0016516972100362182, -0.0353274904191494, 0.01533596497029066, 0.01793760247528553, -0.0015832330100238323, -0.005648290738463402, -0.028344150632619858, 0.009995763190090656, 0.020265383645892143, 0.003885339479893446, -0.04655560851097107, -0.024510158225893974, -0.05203273892402649, 0.036696773022413254, 0.0023791284766048193, 0.0032862783409655094, 0.037518344819545746, 0.0194438137114048, -0.02218237891793251, 0.023003948852419853, 0.022319307550787926, -0.023277804255485535, 0.0145828602835536, -0.005340202245861292, 0.005066345911473036, 0.01430900301784277, 0.033273566514253616, 0.027796437963843346, -0.0059906113892793655, 0.010475012473762035, 0.02368859015405178, 0.0145828602835536, -0.009858834557235241, 0.001082589034922421, 0.009516513906419277, -0.013008184731006622, -0.036696773022413254, 0.024373231455683708, 0.04956803098320961, -0.016842175275087357, 0.02587944082915783, -0.0021566201467067003, -0.0016516972100362182, 0.007257197983562946, -0.013350505381822586, -0.012802792713046074, 0.004724025260657072, 0.015404429286718369, 0.036970630288124084, 0.03642291948199272, 0.016979103907942772, -0.01533596497029066, -0.00034232065081596375, 0.009858834557235241, 0.00883187260478735, -0.030535003170371056, -0.009516513906419277, -0.0001240912388311699, -0.023551661521196365, -0.0021395040675997734, -0.04737718030810356, -0.018074531108140945, -0.01184429507702589, -0.013829754665493965, 0.006983341183513403, 0.017526818439364433, 0.03436899557709694, 0.03245199844241142, 0.005511362571269274, -0.012665864080190659, -0.0034403225872665644, -0.012939720414578915, -0.045186325907707214, 0.011159653775393963, -0.002481824718415737, -0.007188733667135239, -0.0070860376581549644, -0.022593162953853607, 0.0035772507544606924, 0.008489551953971386, 0.04463861510157585, 0.016499854624271393, -0.007394126150757074, 0.021223880350589752, 0.006127539556473494, 0.01821145974099636, -0.04107847809791565, -0.03916148468852043, 0.053675878793001175, -0.0030980019364506006, -0.005100577604025602, 0.016568319872021675, 0.011228117160499096, 0.016089070588350296, 0.00015297454956453294, -0.03614906221628189, 0.023825516924262047, 0.003714179154485464, 0.02492094412446022, -0.020813096314668655, 0.04135233536362648, -0.016773711889982224, 0.011638902127742767, -0.0016431391704827547, -0.008900336921215057, 0.006024843547493219, 0.0291657205671072, -0.010269619524478912, -0.014377467334270477, 0.0006974783609621227, -0.004826721269637346, 0.0073598939925432205, 0.0007916165050119162, 0.056414443999528885, -0.05449744686484337, -0.00883187260478735, -0.004826721269637346, -0.0005070624756626785, 0.009174193255603313, -0.002276432467624545, 0.017047569155693054, 0.002327780472114682, -0.001857089577242732, 0.009995763190090656, 0.030808858573436737, 0.027111796662211418, -0.018348386511206627, -0.04381704330444336, 0.023825516924262047, 0.017800673842430115, -0.005305970087647438, -0.005271737929433584, -0.06928569823503494, 0.021771593019366264, 0.003714179154485464, -0.020539239048957825, 0.015472893603146076, 0.01889610104262829, 0.012323543429374695, 0.018348386511206627, 0.028344150632619858, -0.022593162953853607, 0.021223880350589752, 0.006709484849125147, 0.025742514058947563, -0.001082589034922421, 0.0023791284766048193, 0.0023791284766048193, 0.029850361868739128, -0.04162619262933731, -0.00883187260478735, 0.056688301265239716, -0.03505363687872887, -0.015609822236001492, -0.0070860376581549644, -0.004587096627801657, -0.014719787985086441, 0.0018057414563372731, -0.040530767291784286, -0.024236302822828293, -0.037518344819545746, -0.02587944082915783, 0.050389599055051804, -0.009379586204886436, 0.01533596497029066, 0.01670524850487709, -0.0078391432762146, -0.017526818439364433, 0.036970630288124084, 0.015883678570389748, -0.014103610999882221, 0.005271737929433584, 0.0034403225872665644, -0.020128455013036728, -0.01095426082611084, 6.846413452876732e-05, 0.010680404491722584, 0.04655560851097107, 0.0194438137114048, 0.012323543429374695, -0.015883678570389748, -0.036970630288124084, 0.002584520960226655, -0.01095426082611084, 0.012939720414578915, 0.016294462606310844, 0.010269619524478912, -0.04354318603873253, 0.0072914301417768, 0.046007897704839706, -0.00821569561958313, 0.006435628514736891, 0.021360808983445168, 0.014788252301514149, 0.011296581476926804, -0.011501974426209927, 0.015609822236001492, 0.0014377468032762408, 0.013555898331105709, -0.031493499875068665, -0.008968801237642765, 0.0156782865524292, 0.03779220208525658, -0.021771593019366264, -0.02040231041610241, 0.010680404491722584, -0.006812180858105421, -0.03409513831138611, -0.003782643238082528, -0.01095426082611084, 0.018485315144062042, -0.04080462083220482, -0.021360808983445168, 0.04162619262933731, 0.011022725142538548, -0.019306885078549385, 0.001925553660839796, -0.006675252690911293, -0.0032178142573684454, -0.025468656793236732, 0.013966682367026806, -0.03067192994058132, 0.042721617966890335, -0.01369282603263855, 0.01916995644569397, -0.005134809762239456, 0.001249470398761332, -0.000962776830419898, -0.022319307550787926, -0.030945787206292152, 0.0010269619524478912, 0.0031322340946644545, -0.0058536832220852375, -0.008900336921215057, -0.0049294172786176205, 0.01745835319161415, -0.004124963656067848, -0.01622599922120571, -0.017800673842430115, 0.02861800603568554, -0.0273856520652771, -0.022045450285077095, -0.0005947821191512048, -0.023277804255485535, -0.008044535294175148, 0.03916148468852043, -0.003902455559000373, -0.01595214195549488, 0.01889610104262829, 0.050389599055051804, 0.02615329809486866, -0.016842175275087357, -0.010817333124577999, -0.033273566514253616, -0.013761290349066257, 0.031082715839147568, 0.008729176595807076, -0.006127539556473494, -0.018074531108140945, -0.0013436086010187864, -0.02492094412446022, 0.02889186330139637, -0.011501974426209927, 0.022867020219564438, 0.002755681285634637, 0.014514395967125893, -0.051211170852184296, 0.01307664904743433, -0.039709195494651794, -0.016568319872021675, 0.009995763190090656, 0.012665864080190659, 0.003782643238082528, -6.204561941558495e-05, -0.015883678570389748, -0.004022267647087574, -0.019717669114470482, 0.053949736058712006, 0.008284159936010838, -0.03409513831138611, -0.0005691081169061363, 0.03067192994058132, 0.028481079265475273, -0.024236302822828293, 0.01157043781131506, 0.0016944872913882136, 0.00455286493524909, -0.01184429507702589, -0.013555898331105709, -0.042173903435468674, 0.010475012473762035, 0.012871257029473782, -0.021634666249155998, -0.018348386511206627, 0.015815213322639465, -0.04902031645178795, 0.01916995644569397, -0.0033889745827764273, 0.007051805499941111, -0.006264468189328909, 0.0006375722005032003, 0.01095426082611084, -0.009448050521314144, -0.00883187260478735, 0.036696773022413254, 0.0015318848891183734, -0.01916995644569397, 0.015267501585185528, 0.004364588297903538, -0.006538324523717165, 0.015541357919573784, 0.0058536832220852375, -0.021360808983445168, -0.05230659618973732, -0.013966682367026806, -0.01889610104262829, 0.05203273892402649, -0.012323543429374695, -0.06408242881298065, 0.004279008135199547, -0.0001139285959652625, -0.0010098458733409643, -0.0011553321965038776, -0.002259316388517618, 0.025331728160381317, -0.059153009206056595, -0.006538324523717165, 0.019717669114470482, 0.02218237891793251, -0.026701010763645172, -0.01095426082611084, -0.03012421727180481, -0.009242657572031021, -0.019717669114470482, -0.0015661170473322272, -0.004450168460607529, -0.007565286476165056, 0.0010226829908788204, 0.010543475858867168, -0.009516513906419277, -0.001181006315164268, -0.002396244555711746, 0.0070860376581549644, 0.010748868808150291, -0.006230236031115055, 0.027933364734053612, -0.010680404491722584, -0.014035146683454514, -0.018759172409772873, -0.025742514058947563, 0.007804911118000746, 0.050663456320762634, -0.0059906113892793655, -0.039983052760362625, -0.014172075316309929, 0.005682522896677256, 0.001857089577242732, 0.017800673842430115, -0.012939720414578915, 0.009790371172130108, -0.04381704330444336, 0.040530767291784286, -0.009311121888458729, 0.030945787206292152, 0.05531901866197586, 0.034505922347307205, 0.008352624252438545, 0.040256910026073456, 0.003714179154485464, -0.017047569155693054, -0.001163890236057341, 0.04190004989504814, 0.012939720414578915, 0.018074531108140945, -0.04135233536362648, 0.01369282603263855, -0.0032006981782615185, 0.04190004989504814, 0.016636783257126808, -0.032041214406490326, -0.01691064052283764, 0.03231506794691086, -0.01595214195549488, -0.01430900301784277, 0.0010055669117718935, -0.00014227702922653407, -0.0032349301036447287, 0.002841261448338628, 0.01793760247528553, 0.009995763190090656, 0.011296581476926804, -0.051211170852184296, -0.031219644472002983, -0.006127539556473494, -0.007531054317951202, 0.032041214406490326, 0.02861800603568554, -0.0028754936065524817, 0.022867020219564438, -0.00883187260478735, -0.00422766013070941, -0.0035943668335676193, -0.011501974426209927, 0.0067779491655528545, 0.05285431072115898, 0.0017287193331867456, 0.03779220208525658, -0.020539239048957825, 0.02765950933098793, -0.020128455013036728, -0.010748868808150291, -0.046007897704839706, -0.00455286493524909, 0.03505363687872887, -0.0070860376581549644, -0.011981222778558731, -0.05011574551463127, -0.006846413016319275, -0.00023106644221115857, -0.015541357919573784, -0.0034403225872665644, -0.03039807453751564, 0.030261145904660225, 0.0291657205671072, 0.002584520960226655, 0.010611940175294876, 0.031219644472002983, -0.015130572952330112, 0.025194799527525902, 0.006709484849125147, -0.0062986998818814754, 0.003936687484383583, -0.005100577604025602, -0.029439575970172882, -0.028481079265475273, 0.01889610104262829, -0.017526818439364433, 0.04354318603873253, -0.021634666249155998, -0.028754934668540955, -0.033273566514253616, -0.014856716617941856, -0.024373231455683708, -0.019580742344260216, 0.036696773022413254, 0.0015404429286718369, -0.037244487553834915, -0.0078391432762146, -0.04436475783586502, -0.01643139123916626, 0.03833991289138794, -0.029987288638949394, 0.029439575970172882, -0.019991526380181313, 0.017800673842430115, -0.021771593019366264, 0.013966682367026806, 0.01821145974099636, -0.0468294657766819, 0.022456234320998192, 0.017526818439364433, -0.0044844006188213825, 0.03861377015709877, -0.0007873374852351844, 0.009858834557235241, -0.026564082130789757, -0.053402021527290344, -0.0012922604801133275, 0.03560134768486023, 0.019854597747325897, -0.028070293366909027, 0.02314087562263012, -0.01889610104262829, 0.015404429286718369, -0.03614906221628189, -0.011501974426209927, 0.009311121888458729, 0.031219644472002983, 0.017047569155693054, -0.002892609452828765, -0.005305970087647438, -0.021771593019366264, 0.043269332498311996, -0.013966682367026806, -0.010543475858867168, 0.02067616768181324, -0.014240539632737637, -0.0145828602835536, 0.031082715839147568, -0.003970919642597437, -0.0002567404881119728, 0.0027043332811444998, -0.06463013589382172, -0.016773711889982224, -0.042173903435468674, 0.004193427972495556, -0.021086951717734337, -0.020539239048957825, -0.031219644472002983, -0.02615329809486866, -0.028754934668540955, 0.007154501508921385, -0.013966682367026806, 0.037518344819545746, 0.0034403225872665644, -0.037244487553834915, -0.007941839285194874, -0.008078766986727715, -0.03587520495057106, -0.0018827635794878006, 0.0016688131727278233, 0.04436475783586502, -0.007804911118000746, 0.021771593019366264, 0.017389889806509018, -0.007804911118000746, 0.0004963649553246796, 0.031493499875068665, 0.0032178142573684454, -0.022730091586709023, -0.02889186330139637, -0.016636783257126808, -0.032999709248542786, -0.003953803330659866, 0.017116032540798187, 0.005100577604025602, 0.003697063075378537, -0.0018827635794878006, -0.017252961173653603, 0.022045450285077095, 0.00024283371749334037, 0.009379586204886436, -0.003714179154485464, -0.02492094412446022, 0.010680404491722584, 0.0037484110798686743, 0.03245199844241142, -0.025605585426092148, 0.03779220208525658, 0.0074968221597373486, 0.0036799469962716103, 0.005374434404075146, -0.017321424558758736, -0.017800673842430115, 0.01184429507702589, 0.010064227506518364, 0.040256910026073456, -0.0072914301417768, 0.009927298873662949, -0.03614906221628189, 0.024784015491604805, -0.002113830065354705, 0.026974868029356003, -0.022045450285077095, 0.026016369462013245, -0.028754934668540955, 0.0072229658253490925, 0.018485315144062042, -0.039435338228940964, 0.021223880350589752, 0.031219644472002983, -0.007736446801573038, -0.005682522896677256, 0.001857089577242732, -0.008489551953971386, -0.024099374189972878, 0.0070860376581549644, 0.015541357919573784, 0.009653442539274693, 0.039435338228940964, -0.04929417371749878, -0.025057872757315636, 0.032999709248542786, -0.026974868029356003, -0.047651033848524094, -0.048198748379945755, 0.022456234320998192, 0.002567404881119728, 0.0006632462609559298, 0.0034060904290527105, -0.008900336921215057, -0.02464708685874939, -0.006264468189328909, 0.023551661521196365, -0.019717669114470482, -0.011707366444170475, -0.0008215695852413774, -0.017526818439364433, 0.022867020219564438, 0.005203274078667164, 0.005100577604025602, -0.017047569155693054, -0.006401396356523037, 0.0078391432762146, 0.028754934668540955, -0.016568319872021675, -0.0008215695852413774, -0.026016369462013245, -0.020813096314668655, 0.03806605562567711, 0.008147231303155422, -0.0058536832220852375, -0.020128455013036728, -0.021771593019366264, -0.03231506794691086, -0.025331728160381317, 0.022867020219564438, -0.0029268416110426188, 0.039983052760362625, -0.006812180858105421, -0.03313663974404335, -0.01691064052283764, 0.009516513906419277, 0.03067192994058132, 0.022730091586709023, -0.0044844006188213825, 0.011159653775393963, 0.007394126150757074, -0.0034916705917567015, 0.0097219068557024, -0.04135233536362648, -0.039435338228940964, -0.009516513906419277, -0.018622243776917458, -0.009379586204886436, 0.030535003170371056, 0.003953803330659866, 0.021771593019366264, 0.047924891114234924, 0.019854597747325897, -0.001403514645062387, -0.028207221999764442, 0.014651323668658733, -0.03505363687872887, -0.0035772507544606924, 0.020539239048957825, 0.026837939396500587, 0.04354318603873253, 0.006538324523717165, 0.0036457150708884, 0.012871257029473782, 0.0030124217737466097, -0.02341473288834095, -0.0030124217737466097, 0.03313663974404335, -0.021771593019366264, 0.0022422003094106913, 0.004689793102443218, 0.004655560944229364, 0.012871257029473782, 0.039435338228940964, -0.03614906221628189, -0.008249927312135696, 0.021223880350589752, -0.03313663974404335, -0.026290226727724075, 0.01745835319161415, -0.00024497322738170624, -0.00046213288442231715, 0.0176637452095747, 0.0029953056946396828, -0.009653442539274693, 0.02464708685874939, -0.000710315362084657, -0.0009157077292911708, -0.017321424558758736, 0.014445931650698185, 0.014856716617941856, 0.011707366444170475, -0.025468656793236732, 0.011501974426209927, 0.009379586204886436, -0.010132691822946072, 0.028207221999764442, 0.03436899557709694, 0.029576504603028297, -0.01622599922120571, -0.01745835319161415, 0.010885796509683132, 0.031219644472002983, -0.0003872502420563251, -0.027522580698132515, -0.03245199844241142, 0.03642291948199272, -0.008694944903254509, 0.029302647337317467, -0.004279008135199547, -0.04628175124526024, 0.0018742055399343371, -0.019306885078549385, -0.0020025759004056454, 0.021497737616300583, 0.0176637452095747, 0.002413360634818673, 0.009584978222846985, -0.01889610104262829, 0.028754934668540955, -0.00578521890565753, -0.010064227506518364, -0.013213577680289745, -0.009242657572031021, -0.02464708685874939, -0.003953803330659866, -0.02040231041610241, 0.036696773022413254, 0.007428358308970928, -0.023003948852419853, 0.036970630288124084, 0.0035430188290774822, -0.02095002494752407, -0.03614906221628189, -0.042447760701179504, -0.03614906221628189, 0.03286278247833252, -0.018759172409772873, 0.018074531108140945, -0.02615329809486866, -0.017389889806509018, 0.005066345911473036, 0.00398803548887372, -0.011296581476926804, 0.027111796662211418, 0.031082715839147568, 0.0273856520652771, 0.01889610104262829, 0.040530767291784286, -0.008386855944991112, 0.013350505381822586, 0.045460183173418045, -0.019717669114470482, 0.0018142994958907366, -0.021086951717734337, -0.016636783257126808, 0.022593162953853607, -0.03642291948199272, -0.024510158225893974, 0.005203274078667164, 0.006641020532697439, 0.027111796662211418, -0.019991526380181313, -0.051485028117895126, 0.00910572987049818, -0.018348386511206627, -0.007804911118000746, -0.016499854624271393, 0.018074531108140945, 0.042721617966890335, -0.005545594729483128, -0.0388876274228096, 0.04080462083220482, -0.0008515226072631776, -0.004587096627801657, -0.008694944903254509, -0.0010098458733409643, -0.002259316388517618, -0.015472893603146076, -0.0015147689264267683, 0.002652985043823719, -0.00766798248514533, -0.02861800603568554, 0.023551661521196365, -0.006435628514736891, -0.042173903435468674, 0.01821145974099636, 0.029987288638949394, 0.022319307550787926, 0.024510158225893974, 0.016089070588350296, 0.023551661521196365, -0.03614906221628189, -0.017800673842430115, 0.029576504603028297, -0.0019854598212987185, 0.012049687094986439, 0.019717669114470482, 0.021360808983445168, 0.005614058580249548, 0.03916148468852043, -0.04190004989504814, 0.006812180858105421, -0.014240539632737637, -0.01916995644569397, -0.030808858573436737, -0.011228117160499096, -0.025742514058947563, 0.03642291948199272, 0.01307664904743433, 0.030261145904660225, -0.006435628514736891, 0.009858834557235241, 0.039435338228940964, -0.016499854624271393, -0.0156782865524292, 0.015472893603146076, -0.019306885078549385, -0.018622243776917458, -0.017389889806509018, 0.026016369462013245, 0.042721617966890335, -0.011501974426209927, 0.022867020219564438, 0.024236302822828293, -0.028207221999764442, 0.03368435055017471, 0.03354742377996445, -0.017800673842430115, -0.0021737362258136272, -0.016773711889982224, -0.031219644472002983, -0.008044535294175148, -0.008968801237642765, -0.01821145974099636, -0.008694944903254509, 0.03779220208525658, 0.0020881560631096363, 0.019991526380181313, -0.009174193255603313, -0.007770678959786892, 0.007325661834329367, 0.015472893603146076, 0.021223880350589752, 0.012597399763762951, 0.012871257029473782, 0.01718449778854847, -0.021223880350589752, -0.029302647337317467, 0.014856716617941856, -0.03217814117670059, 0.06873799115419388, 0.04463861510157585, -0.039709195494651794, 0.002618753118440509, 0.007462590467184782, -0.0070860376581549644, 0.008318391628563404, -0.018074531108140945, 0.021223880350589752, -0.009448050521314144, -0.029713433235883713, -0.0009713348699733615, -0.024373231455683708, 0.01821145974099636, -0.00883187260478735, 0.02889186330139637, -0.010475012473762035, 0.0042618922889232635, 0.002182294148951769, -0.007941839285194874, -0.015883678570389748, 0.013555898331105709, 0.053128164261579514, -0.015815213322639465, -0.015404429286718369, 0.019580742344260216, -0.017252961173653603, 0.02861800603568554, -0.006401396356523037, -0.023551661521196365, -0.025605585426092148, -0.004792489111423492, 0.002028249902650714, 0.04381704330444336, -0.03560134768486023, -0.03614906221628189, 0.021360808983445168, -0.022730091586709023, 0.006230236031115055, 0.005956379231065512, -0.04710332304239273, -0.003697063075378537, 0.0010012879502028227, -0.010406548157334328, 0.028207221999764442, -0.024099374189972878, 0.004997881595045328, 0.009174193255603313, 0.014377467334270477, -0.020813096314668655, -0.020813096314668655, -0.04463861510157585, -0.055866729468107224, 0.029850361868739128, -0.02368859015405178, -0.0388876274228096, 0.02642715536057949, 0.0016089071286842227, -0.005374434404075146, -0.011159653775393963, 0.0029610737692564726, -0.020539239048957825, -0.007154501508921385, 0.00766798248514533, -0.02218237891793251, -0.020539239048957825, 0.039435338228940964, 0.0074968221597373486, -0.011981222778558731, -0.016020607203245163, 0.015130572952330112, -0.006196003872901201, -0.006401396356523037, 0.02464708685874939, -0.003902455559000373, 0.018622243776917458, 0.017526818439364433, -0.004244775976985693, -0.008078766986727715, -0.013487434014678001, -0.0016859292518347502, 0.021771593019366264, 0.018759172409772873, 0.0072914301417768, -0.03409513831138611, -0.016294462606310844, -0.019991526380181313, -0.004963649436831474, 0.03560134768486023, 0.030808858573436737, 0.02464708685874939, 0.027796437963843346, -0.003885339479893446, 0.0034232065081596375, -0.008112999610602856, 0.02615329809486866, 0.024510158225893974, 0.02040231041610241, -0.0021223879884928465, 0.022730091586709023, -0.0070860376581549644, -0.010132691822946072, 0.0004343193431850523, 0.01821145974099636, -0.024784015491604805, -0.03861377015709877, -0.006880645174533129, -0.025057872757315636, 0.0034916705917567015, -0.005271737929433584, 0.02095002494752407, -0.024236302822828293, 0.009037265554070473, 0.029850361868739128, 0.013282041065394878, 0.023962445557117462, -0.0037484110798686743, -0.006538324523717165, 0.01430900301784277, 0.008318391628563404, -0.002550288802012801, -0.002687217202037573, -0.00034232065081596375, -0.00821569561958313, 0.009311121888458729, 0.037518344819545746, -0.04463861510157585, 0.025605585426092148, 0.010201155208051205, -0.012049687094986439, 0.004518632777035236, -0.0010269619524478912, -0.0023791284766048193, -0.020265383645892143, 0.030535003170371056, -0.01793760247528553, 0.001163890236057341, 0.0004107847926206887, -0.015130572952330112, 0.028481079265475273, -0.05504516139626503, 0.02889186330139637, 0.013418969698250294, 0.028344150632619858, -0.00273856520652771, 0.01615753397345543, 0.0006803622818551958, -0.015541357919573784, 0.023962445557117462, -0.02190852165222168, -0.00273856520652771, 0.012049687094986439, 0.030261145904660225, -0.004518632777035236, 0.001403514645062387, -0.027933364734053612, -0.008112999610602856, -0.005682522896677256, 0.019854597747325897, 0.0033376263454556465, -0.007907606661319733, 0.003833991242572665, -0.007770678959786892, -0.007462590467184782, 0.009790371172130108, 0.0013521666405722499, -0.002807029290124774, -0.008763409219682217, -0.0036114829126745462, -0.0074968221597373486, -0.01615753397345543, 0.016362927854061127, -0.012528936378657818, -0.006469860207289457, -0.01369282603263855, 0.011912758462131023, 0.03258892521262169, 0.056414443999528885, 0.016362927854061127, -0.009927298873662949, -0.0016003490891307592, 0.005579826887696981, 0.030535003170371056, 0.014856716617941856, -0.004313240293413401, -0.005579826887696981, -0.002670101122930646, 0.03012421727180481, -0.04190004989504814, -0.014240539632737637, -0.006949109490960836, -0.013555898331105709, -0.002413360634818673, 0.00547713041305542, -0.002533172955736518, -0.002772797364741564, -0.012734328396618366, -0.015267501585185528, -0.03505363687872887, -0.020128455013036728, -0.002909725531935692, -0.024510158225893974, 0.021634666249155998, -0.006469860207289457, -0.0008001745445653796, 0.009790371172130108, 0.022456234320998192, 0.039983052760362625, 0.026974868029356003, 0.006264468189328909, 0.019306885078549385, -0.020128455013036728, 0.005305970087647438, 0.010680404491722584, 0.028070293366909027, 0.007428358308970928, 0.025742514058947563, 0.011365045793354511, 0.03861377015709877, -0.02341473288834095, 0.037244487553834915, -0.014993644319474697, -0.03258892521262169, 0.031219644472002983, 0.020128455013036728, 0.006367164198309183, 0.008660712279379368, 0.0008558016270399094, 0.018759172409772873, -0.030945787206292152, -0.021634666249155998, -0.04737718030810356, -0.0035430188290774822, 0.03217814117670059, 0.021223880350589752, -0.002670101122930646, -0.013282041065394878, -0.0005819451180286705, -0.0014719788450747728, -0.03245199844241142, -0.011638902127742767, -0.018485315144062042, -0.007051805499941111, -0.014856716617941856, -0.017800673842430115, -0.006914877332746983, -0.004518632777035236, -0.018622243776917458, -0.006367164198309183, -0.004587096627801657, 0.03163042664527893, -0.033958207815885544, 0.006504092365503311, -0.009379586204886436, -0.0023106643930077553, 0.055866729468107224, -0.028754934668540955, -3.423206726438366e-05, 0.05258045345544815, 0.015746749937534332, -0.03779220208525658, 0.006435628514736891, -0.008318391628563404, 0.012939720414578915, -0.029850361868739128, -0.02314087562263012, -0.02218237891793251, -0.0017800674540922046, -0.009037265554070473, -0.03587520495057106, 0.04162619262933731, -0.0070860376581549644, 0.006196003872901201, 0.006127539556473494, 0.013898218981921673, -0.006024843547493219, 0.021634666249155998, 0.018348386511206627, -0.015062108635902405, 0.037518344819545746, 0.036696773022413254, -0.008421087637543678, 0.027111796662211418, -0.0035772507544606924, -0.012871257029473782, 0.01889610104262829, -0.01369282603263855, -0.026701010763645172, 0.027111796662211418, -0.022319307550787926, -0.020128455013036728, 0.008489551953971386, -0.011159653775393963, -0.014172075316309929, -0.01615753397345543, 0.029028791934251785]; Switch to the
sample_mflixdatabase:use sample_mflix Load the embeddings into
mongosh.load('embeddings.js');
Run the $vectorSearch and $search with Native Reranking.
The following queries use the $rerank stage after a $vectorSearch and $search stage to find the top ten movies that are most relevant to the query for martial arts.
The following query uses the $vectorSearch stage to match movies that are most relevant to the query for martial
arts. The query then uses the $rerank stage to reorder the documents to focus on combat styles and fight
choreography. It uses the following pipeline stages:
Pipeline Stage | Description |
|---|---|
Performs a vector search for the query text martial arts using the | |
Excludes all fields except | |
Filters the documents to include only documents that have a | |
Reorders the documents to match the query using the | |
Adds a field named | |
Limits the output to 10 documents. | |
Excludes all fields except |
1 db.embedded_movies.aggregate([ 2 { 3 "$vectorSearch": { 4 "index": "vector_index", 5 "path": "plot_embedding_voyage_4_large", 6 "queryVector": MARTIAL_ARTS_EMBEDDINGS, 7 "numCandidates": 100, 8 "limit": 100 9 } 10 }, 11 { 12 "$project": { 13 "_id": 0, 14 "title": 1, 15 "fullplot": 1, 16 "vectorScore": { "$meta": "vectorSearchScore" } 17 } 18 }, 19 { 20 "$match": { 21 "fullplot": { "$exists": true, "$type": "string" } 22 } 23 }, 24 { 25 "$rerank": { 26 "model": "rerank-2.5", 27 "query": { 28 "text": "martial arts; focus on combat styles and fight choreography" 29 }, 30 "path": "fullplot", 31 "numDocsToRerank": 100 32 } 33 }, 34 { 35 "$addFields": { 36 "rerankScore": { "$meta": "score" } 37 } 38 }, 39 { "$limit": 10 }, 40 { 41 "$project": { 42 "_id": 0, 43 "title": 1, 44 "fullplot": 1, 45 "vectorScore": 1, 46 "rerankScore": 1 47 } 48 } 49 ])
[ { title: 'The Real Miyagi', fullplot: 'The life of the greatest karate master of a generation.', vectorScore: 0.7579228281974792, rerankScore: 0.5986876487731934 }, { title: 'Kung Fu Killer', fullplot: 'A Caucasian monk in Shanghai infiltrates the underworld to find the killers of his spiritual female Grandmaster.', vectorScore: 0.7047170996665955, rerankScore: 0.5986876487731934 }, { title: 'Dragon Tiger Gate', fullplot: 'Three young martial arts masters emerge from the back streets of Hong Kong to help the powerless fight injustice.', vectorScore: 0.7224205732345581, rerankScore: 0.5986876487731934 }, { title: 'Pistol Opera', fullplot: 'The No. 3 assassin of Japan is given the chance to usurp No. 1 and take their place.', vectorScore: 0.6872181296348572, rerankScore: 0.5986876487731934 }, { title: 'Once Upon a Time in Shanghai', fullplot: 'A laborer moves to Shanghai in the hope of becoming rich. But ends up using his kung fu skills to survive.', vectorScore: 0.6834211349487305, rerankScore: 0.5986876487731934 }, { title: 'Yasmine', fullplot: "A young woman who lives with her strict father works to become a a champion at Silat, Brunei's version of kung fu.", vectorScore: 0.7219811677932739, rerankScore: 0.5986876487731934 }, { title: 'Best of the Best', fullplot: 'Team USA gets rid of personal ghosts while fighting Team Korea in Taekwondo championship. "Adversity overcome" formula with excellent fighting scenes.', vectorScore: 0.6988193988800049, rerankScore: 0.5986876487731934 }, { title: 'Dragon Strike', fullplot: 'The adventures of a restless martial arts student called Dragon, who, while constantly pursuing a girl, gets involved in the affairs of a gang of thieves.', vectorScore: 0.7163552641868591, rerankScore: 0.5986876487731934 }, { title: 'Legendary Weapons of China', fullplot: "A band of killers from an ailing kung fu and magic society are sent on a manhunt for a former member of the society, whose bad mouthing threatens it's existence.", vectorScore: 0.7019355893135071, rerankScore: 0.5986876487731934 }, { title: 'The Touch', fullplot: 'A sister and brother, the last heirs of a family of acrobats, are called upon by a Buddhist monk sect to retrieve an artifact that their ancestors have protected throughout the ages.', vectorScore: 0.6897575855255127, rerankScore: 0.5986876487731934 } ]
The following query uses the $search stage to perform a full-text search for the query text martial arts. The query then uses the $rerank stage to reorder the documents to prioritize movie plots
about martial arts competition and training. It uses the following pipeline stages:
Pipeline Stage | Description |
|---|---|
Performs a full-text search for the query text martial arts. | |
Limits the output of the | |
Excludes all fields except | |
Filters the documents to include only documents that have a | |
Reorders the documents to match the query using the | |
Adds a field named | |
Limits the output to 10 documents. | |
Excludes all fields except |
1 db.embedded_movies.aggregate([ 2 { 3 "$search": { 4 "index": "search_index", 5 "text": { 6 "query": "martial arts", 7 "path": "fullplot" 8 } 9 } 10 }, 11 { 12 "$limit": 100 13 }, 14 { 15 "$project": { 16 "_id": 0, 17 "title": 1, 18 "fullplot": 1, 19 "searchScore": { "$meta": "searchScore" } 20 } 21 }, 22 { 23 "$match": { 24 "fullplot": { "$exists": true, "$type": "string" } 25 } 26 }, 27 { 28 "$rerank": { 29 "model": "rerank-2.5", 30 "query": { 31 "text": "martial arts; prioritize movie plots about martial arts competition and training" 32 }, 33 "path": "fullplot", 34 "numDocsToRerank": 100 35 } 36 }, 37 { 38 "$addFields": { 39 "rerankScore": { "$meta": "score" } 40 } 41 }, 42 { "$limit": 10 }, 43 { 44 "$project": { 45 "_id": 0, 46 "title": 1, 47 "fullplot": 1, 48 "searchScore": 1, 49 "rerankScore": 1 50 } 51 } 52 ])
[ { title: 'Dragon Tiger Gate', fullplot: 'Three young martial arts masters emerge from the back streets of Hong Kong to help the powerless fight injustice.', searchScore: 5.30598258972168, rerankScore: 0.5986876487731934 }, { title: 'Dragon Strike', fullplot: 'The adventures of a restless martial arts student called Dragon, who, while constantly pursuing a girl, gets involved in the affairs of a gang of thieves.', searchScore: 5.074832439422607, rerankScore: 0.5986876487731934 }, { title: 'Here Comes the Boom', fullplot: 'A high school biology teacher looks to become a successful mixed-martial arts fighter in an effort to raise money to prevent extra-curricular activities from being axed at his cash-strapped school.', searchScore: 4.862981796264648, rerankScore: 0.5986876487731934 }, { title: 'Here Comes the Boom', fullplot: 'A high school biology teacher looks to become a successful mixed-martial arts fighter in an effort to raise money to prevent extra-curricular activities from being axed at his cash-strapped school.', searchScore: 4.862981796264648, rerankScore: 0.5986876487731934 }, { title: 'Vampire Effect', fullplot: "It's a high-kicking battle on the dark side when an ace vampire slayer and his beautiful sidekicks wage the ultimate martial-arts showdown with one of the most dangerous of the undead.", searchScore: 4.862981796264648, rerankScore: 0.5986876487731934 }, { fullplot: 'FBI agent Malcolm Turner and his son, Trent, go undercover at an all-girls performing arts school after Trent witnesses a murder. Posing as Big Momma and Charmaine, they must find the murderer before he finds them.', title: 'Big Mommas: Like Father, Like Son', searchScore: 2.3932719230651855, rerankScore: 0.5986876487731934 }, { title: 'The Last Dragon', fullplot: 'In New York City, a young man searches for the "master" to obtain the final level of martial arts mastery known as the glow. Along the way, he must fight an evil martial arts expert and rescue a beautiful singer from an obsessed music promoter.', searchScore: 5.777412414550781, rerankScore: 0.5986876487731934 }, { title: 'SPL: Kill Zone', fullplot: 'Chan, an articulate senior detective nearing the end of his career, is taking care of the daughter of a witness killed by ruthless crime lord Po. Martial arts expert Ma is set to take over as head of the crime unit, replacing Chan who wants an early retirement.', searchScore: 4.463685035705566, rerankScore: 0.5986876487731934 }, { title: 'Fighter in the Wind', fullplot: 'A young Korean man arrives in Japan near the end of World War II with hopes of being a fighter pilot, but ends up on the streets battling racism, organized crime, occupying American servicemen, and his own fear of failure as a martial artist. (Korean with English subtitles)', searchScore: 2.2145204544067383, rerankScore: 0.5986876487731934 }, { title: "Bruce Lee: A Warrior's Journey", fullplot: "Legendary martial artist Bruce Lee is the subject of this thoughtful documentary by Lee aficionado John Little. Using interviews, behind-the-scenes footage and action sequences from Lee's last (unfinished) film, Game of Death, Little paints a textured, complex portrait of the world's most famous action hero.", searchScore: 2.2390332221984863, rerankScore: 0.5986876487731934 } ]
Additional Resources
To learn more about Native Reranking, see the following resources: