Skip to content

Atlas Search Configuration

If you have an atlas search index defined for your collection you should be able to see a configuration of that index when you navigate to the Search Indexes tab in the collection settings:

Atlas index example

Please note

You can not create an index in Florentine.ai. Once you create an index via Atlas or Mongo Shell you should see it on the Search Indexes tab as well.

Set Score Threshold

Every atlas search in MongoDB returns a score that shows how closely a document matches the meaning of your query. This score ranges from 0 to 1, where 1 means a perfect match. In many cases, it's helpful to set a minimum score (score threshold) to filter out results with lower scores. This helps avoid showing results that are less relevant or confusing, and also reduces the number of documents returned.

Florentine.ai allows you to select one of three options for a score threshold, None, Dynamic and Static:

Atlas index threshold select

Setting the Score Threshold to None:

Returns all found documents that somehow match, even when the similarity might be quite vague.

Setting the Score Threshold to Dynamic:

This is the default setting. Based on the question the AI selects a threshold on its own from in between the defined range (default range is between 0 and 1). You can define a range between 0 and 5 with the slider next to the select buttons:

Atlas index dynamic range

I.e. if you set the range from 0.6 to 1.8 the AI will set the score threshold for a question between these two values. For very precise factual lookups it would set a higher threshold and for very broad or explanatory questions it would set a lower threshold.

Setting the Score Threshold to Static:

Sets the threshold to a fixed static value:

Atlas index static

Set Normalize Score

In contrast to vector search scores, atlas search scores are not limited to a fixed upper limit as the score is not normalized out of the box (although usually the highest possible score is somewhere between 2 and 5).

By activating the normalization you can normalize all found documents to a score on a scale from 0 to 1:

Atlas index normalize score

The score will then be normalized by setting the score of the document with the highest found score to 1 and all others document scores in relation to that score.

Especially if you have multiple indexed fields or a dynamic atlas search index this will guarantee you that even for slight matches at least some documents are returned and the fixed scale might also make it easier to set a good threshold.