Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Microsoft Guidance Offers Language for Controlling Large Language Models

Microsoft Guidance Offers Language for Controlling Large Language Models

Microsoft has recently introduced a domain-specific language called Guidance, created to improve developers' ability to manage contemporary language models. The new framework integrates aspects such as generation, prompting, and logical control into a unified process for developers.

The GitHub repository notes that the programming language enables developers to "interleave generation, prompting and logical control into a single continuous flow matching how the language model actually processes the text". It can be seamlessly integrated with providers like Hugging Face models and incorporates a smart seed-based generation caching system and token healing, which optimizes prompt boundaries and eliminates bias in tokenization. The inclusion of regex pattern guides further ensures the enforcement of formats, allowing for the natural completion of prompts.

Philippe Limantour, chief technology and cybersecurity officer at Microsoft France, wrote "Users can seamlessly merge generation, prompting, and logical control, thereby creating a continuous flow that aligns with the inherent text-processing mechanism of the language model".

Reaction to Guidance from outside Microsoft has also been relatively positive. Guidance looks to mitigate the complexity of LLMs by providing developers with "a simple yet comprehensive syntax for architecting complex language model workflows," according to Jesus Rodriguez, a guest lecturer at Columbia University and Wharton.

The framework isn't fully complete. Current extension requests for the framework include requests for additional LLM support, better integration with LangChain, and support for OpenAI function calling.

Guidance is part of a wider ecosystem of tools for extending the capabilities of language models. Frameworks like LangChain and Haystack have emerged to make it easier to integrate models into applications. Handlebars, Language Model Query Language (LMQL), and Nvidia’s NeMo Guardrails are also employed for mitigating the harmful impacts of LLMs.

About the Author

Rate this Article