# guidance

> A guidance language for controlling large language models.

- **URL**: https://www.freshcrate.ai/projects/guidance
- **Author**: guidance-ai
- **Category**: Uncategorized
- **Latest version**: `0.3.2` (2026-03-18)
- **License**: MIT
- **Source**: https://github.com/guidance-ai/guidance
- **Language**: Jupyter Notebook
- **GitHub**: 21,397 stars, 1,156 forks
- **Registry**: github
- **Tags**: `jupyter notebook`

## Description

A guidance language for controlling large language models.

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `0.3.2` | 2026-03-18 | Medium | More docs, fixes, performance improvements.  ## Added - Offline grammar debugging guide in README (thanks @biefan!) (#1462) ## Fixed - Workaround for OnnxRT-GenAI runtime failing to load a model (#1419) - Correct handling of notebook normalization for stderr and stdout (#1423) ## Changed - Updated llguidance to 1.6.1 -- support for URI format for JSON strings; perf improvements (#1429) |
| `0.3.1` | 2026-02-03 | Low | Introduces monitor guided inference and onnxruntime-genai support. Numerous fixes.   ## Added  Support for Python 3.14 (#1385) - Ability to add inference-time semantic verification via monitor guided inference (#1391) by @naga86 - Added onnxruntime-genai backend (#1366)    ## Removed  - Dropped 3.9 support  ## Fixed  - Remove code dealing with deprecated transformers.HybridCache (#1408) - Ensure setup.py has consistent transformers and llama-cpp-python versions (#1405) - Use chat |
| `0.3.0` | 2025-09-09 | Low | # Guidance 0.3.0  More model providers, better LARK exposure, re-done custom tools.   ## Breaking Changes - Removed old-style @guidance-based tool calls (in favor of more generic OpenAI-style tools) - Temp removal of calling support for local models (PR planned to restore support in-line with new tools)  ## Added - Added support for groq and mistralai APIs via litellm - Added experimental sglang model - Added experimental chat_completion() and chat_completion_streaming() APIs to the e |
| `0.2.5` | 2025-07-30 | Low | # Guidance 0.2.5  Special tokens can be user-defined. Numerous grammar fixes. Candidate tokens rendered for all token types.  ## Added - Widget has dark mode (mainly for exporting). - `special_token` function added for adding in `<think>` and similar.  ## Changed - `top_k` exposed when `echo=True` for all token types (including fast-forward, inputs). - Use greedy samplng if temp is smaller than `1e-5`.  ## Fixed - Normalized capture names not preserved, fixed. - Logit array fix int |
| `0.2.4` | 2025-07-08 | Low | # Guidance 0.2.4  Better sampling, better metrics, `llama-cpp-python` fixes (update to latest please!), uncountable visualization fixes.  ## Added - Allow changing `sampling_params` (`top_p`/`top_k`, `min_p`, `repetition_penalty`) on the fly `Model.with_sampling_params(...)` - Add `top_k` tokens back into vis after temporary removal in previous refactor  ## Removed - `Model.token_count` removed in favor of (currently private) `Model._get_usage().output_tokens`  ## Changed - Bookkee |
| `0.2.3` | 2025-06-23 | Low | # Guidance 0.2.3  We have a performance hotfix, and then we snuck in some extras.  ## Added - Added Llama3.2 chat template  ## Removed - Deleted some dead code, in particular sample_with_temperature from Engine classes  ## Changed - Switched top-k (for widget) implementation to use a priority-queue instead of a full sort, saving a few milliseconds per token when widget/vis is turned on  ## Fixed - Fix performance regression introduced in issue #1261: full logits history no longer c |
| `0.2.2` | 2025-06-19 | Low | # Guidance 0.2.2  **Better support for OpenAI, we fixed some bugs too (we tried to at least)!**  *Included are 0.2.1 changes as we didn't record it previously.*  ## Added - Token probabilities and backtracking support in the Jupyter widget. - Support for offline notebook rendering. - Higher-level AST for representing various input/output types for models (including JSON outputs, image inputs, special tokens, selects, joins, strings, etc.)  - `Interpreter` abstraction layer between `Mod |
| `0.2.0` | 2025-01-07 | Low | ## What's Changed  Happy new year! This release contains a significant overhaul of many elements of guidance, including:  - **Visualization Overhaul**: Guidance's in-line visualizations have been rewritten from scratch. TL;DR: We added a lot of code to support better model metrics and visualization. Check it out:  ![Screenshare of updated UI in Jupyter notebook](https://github.com/user-attachments/assets/d65bafd4-5c9e-41c2-b5a2-4043e7cbfaae)  - **Significantly Faster, Rust-based Grammar |
| `0.2.0rc1` | 2024-08-20 | Low | ## What's Changed * Replace Python-based EarleyParser with lexeme-based rust implementation by @hudson-ai & @mmoskal in https://github.com/guidance-ai/guidance/pull/951  This pre-release version of guidance uses a new Rust-based Earley lexer + parser that offers significant speedups and bugfixes to guidance grammar parsing. See PR https://github.com/guidance-ai/guidance/pull/951 for full details of the optimizations. Expect some changes from current Guidance (v0.1.16) behavior during pre-rele |
| `0.1.16` | 2024-08-19 | Low | ## What's Changed * Allow generating arbitrary (schemaless) JSON by @hudson-ai in https://github.com/guidance-ai/guidance/pull/892 * [Bug] Fix Llama3ChatTemplate by @jjkjkj in https://github.com/guidance-ai/guidance/pull/884 * Use python's `re` module instead of `pyformlang` to build regex ASTs  by @hudson-ai in https://github.com/guidance-ai/guidance/pull/854 * [Feature] Add Support for Phi-3-small by @ambisinister in https://github.com/guidance-ai/guidance/pull/935 * [Feature] Constant el |

## Citation

- HTML: https://www.freshcrate.ai/projects/guidance
- Markdown: https://www.freshcrate.ai/projects/guidance.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/guidance/deps

_Generated by freshcrate.ai. Indexes github releases for AI-agent ecosystem packages._
