{"adoption": {"forks": 92, "observed_at": "2026-08-28T04:06:07.062911+00:00", "stars": 2029}, "canonical_url": "https://ross.abutalabs.com/products/lm-format-enforcer", "card": {"archived": false, "artifact_type": "library", "description": "Enforce the output format (JSON Schema, Regex etc) of a language model", "domain": ["large-language-models", "machine-learning", "developer-tools"], "enriched": true, "function": ["llm-inference", "parser", "prompt-engineering", "serialization"], "health_score": 79, "homepage": null, "language": "Python", "license": "MIT", "license_family": "permissive", "maturity": "active", "member_repos": ["noamgat/lm-format-enforcer"], "name": "noamgat/lm-format-enforcer", "platform": ["python"], "pushed_at": "2026-04-04T14:57:50+00:00", "repo": "noamgat/lm-format-enforcer", "stars": 2029, "tags": ["structured-output", "-schema", "constrained-decoding", "regex-enforcement", "token-filtering", "langchain-integration", "transformers", "natural-language-processing"], "topics": [], "urls": [], "use_cases": ["force an LLM to output valid JSON matching a schema", "make a language model follow a regex output pattern", "get structured data extraction from LLM responses", "prevent malformed JSON from a chat model", "constrain model output to a pydantic model schema", "guarantee parseable LLM output for downstream pipelines"], "what_it_is": "A Python library that enforces output formats like JSON Schema or regex on language models by filtering allowed tokens at each generation step. It integrates with transformers, LangChain, llama.cpp, vLLM, and other inference stacks.", "when_to_avoid": ["you need function-calling or structured output built into a hosted API like OpenAI's", "your model server already provides native grammar-constrained sampling", "you work outside the Python ecosystem"], "when_to_choose": ["you need guaranteed schema-valid or regex-valid LLM output", "you use Hugging Face transformers, vLLM, llama.cpp, or LangChain and want constrained decoding", "prompt engineering alone isn't reliable enough for structured output"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/lm-format-enforcer", "repo": "noamgat/lm-format-enforcer", "role": "main", "score": 64}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:06:07.062911+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T02:59:38.272142+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "c862ee8ec38a235148f84c7a22a41f4d9682d126c9b8861a3629edadd7aaa8ca", "fetched_at": "2026-08-28T04:06:07.062911+00:00", "kind": "readme", "missing": false, "url": "https://github.com/noamgat/lm-format-enforcer"}, {"content_hash": "77fca9570abaefdba1b2f5515824b11ca84968c312753c49f43dcdc4837200e7", "fetched_at": "2026-08-29T10:39:42.352938+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/lm-format-enforcer/json"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 75, "longevity": 76, "rhythm": 42}, "computed_at": "2026-09-02T17:46:02.011165+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 1077, "days_push": 151, "days_rel": 389, "gap_med": 11, "n_releases_24m": 8}, "score": 64, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}