Not elegantly but I can think of one potential way with a custom search box component. What you could do is:
extend the search box component to perform a separate API call to LLM for the user's query into the query and filters object that you mention.
Invoke a search UI request with the query (possibly in this example it would be an empty string as all features of the query have been converted into filters) and transforming your filters object into Search UI filters.
Does that sound reasonable? I can try give an example via codesandbox if that sounds right.
Thanks Joe! Your approach makes sense to me for the UI side of this.
Any suggestions for LLMs to use/train that are good at converting natural language queries into a structured format for this use case? Admittedly, this question is beyond the scope of Search UI. But it would be a really powerful way to extend Search UI's capabilities.
Any suggestions for LLMs to use/train that are good at converting natural language queries into a structured format for this use case? Admittedly, this question is beyond the scope of Search UI. But it would be a really powerful way to extend Search UI's capabilities.
I dont have any recommendations unfortunately. There is a project that might help converting text into Elasticsearch filters Introduction — 😼 Kor 0.13.0
Definitely getting this part right is the hardest. Let me know if you have any success in this, and i will try follow up with a search ui integration example.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.