Natural language query to Elasticsearch query conversion

I have been working on a POC to build a Python code that converts natural language query to elasticsearch query DSL using an open-source LLM model.

Hi Folks,

I tried with text generation models like facebook/bart-large, gpt2 but didn’t get the desired result. But when I use the same prompt in ChatGPT or Gemini, it provides the expected response.

Is there any open-source LLM I can use that would be the best fit for this solution?

Kind regards,
Souvik