Semantic compression and machine communication for the AI era.
This page is the technical “LoreTokens Bible” – what they are, how the format works, how they differ from JSON / TOON / TONL, and how they plug into SAIQL and AI systems.
LoreTokens are a semantic compression and machine communication format. Instead of moving full JSON blobs or long natural-language prompts, a LoreToken line encodes the meaning an AI needs: domain, concept, entity, tags, and desired output shape.
They are designed so that language models can read them directly – no decompression step – and immediately know which concepts to activate and how to respond.
PROFILE.SKILLS:[Mohit+AI,Cloud,Trading>>profile_record,ACTIVE]
This single line tells the model:
PROFILE.SKILLS – the domain and concept.Mohit – the primary entity.AI, Cloud, Trading – key attributes.profile_record – expected output structure.ACTIVE – state / flag information.A modern LLM already understands “profile” and “skills.” The LoreToken just pins those ideas together with almost no tokens, so the model never has to guess what this data is.
Many formats chase fewer characters: minified JSON, CSV, TOON, TONL and other compact tabular layouts. They absolutely save tokens – but if you strip away too much structure, you force the model to guess what the fields mean.
A hyper-minimal row might hide whether a column is:
Every time the model has to reconstruct meaning from a skinny layout, you introduce semantic drift. Sometimes it guesses right; sometimes it is confidently wrong – and you just spent extra compute to decode an “optimized” format.
The result: LoreTokens cut far more tokens than JSON, without crossing the line where “token savings” become “hallucination fuel.”
SAIQL (Semantic AI Query Language) uses LoreTokens as a native storage and query surface. Instead of decoding massive JSON documents, SAIQL can index LoreTokens directly and stream only the few symbolic lines an AI actually needs.
*[DOC.MED.NEURO?(LEVEL_4)]::token_text>>flat
In this example, SAIQL selects all level-4 medical LoreTokens and returns them as a flat list for a model to expand into rich human-readable documentation. The heavy semantic lifting is baked into the LoreTokens; SAIQL simply routes and filters them.
LoreTokens specification and examples:
github.com/apolloraines/LoreTokens
SAIQL Engine and semantic database:
github.com/apolloraines/SAIQL-Engine
These repos include format docs, converters, and real-world examples of LoreTokens driving SAIQL, Nova, and other AI systems.