Constraining LLMs with Guidance AI

Опубликовано: 28 Июль 2026
на канале: Learn Data with Mark
4,293
146

In this video, we'll learn how to use the Guidance library to control and constrain text generation by large language models, specifically integrating it with the llama CPP library and the Mistral 7B model.

We'll build an emotion detector with help from functions like select which restricts generation to an array of values and gen, which can be controlled by regular expressions.

We'll also learn how to create reusable components and output results in JSON format.

#LLMS #Mistral7B #Guidance

Resources
Notebook - https://github.com/mneedham/LearnData...
Mistral 7B - https://huggingface.co/TheBloke/Mistr...
Guidance - https://github.com/guidance-ai/guidance