# Error While quering a generative search

**URL:** <https://forum.weaviate.io/t/error-while-quering-a-generative-search/1282>\
**Category:** Support\
**Created:** [January 22, 2024, 6:07pm UTC](https://forum.weaviate.io/t/error-while-quering-a-generative-search/1282 "2024-01-22T18:07:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vedant](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@Vedant](https://forum.weaviate.io/u/Vedant)\
**Post date:** [January 22, 2024, 6:07pm UTC](https://forum.weaviate.io/t/error-while-quering-a-generative-search/1282/1 "2024-01-22T18:07:06Z")

</div>

generate\_prompt = “You are a mentor guide in a professional way if u don’t know reply politely”

response = (  
client.query  
.get(“class\_name”, [“property1”, “property2”])  
.with\_generate(grouped\_task=generate\_prompt)  
.with\_near\_text({  
“concepts”: [“How many people chose nike over adidas”]  
})  
.with\_limit(3)  
).do()

print(json.dumps(response, indent=2))

Error:  
{  
“errors”: [  
{  
“locations”: [  
{  
“column”: 95,  
“line”: 1  
}  
],  
“message”: “Cannot query field "generate" on type "Multi\_tenancyAdditional".”,  
“path”: null  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [January 22, 2024, 6:50pm UTC](https://forum.weaviate.io/t/error-while-quering-a-generative-search/1282/2 "2024-01-22T18:50:31Z")

</div>

Hi! Your server or class probably doesn’t have a generative module configured.

If you are runnig your own server, using docker or k8s, [you need to enabled it using environment variables.](https://weaviate.io/developers/weaviate/configuration/modules)

You can check the enabled modules in your server in:

> **[REST - /v1/meta | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/api/rest/meta)**
>
> Usage

Now, considering you do have the module enabled, your class may need to enabled it. Check your class schema for the enabled module:

> **[REST - /v1/schema | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/api/rest/schema#get-the-schema)**
>
> \- How-to - Manage Collections

Check our python recipes on how to use a generative module:

> <https://github.com/weaviate/recipes/tree/main/generative-search>
>
> //github.com/weaviate/recipes/tree/main/generative-search

Please, let me know if this helps or if you need further assistance.

Remember: we are here to help!

---

<div class="post-metadata">

**Author:** ![Vedant](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@Vedant](https://forum.weaviate.io/u/Vedant)\
**Post date:** [January 23, 2024, 9:24am UTC](https://forum.weaviate.io/t/error-while-quering-a-generative-search/1282/3 "2024-01-23T09:24:07Z")

</div>

```auto
neartext = {"concepts": ["Who is ###"]}

generate_prompt = "You are a mentor guide in a professional way if u dont know reply politely"

response = (
  client.query
  .get("class_name", ["property_1", "property_2"])
  .with_generate(grouped_task=generate_prompt)
  .with_tenant("tenant_name")
  .with_near_text(neartext)
  .with_limit(3)
).do()

print(json.dumps(response, indent=2))

{
  "data": {
    "Get": {
      "Multi_tenancy": [
        {
          "_additional": {
            "generate": {
              "error": null,
              "groupedResult": "I'm sorry, but I don't have the information you're looking for."
            }
          },
          "adidas": null,
          "deep": "#####is a############lated services and are ###### out of # with#########tion.\nThe C###########################."
        },
        {
          "_additional": {
            "generate": null
          },
          "adidas": null,
          "deep": "An##us##hk##########################################"
        },
        {
          "_additional": {
            "generate": null
          },
          "adidas": null,
          "deep": "\u2013 Training data: used to train network\n\u2013 Cross Validatio#################Production data: #######l network (MNN) is the most co#####################ge classification in remote\nsensing. MNN is us################################m."
        }
      ]
    }
  }
}

```

The group result isn’t retrieving from the properties it has retrieved

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [January 24, 2024, 7:38pm UTC](https://forum.weaviate.io/t/error-while-quering-a-generative-search/1282/4 "2024-01-24T19:38:46Z")

</div>

Hi!

Not sure I understood the error here.

you mean that `property_1` and `property_2` is not in the result?
