WrenAI icon indicating copy to clipboard operation
WrenAI copied to clipboard

AI-Service not able to return result or SQL query

Open amzar96 opened this issue 6 months ago • 5 comments

Image

I initially asked the question analyze the customer demographic for me in the thread, but it didn’t return any result. just a popup box.

Then I tried again 2 to 4 times. Sometimes it shows results, but the data is incorrect or inconsistent. Occasionally it returns only age, and other times it includes both age and marital status.

amzar96 avatar Jun 18 '25 08:06 amzar96

@amzar96 what llms are you using?

cyyeh avatar Jun 19 '25 02:06 cyyeh

what llms are you using?

hi @cyyeh , i am using openai gpt-4.1

amzar96 avatar Jun 19 '25 03:06 amzar96

  1. show me the application trend

This question also don't return correct answers. Sometimes the generated SQL is incorrect, such as when it fails due to CAST errors, wrong columns

amzar96 avatar Jun 19 '25 03:06 amzar96

error i got

[2025-06-19T03:45:13.197] [DEBUG] IbisAdaptor - Dry run error: Exception: <class 'psycopg.errors.UndefinedFunction'>, message: operator does not exist: numeric - date
LINE 1: ...r" AS "c" WHERE ((EXTRACT(year FROM CURRENT_DATE) - CAST("c"...
                                                             ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.

amzar96 avatar Jun 19 '25 03:06 amzar96

@amzar96 could you dm me in discord? I need to collect error more info from you

My username is Jimmy

cyyeh avatar Jun 19 '25 03:06 cyyeh