Error with generative search

{‘data’: {‘Get’: {‘Question’: [{‘_additional’: {‘generate’: {‘error’: “Following property has empty value: ‘’. Make sure you spell the property name correctly, verify that the property exists and has a value”, ‘singleResult’: None}}

generatePrompt = "뒤 문장과 같은 형식으로 출력해줘 이 매물은 {realestateTypeName}이며 {tradeTypeName}입니다 그리고 {exposureAddress}에 있는 매물을 추천드립니다.{dealPrice}"



response = (
    client.query
    .get("Question", ["articleNo", "realestateTypeName", "tradeTypeName", "exposureAddress",'dealPrice' ,"ids"])
    .with_near_text({"concepts": ["이 집의 방향이 남향이면 좋겠어"]})
    .with_where({
        "operator": "And",
        "operands": [
            {
                "path": ["exposureAddress"],
                "operator": "Like",
                "valueText": '*성남시*',
            },
            {
                "path": ["exclusiveSpace"],
                "operator": "GreaterThan",
                "valueNumber": '30',
            },
            {
                "path": ["warrantPrice"],
                "operator": "GreaterThan",
                "valueNumber": '5000',
            }
            
            
        ]
    })
    .with_generate(single_prompt=generatePrompt)
    .with_limit(3)
    .do()
)

print(response)

All things are fine when I exclude dealPrice in the generatePrompt. And this error happens same for integers!

Hi!

When you remove dealPrice, does it get returned as a property in your results?

What object type is dealPrice?

Also, not sure I got the integers part. Can you elaborate on that?

Thanks!

When I remove dealPrice, it returned the data properly and the object type of dealPrice is integer

Hi!

If you run the query without the .with_generate(single_prompt=generatePrompt) part, does any of the results doesn’t have a dealPrice field?

This might be the issue =\

I will do some tests to try reproducing this scenario and will get back to you.

Hi!

I was kind of able to reproduce, does your error message has the name of the non existant property?

This is the error I was able to reproduce:

"generate": {
       "error": "Following property has empty value: 'empty_string'. Make sure you spell the property name correctly, verify that the property exists and has a value",
       "singleResult": null
      }

This will happen when your field doesn’t exist or it doesn’t have any value. So for that objects, it will not perform the single result generation.

To avoid this, you can filter out all objects that doesn’t have this property:

            {
                "path": ["dealPrice"],
                "operator": "IsNull",
                "valueBoolean": False,
            }

Bear in mind that, if you want to filter by non existent properties, you need to set invertedIndexConfig > indexNullState to true before creating your class

I got similar problem:

{
  "data": {
    "Get": {
      "Material": [
        {
          "_additional": {
            "generate": {
              "error": "Following property has empty value: 'su'. Make sure you spell the property name correctly, verify that the property exists and has a value",
              "singleResult": null
            }
          },
          "a5": 25,
          "bhn": 201,
          "e": 207000,
          "g": 79000,
          "heat_treatment": "as-rolled",
          "material": "Steel SAE 1040",
          "mu": 0.3,
          "ro": 7860,
          "su": 621,
          "sy": "414"
        }
      ]
    }
  }
}

In my example I can find “su”: 621, which is integer. For some reasons, they can’t recognize the integer and number type.