LoreTokens Documentation

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.

1. What LoreTokens Are

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.

Example LoreToken

PROFILE.SKILLS:[Mohit+AI,Cloud,Trading>>profile_record,ACTIVE]

This single line tells the model:

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.

2. Why “Token Reduction” Can Go Wrong

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.

LoreTokens vs JSON / TOON / TONL

The result: LoreTokens cut far more tokens than JSON, without crossing the line where “token savings” become “hallucination fuel.”

3. LoreTokens Inside SAIQL

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.

4. Repositories & Further Reading

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.