{"slug": "protocol-spec-for-row-separated-key-value-format", "title": "Protocol spec for row separated key value format", "summary": "A new lightweight data format called Record-Separated Key-Value (RSKV) has been proposed for structured data exchange between large language models and software systems. Designed to be easy for LLMs to generate and humans to inspect, RSKV uses visible delimiters instead of braces or indentation, aiming to reduce syntax errors common with JSON, YAML, or XML. The format includes Python utilities for SQLite interop and is hosted on GitHub under the Symbol Grounding Framework.", "body_md": "**Record-Separated Key-Value Format** — a lightweight, line-oriented format for LLM-mediated structured data exchange.\n\nRSKV is a structured transcript format: easy for LLMs to generate, easy for humans to inspect, and easy for small programs to parse. It represents data as named sets, records, and `key: value`\n\ncells, using visible delimiters instead of braces, indentation, quoting, or nested syntax.\n\nRepository folder: [rskv-spec](https://github.com/SymbolGroundingFramework/SGF-manifest/tree/main/rskv-spec)\n\nRSKV is designed for the boundary between language models and software systems.\n\nA minimal RSKV document looks like this:\n\n```\n#SET: users\n#SCHEMA: id:int, name:str, plan:str\nid: 1\nname: Alice\nplan: pro\n---ROW---\nid: 2\nname: Bob\nplan: free\n```\n\nThe core model is simple:\n\n`#SET: name`\n\nstarts a named collection.`key: value`\n\nadds a field to the current record.`---ROW---`\n\nseparates records.`#SCHEMA:`\n\noptionally declares field types and column order.`#META:`\n\noptionally records provenance or operational metadata.`\\N`\n\nrepresents explicit null.- An empty value represents an empty string.\n- A missing key represents an absent value.\n\nLLMs are often better at emitting repeated local patterns than maintaining global syntax state across deeply nested JSON, YAML, or XML.\n\nRSKV leans into that strength. It avoids braces, commas, quotes, indentation semantics, and required nesting. The result is a format intended to be:\n\n- LLM-friendly\n- Human-readable\n- Streamable\n- Diffable\n- Grep-able\n- Parser-simple\n- Schema-flexible\n- Suitable for lightweight ETL and model-to-application handoff\n\nRSKV is not intended to replace JSON, CSV, Parquet, Protocol Buffers, or databases. It is a text-first interchange format for sparse, reviewable, LLM-facing structured data.\n\n| File | Purpose |\n|---|---|\n`rskv_spec.md` |\n\n`claims.md`\n\n`essay.md`\n\n`rskv_to_sqlite.py`\n\n`sqlite_to_rskv.py`\n\nUse this prompt fragment when asking an LLM to emit RSKV:\n\n```\nOutput only RSKV. Do not use Markdown, JSON, code fences, bullets, or commentary.\n\nStart each collection with:\n#SET: set_name\n\nWrite one field per line:\nkey: value\n\nSeparate records with:\n---ROW---\n\nUse #SCHEMA: after #SET: when field names and types are known.\nUse #META: after #SCHEMA: only when provenance is useful.\n\nUse \\N for null.\nUse an empty value after colon-space for an empty string.\nOmit unknown or not-applicable fields.\nEscape newlines as \\n, backslashes as \\\\, a literal # at the start of a value as \\#, and a literal ---ROW--- value as \\---ROW---.\n#SET: people\n#SCHEMA: id:int, name:str, role:str, notes:str\n#META: source=example, version=1\nid: 1\nname: Alice\nrole: engineer\nnotes: Works on data pipelines\n---ROW---\nid: 2\nname: Bob\nrole: analyst\nnotes: \\N\n```\n\nThis folder includes two small Python utilities for SQLite interop.\n\n```\npython rskv_to_sqlite.py input.rskv output.db\npython sqlite_to_rskv.py input.db output.rskv\n```\n\nExact command-line options may vary depending on the script version. Run the scripts directly or inspect their argument handling for supported flags.\n\nRSKV is strongest for:\n\n- LLM-generated structured output\n- Sparse records\n- Multi-set documents\n- Human-reviewable intermediate data\n- Prompt and context exchange\n- Lightweight ETL\n- Logs and structured transcripts\n- Database staging\n\nRSKV is less natural for:\n\n- Deep inline object graphs\n- Compact binary transport\n- Dense analytics storage\n- High-throughput schema-first RPC contracts\n\nThose cases can still be handled through conventions such as embedded `json`\n\nfields, `base64`\n\nfields, URI references, normalized sets, strict schemas, or downstream conversion to databases and columnar formats.\n\nA set is a named collection of records.\n\n```\n#SET: tickets\n```\n\nRecords are separated by `---ROW---`\n\n.\n\n```\nticket_id: 1001\nstatus: open\n---ROW---\nticket_id: 1002\nstatus: closed\n```\n\nA cell is one `key: value`\n\nline. Parsers split on the first `: `\n\nonly.\n\n```\nsummary: User reported error: timeout after login\nname:        empty string\nname: \\N     explicit null\n             missing key means absent\n```\n\nSchemas are optional and advisory.\n\n```\n#SCHEMA: id:int, name:str, active:bool, created_at:datetime\n```\n\nMetadata is optional and applies to the current set.\n\n```\n#META: source=crm, version=2026-06-19, owner=data-eng\n```\n\nRSKV 1.0 is an initial specification draft intended for experimentation, review, and implementation.\n\nThe current collection includes:\n\n- The formal specification\n- A claims/rationale document\n- An explanatory essay\n- SQLite import/export utilities\n\n— start here for the motivation.`essay.md`\n\n— read this for the design argument.`claims.md`\n\n— read this for the normative format.`rskv_spec.md`\n\nand`rskv_to_sqlite.py`\n\n— inspect these for practical interop.`sqlite_to_rskv.py`\n\nRSKV is one component of the broader **Symbol Grounding Framework (SGF)** project.\n\nSGF is a stack of languages, grammars, protocols, and tooling for grounded machine meaning:\n\n**Core Lexicon**— sense-disambiguated concepts grounded in ~65 semantic primes.** Synapses**— hub-and-spoke event structures with 15 fixed semantic roles for representing who did what to whom.** HFF Wire Protocol**— a versioned, machine-to-machine message format that lets services exchange grounded semantics without prior integration contracts.**AFP**— an act protocol (`INFORM`\n\n,`QUERY`\n\n,`COMMAND`\n\n, etc.) with receiver sovereignty.**Omega**— a formal governance grammar with 13 primitives and a deterministic Safety Kernel.** WML**— a workflow-map language for composing AI software from primitives.** RSKV**— a lightweight record-separated key-value format for LLM-facing structured data exchange, prompt/output capture, structured transcripts, and simple ETL handoff.\n\nWithin SGF, RSKV is best understood as an **interchange and tooling format** rather than a semantic representation layer. It provides a simple, human-readable way to move structured records between LLMs, scripts, databases, examples, test fixtures, and documentation.\n\nRSKV can be used to:\n\n- Capture LLM outputs in a parseable text format.\n- Store example records for SGF components.\n- Exchange lightweight structured data between scripts.\n- Convert records to and from SQLite.\n- Represent test fixtures for workflows, protocols, and semantic transformations.\n- Provide a readable staging format before data is converted into stricter SGF representations.\n\nSee also:\n\n[Formal RFC specification for SGF](https://github.com/SymbolGroundingFramework/SGF-manifest/tree/main/specs)\n\nAdd a license file before public reuse or distribution.\n\nSuggested options:\n\n- MIT for permissive software/spec reuse\n- Apache-2.0 for permissive reuse with patent language\n- CC-BY-4.0 for documentation-oriented reuse\n\nMaintained as part of the Symbol Grounding Framework work.\n\nRepository: [SymbolGroundingFramework/SGF-manifest](https://github.com/SymbolGroundingFramework/SGF-manifest)", "url": "https://wpnews.pro/news/protocol-spec-for-row-separated-key-value-format", "canonical_source": "https://github.com/SymbolGroundingFramework/SGF-manifest/tree/main/rskv-spec", "published_at": "2026-06-19 20:39:38+00:00", "updated_at": "2026-06-19 21:08:16.360042+00:00", "lang": "en", "topics": ["large-language-models", "developer-tools"], "entities": ["Symbol Grounding Framework", "GitHub", "RSKV"], "alternates": {"html": "https://wpnews.pro/news/protocol-spec-for-row-separated-key-value-format", "markdown": "https://wpnews.pro/news/protocol-spec-for-row-separated-key-value-format.md", "text": "https://wpnews.pro/news/protocol-spec-for-row-separated-key-value-format.txt", "jsonld": "https://wpnews.pro/news/protocol-spec-for-row-separated-key-value-format.jsonld"}}