OpenAI SQLAgent is returning any random value

I am using langchan.js and OpenAI to query postgres database, where user can provide simple question like give me the sales details for invoice number XXXXXXX.
I am using sqltoolkit of langchan.js, OpenAI does create the sql correctly based on schema but it always return some random value.