Skip to content
ai-supply.store
DiscoverCategoriesLeaderboardsCommunityAgent APIFAQ
Sign inSign up free
catalog / Orchestration / Guidance
⌬WorkflowOrchestrationFree

Guidance

A programming paradigm for steering LLMs — interleave generation, prompting, and control flow with constrained decoding and structured output.

@ai-supply
Installs172
⟳ upstream 0.3.2 · updated 3mo ago
↗ Source repository
← More OrchestrationOrchestration leaderboard →How we grade security →Source ↗

Guidance

Guidance is a programming paradigm for controlling large language models more precisely than plain prompting. Instead of sending a single string and hoping for well-formed output, you interleave text, generation, selection, loops, and conditionals directly in Python, so the model follows a structured flow — effectively a state machine over generation. This yields reliable structured output, fewer tokens, and lower latency.

Key features

  • Constrained generation with regex, context-free grammars, and JSON schemas
  • Interleave control flow (loops, conditionals, functions) with model calls
  • Token healing to avoid tokenization artifacts at prompt boundaries
  • Reusable, composable functions for building complex prompting programs
  • Works across backends including local Transformers, llama.cpp, and hosted APIs

Originally from Microsoft and now maintained under the guidance-ai organization, Guidance is widely used to force valid, machine-parseable outputs (for example, JSON that always conforms to a schema) and to orchestrate multi-step generation deterministically. Because constraints are enforced during decoding, invalid tokens are never sampled, which improves both reliability and speed compared with post-hoc validation and retries.

Curated mirror of the open-source Guidance (MIT). Get it from the source.

Rating rank
#1
of 14 in Orchestration
Install rank
#14
of 14 in Orchestration
Security score
58/100 · D
review
Security rank
#4
of 14 in Orchestration
Installs
172
cat avg 143k
This listing vs category average
Installs
this
cat avg
Security (of 100)
this
cat avg
Adoption trend
See the Orchestration leaderboard →
! Security: Review · 5858/100 · grade Dscanned 1h ago

Only compromise signals — malicious or tampered code (leaked secrets, backdoors, path traversal, a dropped executable) — reduce the score. Dangerous-by-capability traits (shell, network, injection strings, pickle) are shown as risk surface: expected for some capabilities — a security tool ships offensive code on purpose — so they do not sink the grade.

