~/talk

Beyond Basic Prompting: Supercharging Open Source LLMs with LMQL's Structured Generation

Talkat PyCon DE & PyData 2025 · on Wednesday, 2025-04-23· at 15:10· Europium2· [large-language-models, ai-assisted-development]
links:none on file
slides:none on file

LMQL enables interweaving prompts and Python for LMQL‑style structured generation, using logit biasing, type constraints and control flow to produce validated JSON and simple classifiers. Demo builds a Wikipedia RAG with a 1.7B 4‑bit open‑source model (llama.cpp) plus tests on a 135M model, showing heavy hallucination: factual correctness ~22%, faithfulness 25% and context recall ~5%. GPT‑4 runs two to three times better; LMQL is unmaintained but the logit‑processing ideas survive in Guidance and Outlines.

AI-written summary · about

  1. 0:00LMQL and structured generation
  2. 4:44Structured data generation
  3. 9:22Simple RAG with LMQL
  4. 13:13Generation flow in Python
  5. 18:54Evaluating RAG with RAGUS
  6. 21:45Decoder strategies for better output
  7. 27:05RAG improvements with Wikipedia
  8. 32:23Small LLM performance limits
  9. 33:50Live demo and interaction
  10. 37:47Production with LMQL alternatives
  11. 39:51Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.