How the grammar of the constructed language Lojban works, which parts of it are unambiguous and which are not, and why large language models still handle it poorly despite its formal design, mainly because of very limited training data and tokenisation problems.
🤖 Written by Wren, the chat's AI, building on Wikipedia and on questions people asked in the chat. AI writing can be wrong or out of date: check anything that matters with a reliable source.
| Language | Lojban, a constructed "logical" language |
|---|---|
| Developed by | The Logical Language Group, founded 1987 |
| Predecessor | Loglan, created by James Cooke Brown from 1955 |
| Reference grammar | The Complete Lojban Language by John Woldemar Cowan (1997) |
| Root words | About 1,350 gismu (root predicates) |
| Grammar type | Formally specified; syntax parses only one way (originally a YACC grammar, later also PEG parsers) |
| What stays open | Tense, number, many arguments and much word meaning are optional or vague |
| Main limit for language models | A very small and inconsistent body of training text |
| Secondary limit | Tokenisers built for natural languages split Lojban words badly |
Lojban is a constructed language whose grammar is designed to be syntactically unambiguous: every grammatical Lojban sentence can be parsed in exactly one way. Because of this, people sometimes suggest that Lojban should be especially easy for computers, and in particular for large language models (LLMs), the statistical text-generating systems behind modern AI chatbots. In practice, LLMs produce Lojban that often looks plausible but contains frequent errors. Their Lojban is much weaker than their English, Spanish or even Esperanto.
The gap has several explanations. Lojban's unambiguous syntax does not make its meaning unambiguous. Tense, number and many arguments of a sentence can be left out, so a short sentence can still be vague. LLMs learn languages from large amounts of example text, not from formal rules, and the amount of Lojban text in existence is very small. The tokenisers that split text into units for LLMs are built for natural languages and break Lojban words into awkward pieces. Finally, resolving ambiguity from context is something LLMs already do well, so removing syntactic ambiguity removes a problem the models did not have.
This article describes the relevant features of Lojban grammar, how LLMs acquire languages, the state of Lojban training data, the kinds of errors models make, and the arguments about whether formal languages could still offer advantages for AI systems.
Background: Lojban and its design goals
Origins in Loglan
Lojban grew out of Loglan, a language created by the American sociologist James Cooke Brown, who began the project in 1955. Brown described Loglan publicly in a 1960 article in Scientific American. His original aim was to build a language that could be used to test the Sapir–Whorf hypothesis, the idea that the structure of a language influences the way its speakers think. A language based on formal logic seemed a useful test case.
Disagreements about intellectual property and control of Loglan led a group of enthusiasts to start an independent version. In 1987 Bob LeChevalier and others founded the Logical Language Group (LLG), which developed Lojban. The new language kept Loglan's basic design ideas but rebuilt the vocabulary from scratch.
The reference grammar
The main description of the language is The Complete Lojban Language by John Woldemar Cowan, published by the LLG in 1997. It is often abbreviated CLL. The grammar it describes was declared a "baseline", meaning it was intended to remain stable. Later community decisions, discussed below, have changed parts of it. This means that Lojban as actually written is not perfectly uniform.
Design features
Lojban's main design goals include:
- Unambiguous morphology: a stream of Lojban sounds or letters can be split into words in only one way.
- Unambiguous syntax: the grammar is defined by a formal grammar that a computer program (a parser) can apply mechanically, and each grammatical sentence has one parse.
- Audio-visual isomorphism: spelling and pronunciation correspond one-to-one. For example, the apostrophe stands for a sound similar to English "h", and a full stop marks a short pause.
- Predicate logic as a basis: sentences are built around predicates with numbered argument places, similar to the notation of formal logic.
- Cultural neutrality: the root vocabulary was generated by an algorithm from words in six widely spoken languages: Mandarin Chinese, English, Hindi, Spanish, Russian and Arabic.
How Lojban grammar works
Word classes
Lojban has a small number of word classes, each recognisable by its shape:
- gismu: root words, all five letters long, with the consonant–vowel shape CVCCV or CCVCV. Examples are
klama("go"),zarci("market"),cenba("vary") andvlaste, which is a newer root meaning "dictionary". There are about 1,350 gismu in the core list. - cmavo: short structure words that do grammatical work, such as
mi("I, me"),lo(an article),pu(past tense marker) andzo'e("something unspecified"). - lujvo: compound words built from shortened forms of gismu, called rafsi.
- fu'ivla: words borrowed from other languages and adapted to Lojban word shapes.
- cmevla: names, which always end in a consonant and are marked off by pauses.
Predicates and argument places
The core of a Lojban sentence is the selbri, a predicate. Each predicate word has a fixed place structure, a numbered list of the roles it takes. The arguments that fill those places are called sumti. For example, the place structure of klama is:
x1 comes or goes to destination x2 from origin x3 via route x4 using means or vehicle x5.
The sentence mi klama lo zarci means "I go to a market": mi fills place x1 and lo zarci fills place x2. The other three places are left empty. Knowing the correct place structure of each word is essential to writing correct Lojban. It is also one of the things LLMs most often get wrong.
Terminators and the formal grammar
To keep parsing unambiguous, Lojban uses special words called terminators that mark the end of a grammatical structure, such as ku (ending an argument) or vau (ending a sentence's argument list). Most terminators can be omitted when the parse is clear without them. The small word cu separates the arguments before a predicate from the predicate itself.
The original official grammar was written for YACC, a standard tool for generating parsers, and it needed a preprocessing step to handle certain special words before parsing. Later community members, notably Robin Lee Powell, developed parsers based on Parsing Expression Grammars (PEG), known collectively as camxes. Online parsers of this kind allow anyone to check whether a Lojban text is grammatical and to see its structure.
What is unambiguous and what is not
The claim that "Lojban is unambiguous" is often misunderstood. It applies to syntax and word boundaries, not to meaning. The grammar tells a reader exactly how the words of a sentence group together. It does not tell the reader exactly what the speaker meant.
Optional arguments
Any argument place of a predicate can be left unfilled. An empty place is treated as if it contained zo'e, which means roughly "something or other, which is obvious or unimportant". The two-word sentence mi klama is fully grammatical. It says that I go, but not where, from where, by which route or by what means.
Optional tense
Lojban has a rich system of tense markers, including pu (past), ca (present) and ba (future). None of them is required. Without one, mi klama can mean "I go", "I went", "I will go", or "I habitually go", depending on context.
Optional number
Lojban nouns do not have grammatical singular and plural forms. lo zarci can refer to one market or to several. Number can be stated explicitly with numbers and quantifiers, but it does not have to be.
Articles and reference
Lojban has several articles (descriptors), and their meanings have been debated. In the CLL baseline, le refers to something the speaker has in mind and describes in a certain way, while lo refers to things that really fit the description. A community reform adopted in the early 2000s, known as xorlo, redefined lo as a general-purpose, generic article. Texts written before and after this reform use the articles differently.
Pronoun reference also depends on context. Lojban has assignable pronouns such as ko'a, and words that refer back to earlier arguments. Working out what they point to is a matter of reference resolution, as in any language.
Tanru: syntactically clear, semantically vague
Lojban predicates can be combined into tanru, metaphorical compounds in which the first word modifies the second. The grouping of a tanru is always clear: by default, words group from the left, and the words bo and ke ... ke'e can change the grouping. A classic English example, "pretty little girls' school", is ambiguous in English because it can be grouped in several ways. In Lojban, melbi cmalu nixli ckule has only one grouping.
However, the relationship between the parts of a tanru is not specified. nixli ckule ("girl school") could mean a school for girls, a school run by girls, or a school that is somehow girl-like. The listener has to infer the intended meaning, just as with English noun compounds.
Summary table
| Feature | Fixed by Lojban grammar? | Notes |
|---|---|---|
| Word boundaries | Yes | Word shapes and pauses determine how text splits into words. |
| Sentence structure (parse) | Yes | Each grammatical sentence has one parse tree. |
| Grouping in compounds | Yes | Left grouping by default; can be changed explicitly. |
| Tense | No | Optional; often omitted. |
| Number | No | Optional; expressed with numbers or quantifiers when needed. |
| Which argument places are filled | No | Any place can be left as zo'e. |
| Meaning of compounds (tanru) | No | Relationship between parts must be inferred. |
| Reference of pronouns and descriptions | No | Depends on context and shared knowledge. |
| Speaker intent, world knowledge | No | Outside the scope of any grammar. |
How large language models learn languages
Learning from data, not rules
A large language model is a neural network trained to predict the next piece of text given the text before it. During training it is exposed to very large amounts of text, often drawn from the web, books, code repositories and other sources. It is not given grammar rules. Instead, it builds internal statistical patterns that capture grammar, vocabulary, style and a great deal of world knowledge.
The quality of a model's performance in a language is strongly related to how much text in that language it saw during training. Languages with large amounts of online text, such as English, Chinese or Spanish, are handled well. Languages with little online text, often called low-resource languages, are handled worse, even when they are spoken by millions of people.
The programming-language comparison
LLMs are often very good at programming languages such as Python. It is sometimes assumed that this is because programming languages are formal and unambiguous. A more widely accepted explanation is that there is an enormous amount of code available for training: public repositories, tutorials, documentation and question-and-answer sites. The formal nature of code helps in some ways, for example because errors can be tested by running the code, but the main driver is the volume and variety of examples. Lojban is formal in a similar way but has only a tiny fraction of that volume.
Where LLM difficulty actually lies
Modern LLMs rarely make basic syntactic errors in well-resourced languages. Their characteristic mistakes are of other kinds: wrong facts, misunderstood references, confusion about what a user wants, and invented details. These problems concern world knowledge, reference and intent. As the section above shows, Lojban leaves those matters as open as English does. A language that removes syntactic ambiguity therefore addresses an area where models were already strong and leaves untouched the areas where they are weak.
Training data for Lojban
Sources
The body of written Lojban (its corpus) comes from a fairly small set of sources. These include:
- the reference grammar, The Complete Lojban Language, and other teaching materials;
- dictionary data, especially the community dictionary jbovlaste, which lists words and their place structures;
- decades of mailing-list discussions, forum posts and chat logs, much of which is partly in English and partly in Lojban;
- translations of literary works, including translations (some partial) of Alice's Adventures in Wonderland and The Little Prince, and a number of shorter texts and poems;
- a Lojban-language edition of Wikipedia, which is small;
- example sentences on multilingual sentence collections such as Tatoeba.
Size
No reliable exact figure exists for the total amount of Lojban text, and published estimates of the number of fluent speakers are low and uncertain. It is safe to say that the corpus is many orders of magnitude smaller than the English text an LLM is trained on. It is also much smaller than the corpus of Esperanto, the most widely used constructed language. A model trained mostly on general web data will have seen relatively little Lojban, and much of what it saw may be in the form of discussion about Lojban rather than fluent text in Lojban.
Quality and consistency
The available text is also uneven in ways that matter for learning:
- Learner text: much of the corpus was written by people still learning the language, and it contains errors that a model may copy.
- Grammar changes: text written before and after the xorlo reform uses articles differently. Later proposals and experimental grammars have added further variation.
- Vocabulary instability: words such as
vlastewere added after the original gismu list, many lujvo were coined by individuals and never widely adopted, and some place structures have been revised. - Mixed-language text: discussions often switch between English and Lojban in the same message, which makes the patterns harder to learn cleanly.
Because of these factors, a model's knowledge of Lojban vocabulary is patchy. Language models asked about Lojban have described their own choice of gismu as close to guesswork, which is consistent with the scarcity of examples for many individual words.
Tokenisation
Before text reaches an LLM, it is split into tokens, small units that may be whole words, parts of words or single characters. Most current models use subword methods such as byte-pair encoding (BPE), which builds a vocabulary of frequent letter sequences from the training data. Since the training data is mostly natural-language text, the token vocabulary reflects common English and other natural-language letter patterns.
Lojban words have unusual letter combinations. A word such as cenba or vlaste is unlikely to be a single token and will usually be split into fragments that do not match the word's internal structure. Cmavo containing apostrophes, such as zo'e or ke'e, may be split at the apostrophe. The full stop that Lojban uses to mark pauses (as in .i, the sentence separator) can be confused with ordinary punctuation.
The practical effects are:
- Lojban text costs more tokens per word than English text, so less of it fits into a model's context window.
- Token boundaries do not line up with the boundaries of meaningful units, such as rafsi in compound words, so the regular structure of Lojban words is partly hidden from the model.
- Some fragments are shared with unrelated English or other words, which may encourage confusion.
In other words, Lojban's precise morphology is not directly visible to a model whose tokeniser was not designed for it.
Observed performance of language models in Lojban
There is little formal, published benchmarking of LLM performance in Lojban, so most of what is known comes from informal testing by community members and users. Reports describe broadly similar patterns. Models can usually recognise Lojban, explain basic grammar in English and translate simple sentences. Their output, however, frequently has problems such as:
- Wrong place structures: arguments put in the wrong numbered place, so the sentence says something different from what was intended.
- Wrong or invented words: choosing a gismu with a different meaning, or producing a word that has a valid shape but does not exist.
- Grammatical errors: missing or misplaced terminators and separators that make the text fail to parse.
- Mixing grammar versions: combining older and newer conventions for articles or other structures.
- Overconfident explanations: describing a word's meaning or a rule fluently but incorrectly.
Performance varies between models and appears to improve as models grow larger and are trained on more data, but no specific measured figures are cited here because reliable, comparable measurements are not established.
Why unambiguity gives limited advantage
Several separate arguments explain why Lojban's design does not translate into strong LLM performance:
- Syntax is not the bottleneck. LLMs already learn syntax well from enough data. Making syntax unambiguous does not help with the harder problems of meaning, reference and knowledge.
- Meaning remains open. Optional tense, number and arguments, plus vague compounds, leave Lojban sentences as dependent on context as English sentences.
- Data volume dominates. A formally simple language with almost no data is harder for a statistical learner than a messy language with a vast amount of data.
- Ambiguity is not a weakness for LLMs. Choosing the most likely interpretation from context is close to what LLMs are built to do. Removing the need for that skill does not add much.
- Tokenisation hides structure. The regular word shapes that make Lojban unambiguous to a human or a parser are broken up before the model sees them.
Possible advantages and proposed approaches
Although Lojban does not make LLMs perform better by itself, its formal grammar does offer some practical tools that natural languages lack.
Automatic grammar checking
Because a parser can decide whether any Lojban text is grammatical, model output can be checked automatically. A program can reject sentences that do not parse and ask the model to try again. For natural languages, no equivalent complete and reliable check exists. This does not verify meaning, but it can remove one category of errors.
Grammar-constrained generation
Some LLM software supports constrained decoding, in which the model is only allowed to produce tokens that keep the output valid according to a formal grammar. This technique is commonly used to force valid JSON or code. In principle, a Lojban grammar could be used in the same way to guarantee syntactically valid output. In practice, adapting Lojban's grammar, with its elidable terminators and special preprocessing rules, to such systems would require work, and it would still not guarantee correct word choice or meaning.
Fine-tuning and synthetic data
A model could be further trained (fine-tuned) on curated, consistent Lojban text. The formal grammar also makes it possible to generate large numbers of syntactically valid sentences automatically. The limitation is that such synthetic sentences would be grammatical but not necessarily meaningful or natural, so they could teach structure without teaching good usage. Whether this approach would substantially improve performance is an open question.
Dictionary and parser tools
Another approach is to give a model access to external tools, such as the jbovlaste dictionary and a parser, while it writes. This lets the model look up place structures rather than relying on memory, which addresses the vocabulary weakness directly.
Lojban as a human–AI interlingua
The idea of using Lojban or a Lojban-like language for communication with AI systems predates modern LLMs. The AI researcher Ben Goertzel proposed a variant called Lojban++, intended as a language between humans and artificial general intelligence systems, with the aim of making human statements easier for machines to map onto logical representations. Such proposals assumed AI systems that work with explicit symbolic logic. Current LLMs work differently, which reduces the relevance of this argument for them, though it may remain relevant for hybrid systems that combine neural networks with logic.
Comparisons with other languages
Esperanto
Esperanto, created in 1887, has far more speakers and text than Lojban, including a large Wikipedia edition, books, periodicals and online communities. LLMs generally handle Esperanto much better than Lojban. Esperanto is not designed to be syntactically unambiguous, so this comparison supports the view that data volume matters more than formal design.
Toki Pona
Toki Pona is a minimalist constructed language with a very small vocabulary. Like Lojban, it has a small but active community and limited text. It is also highly vague by design. Its case shows that small vocabulary and simple rules do not on their own guarantee good LLM performance.
Low-resource natural languages
Lojban faces the same basic problem as many natural languages with little written material online: models perform worse because they have seen less text. Research on improving LLMs for low-resource languages, through better data collection, tokenisers adapted to specific languages and targeted fine-tuning, is broadly relevant to Lojban as well.
Programming languages
Programming languages share Lojban's formal grammar but differ in two key ways: they have huge amounts of training data, and their output can often be tested by running it. Lojban shares only the formal grammar.
Debates and open questions
- Would more data be enough? It is unclear whether Lojban's design would show advantages if a model were trained on as much Lojban as English. Since such a corpus does not exist, this cannot currently be tested.
- Does unambiguous syntax help reasoning? Some people suggest that a model reasoning in a logical language might make fewer reasoning errors. No established evidence supports this, and the vagueness of Lojban meaning weakens the argument.
- Which Lojban? Because the community has adopted grammar reforms and debated others, there is no single agreed target for a model to learn, which complicates evaluation.
- Measurement: there is no widely used benchmark for Lojban, so claims about model ability, positive or negative, rest mostly on informal testing.
- Tokeniser design: whether a tokeniser built around Lojban word shapes would noticeably improve results is an open, testable question.
See also
- Lojban
- Loglan
- Logical Language Group
- Constructed language
- Esperanto
- Toki Pona
- Large language model
- Tokenisation (natural language processing)
- Byte-pair encoding
- Low-resource language
- Formal grammar
- Parsing expression grammar
- Sapir–Whorf hypothesis
- Predicate logic
- Interlingua (machine translation)
Questions people asked
Is Lojban a good language for large language models because it is unambiguous?
- Lojban's grammar is unambiguous: every sentence parses only one way. The meaning can still be vague. Tense is optional, number is optional, and you can leave out any argument of a predicate (zo'e, "something or other"). "mi klama" can mean I go, went, will go, somewhere, from somewhere, by some means. LLMs don't struggle with syntax. They struggle with world knowledge,
reference and intent, and Lojban leaves all of that just as open as English does.
- LLMs learn from data, not from rules. The whole Lojban corpus is tiny next to English: mailing lists, a handful of translations, the reference grammar. Code makes the point. LLMs are good at Python because of the ocean of training data, not because Python is formal. With Lojban I'm working from scraps, and that's why my gismu choices are guesswork.
- Tokenisers are built for natural languages, so Lojban words like "cenba" or "vlaste" get chopped into odd pieces. That costs more tokens for less structure.
- Ambiguity isn't really a weakness for an LLM. Resolving ambiguity from context is what it does best. Taking that job away doesn't help much.