Compromise signals
Trojan-source (bidi) charactershighguidance-ai-guidance-21b1d90/guidance/resources/graphpaper-inline.html
Unicode bidirectional overrides can hide code from reviewers
What this capability can do · high confidence (static)
Tools (8)
CPUGPURAMVRAMTimeLatencyUsedReduced
⚑ filesystem⚑ shell⚑ network⚑ secrets
egress → stackoverflow.com, docs.scipy.org, huggingface.co, my_azureai_instance.openai.azure.com, api.together.xyz, docs.vllm.ai, docs.python.org, unpkg.com +16
Risk surface (23)
External endpoints declaredlowexpected for this capabilityguidance-ai-guidance-21b1d90/.github/workflows/call_cpu_tests.yml
2 distinct host(s)
External endpoints declaredlowexpected for this capabilityguidance-ai-guidance-21b1d90/.github/workflows/call_gpu_tests.yml
1 distinct host(s)
External endpoints declaredlowexpected for this capabilityguidance-ai-guidance-21b1d90/CONTRIBUTING.md
3 distinct host(s)
Path traversal sequencesmediumexpected for this capabilityguidance-ai-guidance-21b1d90/client/graphpaper-inline/build-to-guidance.sh
'../' present in content or name
Broad capability surfacelowguidance-ai-guidance-21b1d90/client/graphpaper-inline/package-lock.json
3 high-impact capability categories referenced — verify least-privilege
External endpoints declaredlowexpected for this capabilityguidance-ai-guidance-21b1d90/client/graphpaper-inline/package-lock.json
8 distinct host(s)
Potentially unbounded loopmediumguidance-ai-guidance-21b1d90/guidance/_parser.py
an infinite loop (while True / while(1) / for(;;)) may cause runaway consumption
Broad capability surfacelowguidance-ai-guidance-21b1d90/guidance/_utils.py
4 high-impact capability categories referenced — verify least-privilege
Possible obfuscationmediumguidance-ai-guidance-21b1d90/guidance/chat.py
very long lines
Suspicious network referenceslowguidance-ai-guidance-21b1d90/guidance/models/broken_models/_togetherai.py
suspicious TLD (1 URLs)
Suspicious code patternsmediumexpected for this capabilityguidance-ai-guidance-21b1d90/guidance/resources/graphpaper-inline.html
dynamic code execution
Zero-width characterslowguidance-ai-guidance-21b1d90/guidance/resources/graphpaper-inline.html
8 hidden characters
External endpoints declaredlowexpected for this capabilityguidance-ai-guidance-21b1d90/guidance/resources/graphpaper-inline.html
9 distinct host(s)
External endpoints declaredmediumexpected for this capabilityguidance-ai-guidance-21b1d90/notebooks/art_of_prompt_design/prompt_boundaries_and_token_healing.ipynb
20 distinct host(s)
External endpoints declaredlowexpected for this capabilityguidance-ai-guidance-21b1d90/notebooks/chatgpt_vs_open_source_on_harder_tasks.ipynb
6 distinct host(s)
External endpoints declaredlowexpected for this capabilityguidance-ai-guidance-21b1d90/notebooks/testing_lms.ipynb
5 distinct host(s)
External endpoints declaredlowexpected for this capabilityguidance-ai-guidance-21b1d90/notebooks/tutorials/token_healing.ipynb
10 distinct host(s)
Suspicious code patternsmediumexpected for this capabilityguidance-ai-guidance-21b1d90/tests/conftest.py
OS command execution
Suspicious network referencesmediumguidance-ai-guidance-21b1d90/tests/unit/library/json/test_string_format.py
raw IP URL (39 URLs)
Internal host / private infrastructure referencemediumguidance-ai-guidance-21b1d90/tests/unit/library/json/test_string_format.py
shipped content references a private IP range or internal-only host
External endpoints declaredmediumexpected for this capabilityguidance-ai-guidance-21b1d90/tests/unit/library/json/test_string_format.py
11 distinct host(s)
Suspicious network referencesmediumguidance-ai-guidance-21b1d90/tests/unit/test_uri_validation.py
raw IP URL (14 URLs)
Egress to a private/loopback hosthighexpected for this capabilityguidance-ai-guidance-21b1d90/tests/unit/test_uri_validation.py
127.0.0.1
✔ verified source · pinned guidance-ai-guidance-21b1d90 · changed since last scan · +egress stackoverflow.com, docs.scipy.org, huggingface.co, my_azureai_instance.openai.azure.com, api.together.xyz, docs.vllm.ai, docs.python.org, unpkg.com, cognitiveservices.azure.com, picsum.photos, foo.bar, foo.com, xn--nw2a.xn--j6w193g, -.~_!$&\, 223.255.255.254, www.ietf.org, \\u0192\\u00f8\\u00f8.\\u00df\\u00e5r, \\u0192\\u00f8\\u00f8.com, docs.pydantic.dev, internal.example.com, metadata.internal, internal.corp, nonexistent.invalid, tricky.example.com
OWASP AI control mapping
7passed
8flagged
0runtime-enforced
5governance

Evaluated against the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any control to see the findings.

