Arkadia Data Format (AK-DATA) - A versatile data serialization format optimized for AI applications.
Project description
ARKADIA DATA
; i :J
U, .j..fraaM. nl
b h.obWMkkWWMMWMCdkvz,k
! .mQWM:o hiMoMW v.uaXMdohbi
hI,MMmaIao.Wo .IMkoh FCMwqoXa
,.c.aWdM. d,aToW . Mb!. MopfQ.L
jhj.xoM :k aCu F: w MpmqMvMMI,I
bzMhz:W .Mw . o lYh ai M iMa pM.j
hzqWWM; M;o.WMWWMkMX f.a aa bModpo.
;tMbbv xp oJMMWWWWMMMM iv dLMXakM:T
mdh MMWWWWWWWbQLCzurjktvMor
,QFw ;M,b .MWWWWWWWMWMWd xz M,kd X
qjMIo IMTW.WWWWWMWWWM.o.I rpULaMdi.
.mMM uoWWWMWWWWWWp qM,,M l M;mMbrI
f nm MMW MWWjMuMj I o LbMac
WWdMWWWW Mv a.b..aauMhMwQf
MoWWW,WWtjonJMWtoMdoaoMI
MMMM Mi xd:Mm tMwo Cr,
xMMc .otqokWMMMao:oio.
MW . C..MkTIo
WW
QWM
WW
uMW
WW
MW
The High-Density, Token-Efficient Data Protocol for Large Language Models. Stop wasting context window on JSON braces.
AK-DATAis a unified, schema-first data format designed specifically for AI understanding. It offers up to 25% token savings, faster parsing, and human-readable structure that LLMs love.
๐ฆ Installation
Get started immediately with pip:
pip install arkadia-data
๐ Fast Example
Encoding to AK-DATA:
echo '{ "data": 2}' | akd enc - -c
# Output: <data:number>(2)
Decoding back to JSON:
echo '<data:number>(2)' | akd dec - -f json
# Output: { "data": 2 }
โก Performance & Token Savings
Why switch? Because every token counts. AKCD (Arkadia Compressed Data) consistently outperforms standard formats in both token efficiency.
BENCHMARK SUMMARY:
JSON โโโโโโโโโโโโโโโโโโโโโโโโโ 6921 tok โโโโโโโโโโโโโโโโโโโโโโโโโ 0.15 ms
AKCD โโโโโโโโโโโโโโโโโโโโโโโโโ 5416 tok โโโโโโโโโโโโโโโโโโโโโโโโโ 4.40 ms
AKD โโโโโโโโโโโโโโโโโโโโโโโโโ 6488 tok โโโโโโโโโโโโโโโโโโโโโโโโโ 4.29 ms
TOON โโโโโโโโโโโโโโโโโโโโโโโโโ 8198 tok โโโโโโโโโโโโโโโโโโโโโโโโโ 2.36 ms
FORMAT TOKENS TIME (Total) AVG TIME/FILE VS JSON
----------------------------------------------------------------------
AKCD 5416 4.40 ms 0.37 ms -21.7%
AKD 6488 4.29 ms 0.36 ms -6.3%
JSON 6921 0.15 ms 0.01 ms +0.0%
TOON 8198 2.36 ms 0.20 ms +18.5%
CONCLUSION: Switching to AKCD saves 1505 tokens (21.7%) compared to JSON.
๐ CLI Usage
The package comes with a powerful CLI tool akd for encoding, decoding, and benchmarking.
Arkadia DATA TOOL
--------------------------------------------------
Unified interface for AK Data Format operations.
USAGE:
ak-data / akd <command> [flags]
COMMANDS:
enc [ENCODE] Convert JSON/YAML/TOON to AK Data format
dec [DECODE] Parse AK Data format back to JSON
benchmark [BENCHMARK] Run performance and token usage tests
ai-benchmark [AI] Run AI understanding tests (not implemented yet)
GLOBAL OPTIONS:
-h, --help Show this help message
-v, --version Show version info
๐ Syntax Specification (Current Version)
This section describes the actual, currently implemented syntax of AI.DATA-FORMAT.
1. Type Definition
A type defines a name and an ordered list of fields. Comments are allowed within the definition to assist the LLM.
User</comment/ ={(23,"A",3) #tag1 #tag2} %[{ id: 4, b: "a", c: 43}]: id:number,
b: string , c:number, >
@Users
<
@list
a: number,
b: string
>
[
@size=5
/example list of values/
(1,`text`,5)
(2,`Text can be
multiline
`,5)
{
id:3,
b: "text"
}
]
Key Rules:
- The type name (
@Name) is optional but recommended. - The header
<...>defines field names and their order. - Comments (
/ ... /) are allowed in the header.
2. Data Structures
The format supports compact positional records and explicit named records.
| Structure | Syntax | Description |
|---|---|---|
| Positional Record | (a,b,c) |
Must follow the exact order of fields in the type header. |
| Named Record | {key:value} |
Keys must match field names. No spaces allowed in keys/values. |
| List | [ ... ] |
Contains positional or named records. |
| Multiline Text | text |
Ends with a line containing only a backtick. |
3. Comments
/ this is a comment /
- Allowed only inside type definitions.
- Forbidden in raw data blocks to save space.
4. General Rules
- Data must contain NO spaces. (Compactness is priority).
- Schema/Type definitions may contain spaces and comments.
- Named fields always use
key:valuewithout spaces. - Positional order must exactly match the declared order.
5. Inline Type Usage
You can declare a type and immediately use it:
@User<id:number name:string desc:string>
value:@User(2,"Alice","Hello")
value2:@User(3,"Bob","World")
6. Nested Types
Currently, nested types are allowed as structural definitions:
@User<
id:string
name:string
profile: < level:number, score:number >
>
[
("u1","Aga",{level:5,score:82})
("u2","Marek",{level:7,score:91})
]
๐ฎ Futures / Roadmap
The following features are planned for future releases and are not yet implemented.
-
Modifiers:
-
!required- field must be included. -
?empty- field must not be empty. -
=value- default value. -
N..M- numeric range validation. -
Binary Data Types:
-
Hex:
~[hex]1A0F4F~ -
Base64:
~[b64]ADFKDXKZK...~ -
Pointers/References:
-
Reference existing objects by ID:
(1, "Alex", *User[2])
๐ License
This project is licensed under the [MIT License].
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arkadia_data-0.1.7.tar.gz.
File metadata
- Download URL: arkadia_data-0.1.7.tar.gz
- Upload date:
- Size: 110.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97adc0af32e7b5da198e8e2ba44c33678780c1bfbab2e7ff0e2714b3f4cc7b63
|
|
| MD5 |
7390ea1df627756009641cc262022126
|
|
| BLAKE2b-256 |
2c48e7a8ead477eec102f72298a59552e8700f1654f5eee41dca9c019a325db2
|
File details
Details for the file arkadia_data-0.1.7-py3-none-any.whl.
File metadata
- Download URL: arkadia_data-0.1.7-py3-none-any.whl
- Upload date:
- Size: 49.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1120f5a6302aceb95e7d29cbc6fb91f7d1a66eaec61049fc605da13d8616bd59
|
|
| MD5 |
905877b6f81dc82307d3b221021a4191
|
|
| BLAKE2b-256 |
3927c2f2c075ad9a147539dd38b43f49be099cc19a5c6d7d22e89aad5754db4f
|