jennifer-lang

What Is Jennifer Lang?

Jennifer Lang is a structured programming language that improves language model determinism.

How it works

Jennifer Lang achieves increased determinism by creating a constrained programming language which is compiled and executed in a native virtual machine. All executed requests force language models to follow instructions. This approach improves determinism because it reduces the possibility of a model providing a response body that does not match the rules and styles set forth during execution. In the event of hallucination or rule breaking, an execution error is thrown by the Jennifer Lang virtual machine, similar to how modern programming languages like Python and JavaScript do. Since all requests are executed in the Jennifer Lang virtual machine and produce errors when results do not match expected rules and styles, responses are much more reliable.

Provider agnosticism

Jennifer Lang is language model agnostic and is designed to work with all model and inference providers. A user can choose an open-source model available via an Ollama endpoint, an OpenAI-compatible API key they subscribe to, or choose from any of the main frontier platforms such as Anthropic, Grok, OpenAI, Google, and others. Jennifer Lang achieves provider agnosticism by querying a given model and running its request through its virtual machine against a constraint tree, with errors building to an array object which is eventually returned as an execution error object, and with successful responses following the same JSON format so that both outcomes are structurally uniform and machine-readable by any downstream system.

Compilation

The action of compiling is described by the process where a request is first written in Jennifer Lang, sent to a model provider for inference, and executed in the Jennifer Lang virtual machine which checks for errors. If no error is produced, the model’s inference is provided to the requester via normal JSON response format. If the response errors, the error is returned to the requester via the same JSON response format. Errors produced at the time of execution are called execution errors, and they carry the rejected response body so that the caller can inspect what the model returned alongside the constraint that failed.

Natural language design

Jennifer Lang is a natural programming language, which means it is not statically typed and detects natural language patterns, and a developer need only describe their request and the Jennifer Lang compiler will be able to detect it, with the exception being in the case of certain appended keywords such as for specific tool calls or builtins. Jennifer Lang is designed for everyone, which means a developer need not have any technical experience in order to use it. The goal of Jennifer Lang is to improve language model quality by enforcing clearly defined and repeatable constraints without verbose pre-prompts or other system-level modifications, and in practice this means the provider receives only the body of request and any fetched style content, with all rule enforcement, deslop repair, and hallucination checking handled entirely within the virtual machine and not delegated to the model.