Favicon of Guidance

Guidance

Efficiently steer language models with structured output and reduced latency using Guidance.

Screenshot of Guidance website

Guidance is an efficient programming paradigm for steering language models. With Guidance, you can control how output is structured and get high-quality output for your use case—while reducing latency and cost compared to conventional prompting or fine-tuning. It allows users to constrain generation (e.g., with regex and CFGs) and interleave control (conditionals, loops, tool use) and generation seamlessly.

Features include:

  • Pythonic Interface: Work with large language models using common Python idioms.
  • Constrained Generation: Ensure output syntax with regex and context-free grammar.
  • Custom Functions: Create your own Guidance functions using decorators.
  • JSON Generation: Use JSON schema to constrain LLMs effectively.

Guidance supports various backends like Transformers, llama.cpp, and OpenAI. Install it via PyPI and start controlling your language models with precision.

Categories:

Share:

Ad
Favicon

 

  
 

Similar to Guidance

Favicon

 

  
  
Favicon

 

  
  
Favicon