# .near\_text results are not satisfactory (distance scores too close)

**URL:** <https://forum.weaviate.io/t/near-text-results-are-not-satisfactory-distance-scores-too-close/194>\
**Category:** Support\
**Tags:** neartext\
**Created:** [June 15, 2023, 7:42am UTC](https://forum.weaviate.io/t/near-text-results-are-not-satisfactory-distance-scores-too-close/194 "2023-06-15T07:42:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amani-acog](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/amani-acog/32/235_2.png) [@amani-acog](https://forum.weaviate.io/u/amani-acog)\
**Post date:** [June 15, 2023, 7:42am UTC](https://forum.weaviate.io/t/near-text-results-are-not-satisfactory-distance-scores-too-close/194/1 "2023-06-15T07:42:21Z")

</div>

I am using locally setup Weaviate. And I have class with schema as

```python
class_obj = {
  "class": "Test3",
  "vectorizer": "text2vec-openai",
  "moduleConfig": {
    "text2vec-openai": {
      "model": "ada",
      "modelVersion": "002",
      "type": "text"
    }
  }
}

```

and ingested data. I have data in csv file, so I generated json object and added to class in batches.  
Now I want to use .near\_text() to get relevant results from the data using the query:

```python
result = (
    client.query
    .get("Test3", ["title", "abstract", "number", "_additional {distance}"])
    .with_near_text({"concepts": ["machine learning"]})
    .with_additional(['certainty'])
    .do()
)

```

But I am not satisfied with the results generated by Weaviate. My data doesn’t consists of any information related to ‘machine learning’. But still I got results with distance \<0.25 and certainity \> 0.8. I am using ‘cosine’ similarity here.  
I should not have got any results, but it fetched all the data of the file with approximately same similarity.  
Note: I tried with several keywords(appeared in my data) but the score for the more similar vs irrelevant data is 0.17 vs 0.24 which can be considered as relevant data.  
Please provide me some support in this regard.

---

<div class="post-metadata">

**Author:** ![jphwang](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jphwang/32/38_2.png) [@jphwang](https://forum.weaviate.io/u/jphwang)\
**Post date:** [June 20, 2023, 12:37pm UTC](https://forum.weaviate.io/t/near-text-results-are-not-satisfactory-distance-scores-too-close/194/2 "2023-06-20T12:37:21Z")

</div>

Hi @amani-acog - the similarity value comes from the model (in this case OpenAI), and is not to do with Weaviate.

Additionally, the number itself would not necessarily tell you if two values are “sufficiently” similar, as there is a degree of judgment involved. I have seen our users choose whatever threshold works best for them, based on their domain knowledge and intuition.

So I would say that if a particular threshold seems too large, you can always reduce it to one that suits your data.

I hope that helps,  
JP

---

<div class="post-metadata">

**Author:** ![dandv](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dandv](https://forum.weaviate.io/u/dandv)\
**Post date:** [June 20, 2023, 1:42pm UTC](https://forum.weaviate.io/t/near-text-results-are-not-satisfactory-distance-scores-too-close/194/3 "2023-06-20T13:42:25Z")

</div>

Seconding @jphwang’s answer. I’ve added this as [an FAQ](https://forum.weaviate.io/t/weaviate-faq/128#why-does-weaviate-appear-to-produce-low-quality-search-results-9).

> <https://stackoverflow.com/questions/76208329/nonsensical-distance-queries-from-weaviate/76211365#76211365>
