+Henry Weller <[email protected]>, one of my colleagues who is looking at something similar but mostly scoped to code search.
On Fri, Nov 20, 2026 at 7:43 AM Dawid Weiss <[email protected]> wrote: > > Hi everyone, > > Lucene query parsers (like the flexible query parser) are quite powerful - > they include all sorts of bells and whistles (boosts, boolean logic, > intervals, etc.). Not many people have deep knowledge of these. > > I've been wondering if anyone tried to train (or fine tune) an LLM model > to generate queries (in any format that is directly parseable to a Query > instance) from natural language "questions" to an index. > > The system prompt would include field names and their types + > descriptions, so that the model knows what it's working with. The user > prompt is the question. The expected output is something that can be parsed > automatically into a Query (flexible query parser would be one example, > some kind of structured XML or json would be another). > > I've done the above with larger models but they're quite expensive to run. > Smaller, untuned models, don't work so well and have clear trouble with > more complex queries (like nested interval queries). > > If anyone has some thoughts on this, I'd love to hear them. It'd be really > interesting to have such a public weights model where you could run it > (cheaply) via ollama or even cpu (I think)? > > Dawid >
