lmql icon indicating copy to clipboard operation
lmql copied to clipboard

Query Request Builder

Open Christof23 opened this issue 1 year ago • 2 comments

Hi, this looks like a great utility for creating structured responses from LLMs! I do have one suggestion however in terms of using the builder pattern for constructing queries programmatically instead of via free-text style docstrings. This would help improve the overall API of the interface and user experience.

Christof23 avatar Dec 04 '23 10:12 Christof23

Thanks for suggesting this, it it is definitely a good idea. I will keep this issue to track progress/work on this.

lbeurerkellner avatar Dec 10 '23 14:12 lbeurerkellner

Marking this as a good first issue.

A query request builder would just construct an LMQL string, that is then passed to the LMQL compiler to produce a callable LMQL query function (the compiler lives here https://github.com/eth-sri/lmql/blob/main/src/lmql/language/compiler.py#L428).

As an implementation exercise, this requires some understanding of the full LMQL syntax (see https://lmql.ai/docs/language/reference.html).

lbeurerkellner avatar Feb 27 '24 14:02 lbeurerkellner