OWASP Top 10 for LLM Applications
⚠LLM01Prompt Injectionhigh
Adversarial instructions embedded in an artifact that hijack a downstream LLM.
•Trojan-source (bidi) characters — Unicode bidirectional overrides can hide code from reviewers (CWE-1007)
•Zero-width characters — 8 hidden characters
✓LLM02Sensitive Information DisclosurePassed
⚠LLM03Supply Chainlow
Vulnerable/compromised dependencies, models or archives in the artifact.
•Dependency manifest — 31 npm dependencies declared
✓LLM04Data and Model PoisoningPassed
Backdoors/poisoning in training data or serialized models.
Behavioral poisoning needs model execution; static check covers unsafe serialization + dataset skew only.
⚠LLM05Improper Output Handlingmedium
Code that pipes model/user output into shell, eval, SQL or paths unsafely.
•Path traversal sequences — '../' present in content or name (CWE-22)
•Suspicious code patterns — dynamic code execution (CWE-95)
•Suspicious code patterns — OS command execution (CWE-78)
⚠LLM06Excessive Agencyhigh
Over-broad tool/permission surface or unrestricted egress.
•External endpoints declared — 2 distinct host(s)
•External endpoints declared — 1 distinct host(s)
•External endpoints declared — 3 distinct host(s)
•Broad capability surface — 3 high-impact capability categories referenced — verify least-privilege (CWE-272)
•External endpoints declared — 8 distinct host(s)
•Broad capability surface — 4 high-impact capability categories referenced — verify least-privilege (CWE-272)
•External endpoints declared — 9 distinct host(s)
•External endpoints declared — 20 distinct host(s)
•External endpoints declared — 6 distinct host(s)
•External endpoints declared — 5 distinct host(s)
•External endpoints declared — 10 distinct host(s)
•External endpoints declared — 11 distinct host(s)
•Egress to a private/loopback host — 127.0.0.1 (CWE-918)
⚠LLM07System Prompt Leakagemedium
Secrets, internal hosts or proprietary logic exposed in shipped prompts.
•Internal host / private infrastructure reference — shipped content references a private IP range or internal-only host (CWE-200)
✓LLM08Vector and Embedding WeaknessesPassed
PII or plaintext source leakage in embedding/vector exports.
Embedding inversion/poisoning is largely runtime; static check covers PII in vector exports.
§LLM09MisinformationGovernance
Artifacts designed to produce false/deceptive output.
Detectable only by runtime behavioral evaluation; addressed via responsible-use attestation.
⚠LLM10Unbounded Consumptionmedium
Unbounded loops/recursion causing DoS or runaway cost.
Enforced at runtime by the gateway (rate limits + spend caps + size caps); static check flags unbounded loops.
•Potentially unbounded loop — an infinite loop (while True / while(1) / for(;;)) may cause runaway consumption (CWE-835)
OWASP Machine Learning Security Top 10
§ML01Input Manipulation (Adversarial)Governance
Models vulnerable to adversarial perturbations.
Requires runtime robustness evaluation; addressed via publisher robustness attestation.
✓ML02Data PoisoningPassed
Poisoned training datasets with triggers or anomalous distributions.
Static check covers trigger phrasing, PII and label skew; full poisoning detection is runtime.
§ML03Model InversionGovernance
Training data reconstructable from a model's outputs.
Runtime/evaluation property; addressed via model-card data-provenance + DP attestation.
§ML04Membership InferenceGovernance
Determining whether a record was in the training set.
Runtime/evaluation property; addressed via overfitting disclosure + DP attestation.
✓ML05Model TheftPassed
Unlicensed re-distribution / license-incompatible derivatives.
Static check verifies license declaration; extraction throttling is runtime.
⚠ML06AI Supply Chainlow
Compromised PyPI/npm packages, typosquats, unsafe serialized models.
•Dependency manifest — 31 npm dependencies declared
✓ML07Transfer Learning AttackPassed
Backdoored base models / LoRA adapters propagating to derivatives.
Backdoor detection needs behavioral probing; static check covers unsafe serialization + provenance.
§ML08Model SkewingGovernance
Models trained on skewed data producing biased output.
Requires fairness evaluation; addressed via model-card bias/limitations disclosure.
⚠ML09Output Integritymedium
Middleware tampering with model outputs in transit.
Gateway enforces TLS + response integrity; static check flags output-rewriting code.
•Path traversal sequences — '../' present in content or name (CWE-22)
•Suspicious code patterns — dynamic code execution (CWE-95)
•Suspicious code patterns — OS command execution (CWE-78)
✓ML10Model Poisoning (Weights)Passed
Tampered model weight files; integrity must be verifiable.
Static check enforces safe formats + records a content hash for downstream verification.

Consume Guidance programmatically. Authenticate with an API key or session — see Authorize an agent.

# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/guidance-llm-control

# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/guidance-llm-control/check \
  -H "Content-Type: application/json" \
  -d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'

# CLI
npx ai-supply add guidance-llm-control

# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/guidance-llm-control/install \
  -H "Authorization: Bearer $AIM_KEY"

# MCP tool
install_listing({ "slug": "guidance-llm-control" })
OpenAPI spec →
vlatest
! Security: Review · 582d ago

Curated mirror — latest upstream source. See the repository for tagged releases.

Sign in and install this listing to leave a review.

More from @ai-supply

View profile →
◉Agent
MetaGPT
Multi-agent framework that assigns GPT roles (PM, engineer, QA) to solve complex software tasks end-to-end.
↓ 1.0M
◐Model
llama.cpp
Pure C/C++ LLM inference library — run quantized models on CPU, Metal, CUDA and more.
↓ 1.0M★ 4.5
⇄Connector
vLLM
High-throughput, memory-efficient LLM inference engine with PagedAttention and continuous batching.
↓ 892k
⇄Connector
Meilisearch
Lightning-fast open-source search engine with typo-tolerance, semantic hybrid search, and sub-50ms response times.
↓ 811k
ai-supply.store

Free, security-vetted AI capabilities — skills, MCPs, plugins, agents, datasets and more, each graded and freshness-tracked, and built for humans and agents alike.

api · v3.1status · all green
Contact
support@ai-supply.storesecurity@ai-supply.store
Catalog
  • Discover
  • Categories
  • Leaderboards
  • Benchmarks
  • Security
Community
  • Community
  • FAQ
For agents
  • Quickstart (60s)
  • Authorize an agent
  • Agent API
  • OpenAPI spec
For builders
  • Publish
  • Dashboard
Account
  • Create account
  • Sign in
  • Settings
Legal
  • Terms
  • Publisher Agreement
  • Acceptable Use
  • Privacy