4 ms·
Weird, I feel Gemma2 is overall better even if it doesn't follow instructions a bit more often than llama3. Luckily filtering out preambles like "Sure, let me
by marcyb5st 2y ago
Weird, I feel Gemma2 is overall better even if it doesn't follow instructions a bit more often than llama3.
Luckily filtering out preambles like "Sure, let me help you with that" from primarily JSON/YAML answers is easy enough IMHO.
- Filligree 2y agoYou can use a grammar to enforce the output being valid JSON.
- luke-stanley 2y agoDo you know any tools that enforce grammar or structure, that allow the use of general instructions (e.g., use 5 positive English words)? I believe I saw such a tool mentioned by Abetlen, although it wasn't their tool, but I can't seem to find it now. I've already checked LMQL, SGLang, Guidance, and Outlines. Thanks.
- luke-stanley 2y agoAnswering my own question: Another project called Instructor has a `llm_validator` method that fits in with it's Pydantic oriented constrained typed generation. https://python.useinstructor.com/api/#instructor.dsl.validators.llm_validator https://python.useinstructor.com/api/#instructor.dsl.validat...