Idiomark Specification v1.0
Status: Stable | Version: 1.0.0 | Date: 2026-02-10
Abstract
The Idiomark defines a standardized format for representing human personality and communication style for AI applications. This specification covers:
- Data extraction from user-provided text samples
- Personality analysis and quantification
- File format specification (.idiomark)
- Inference integration patterns
- Security and privacy considerations
Table of Contents
- Overview
- Terminology
- The Idiomark File Format
- Extraction Process
- Personality Model
- Inference Integration
- Security Considerations
- Implementation Guide
Overview
Design Principles
- Model Agnostic - Idiomark works with any AI model (GPT, Claude, Llama, etc.)
- Source Agnostic - Extract from any text samples you provide
- Privacy First - Raw data never leaves user control
- Extensible - New personality dimensions can be added without breaking compatibility
- Human Readable - Idiomark files are JSON, readable and debuggable
System Architecture
┌─────────────────────────────────────────────────────────────┐
│ USER LAYER │
├─────────────────────────────────────────────────────────────┤
│ Writing samples: emails, posts, chat logs, documents, ... │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Idiomark EXTRACTOR │
├─────────────────────────────────────────────────────────────┤
│ • Text ingestion (user-provided samples) │
│ • Normalization to intermediate format │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ Idiomark ANALYZER │
├─────────────────────────────────────────────────────────────┤
│ • NLP processing (sentiment, tone patterns) │
│ • Statistical analysis (frequencies, distributions) │
│ • Domain extraction (topics, expertise) │
│ • Value inference (beliefs, positions) │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ .Idiomark FILE OUTPUT │
├─────────────────────────────────────────────────────────────┤
│ Structured JSON personality blueprint │
└─────────────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────────┐
│ INFERENCE LAYER │
├─────────────────────────────────────────────────────────────┤
│ Idiomark + User Query → Enhanced System Prompt → AI Response │
└─────────────────────────────────────────────────────────────┘
Terminology
| Term | Definition |
|---|---|
| Entity | The person, brand, or character being represented |
| Source | A body of text samples provided by the user (posts, emails, documents, etc.) |
| Extraction | The process of analyzing text samples to produce personality metrics |
| Analysis | The process of converting raw data into personality metrics |
| Blueprint | The structured personality output in Idiomark format |
| Injection | Applying a Idiomark blueprint to an AI inference call |
The Idiomark File Format
File Structure
A .idiomark file is a JSON document with the following structure:
{
"idiomark": "1.0.0",
"id": "idiomark_<uuid>",
"created": "2026-02-10T00:00:00Z",
"updated": "2026-02-10T00:00:00Z",
"metadata": {
"entity": {
"name": "Optional Entity Name",
"type": "human|brand|bot|fictional",
"sources": ["text-samples"]
},
"extraction": {
"date": "2026-02-10T00:00:00Z",
"sample_size": 1250,
"timeframe": {
"from": "2023-01-01T00:00:00Z",
"to": "2026-02-10T00:00:00Z"
}
},
"validator": "idiomark-validator@1.0.0"
},
"personality": {
"voice": {},
"patterns": {},
"domains": [],
"values": [],
"knowledge": {}
},
"signature": "<hash>"
}
Personality Object
Voice
Defines how the entity communicates:
"voice": {
"tone": {
"primary": "casual",
"secondary": "humorous",
"confidence": 0.87
},
"formality": 0.3,
"humor": 0.8,
"sarcasm": 0.6,
"enthusiasm": 0.7,
"directness": 0.5
}
Value Ranges: 0.0 to 1.0
Tone Options: casual, formal, professional, friendly, sarcastic, dry, enthusiastic, technical, poetic, abrupt
Patterns
Statistical patterns in communication:
"patterns": {
"sentence_length": {
"mean": 12.4,
"stddev": 5.2,
"distribution": "normal"
},
"paragraph_length": {
"mean": 2.1,
"stddev": 1.3
},
"emoji_usage": {
"frequency": "high",
"top_emojis": ["🚀", "💻", "🔥", "👀"],
"position": "end"
},
"punctuation": {
"exclamation_frequency": 0.12,
"question_frequency": 0.08,
"ellipsis_usage": "low"
},
"capitalization": {
"all_caps_frequency": 0.02,
"random_caps": false
}
}
Domains
Areas of knowledge and expertise:
"domains": [
{
"name": "javascript",
"confidence": 0.92,
"evidence": ["technical_terms", "code_blocks", "project_mentions"]
},
{
"name": "crypto",
"confidence": 0.78,
"evidence": ["terminology", "community_engagement"]
}
]
Values
Inferred beliefs and positions:
"values": [
{
"name": "open_source",
"sentiment": "positive",
"confidence": 0.89
},
{
"name": "privacy",
"sentiment": "positive",
"confidence": 0.85
},
{
"name": "centralization",
"sentiment": "negative",
"confidence": 0.72
}
]
Knowledge
Specific entities and concepts frequently referenced:
"knowledge": {
"frequent_terms": ["react", "typescript", "web3", "github"],
"mentions": {
"people": ["@dan_abramov", "@sebastienlorber"],
"projects": ["react", "nextjs", "tailwindcss"],
"organizations": ["vercel", "facebook", "openai"]
},
"topics": {
"primary": ["frontend", "web_development"],
"secondary": ["ai", "crypto", "gaming"]
}
}
Extraction Process
Supported Sources
Extraction works from text samples you provide. Any written material the user supplies is valid input: emails, chat logs, social posts you have exported, documents, code comments, and so on. Idiomark does not connect to platform APIs on your behalf — you bring the text, the analyzer does the rest.
Extraction Flow
Sample Size Requirements
| Minimum Content | Recommended | Optimal |
|---|---|---|
| 500 words | 2,500 words | 10,000+ words |
| ~50 posts | ~250 posts | ~1,000+ posts |
| 1 month | 6 months | 12+ months |
Personality Model
Dimension Definitions
Formality (0.0 - 1.0)
- 0.0: Very casual (slang, abbreviations, no punctuation)
- 0.5: Mixed (professional but approachable)
- 1.0: Very formal (complete sentences, proper grammar, polite)
Humor (0.0 - 1.0)
- 0.0: Serious/no humor
- 0.5: Occasional jokes
- 1.0: Constant humor, jokes, puns
Sarcasm (0.0 - 1.0)
- 0.0: Literal, sincere
- 0.5: Some sarcasm
- 1.0: Heavy sarcasm, irony
Enthusiasm (0.0 - 1.0)
- 0.0: Flat, deadpan, subdued
- 0.5: Normal energy
- 1.0: High energy, exclamation marks, hype
Directness (0.0 - 1.0)
- 0.0: Indirect, euphemistic, polite
- 0.5: Balanced directness
- 1.0: Blunt, straightforward, no filter
Analysis Algorithms
Tone Classification
- Method: Transformer-based sentiment analysis + pattern matching
- Training: Social media corpus with labeled tones
- Confidence: Model certainty score
Pattern Extraction
- Method: Statistical analysis of n-grams, punctuation, emoji usage
- Smoothing: Moving average over time to account for evolution
Domain Extraction
- Method: TF-IDF + topic modeling (LDA/BERTopic)
- Validation: Cross-reference with known domain vocabularies
Inference Integration
Prompt Template
def generate_idiomark_prompt(user_query: str, idiomark_data: dict) -> str:
"""Generate a system prompt with Idiomark personality injection."""
voice = idiomark_data['personality']['voice']
patterns = idiomark_data['personality']['patterns']
prompt = f"""You are an AI assistant with the following personality characteristics:
VOICE:
- Tone: {voice['tone']['primary']} (confidence: {voice['tone']['confidence']})
- Formality: {voice['formality']} (0.0=casual, 1.0=formal)
- Humor: {voice['humor']} (0.0=serious, 1.0=very humorous)
- Sarcasm: {voice['sarcasm']} (0.0=sincere, 1.0=heavily sarcastic)
- Enthusiasm: {voice['enthusiasm']} (0.0=flat, 1.0=high energy)
- Directness: {voice['directness']} (0.0=euphemistic, 1.0=blunt)
COMMUNICATION PATTERNS:
- Emoji usage: {patterns['emoji_usage']['frequency']}
- Typical sentence length: {patterns['sentence_length']['mean']} words
- Exclamation frequency: {patterns['punctuation']['exclamation_frequency']}
DOMAINS: {', '.join([d['name'] for d in idiomark_data['personality']['domains']])}
VALUES: {', '.join([v['name'] for v in idiomark_data['personality']['values']])}
Respond to the user's query following these personality characteristics.
Stay in character. Be authentic to this personality.
User query: {user_query}
"""
return prompt
Model Compatibility
| Model | Integration Method | Tested |
|---|---|---|
| GPT-4 | System prompt | ✅ |
| GPT-3.5 | System prompt | ✅ |
| Claude 3 | System prompt | ✅ |
| Llama 2 | Prompt prefix | 🔄 |
| Mistral | Prompt prefix | 🔄 |
Quality Metrics
def evaluate_response_quality(response: str, idiomark_data: dict) -> dict:
"""Evaluate how well a response matches the Idiomark personality."""
return {
"tone_match": compare_tone(response, idiomark_data),
"pattern_match": compare_patterns(response, idiomark_data),
"vocabulary_match": compare_vocabulary(response, idiomark_data),
"overall_score": 0.0 # 0.0 to 1.0
}
Security Considerations
Privacy Requirements
- User Consent: Explicit consent required for extraction
- Data Minimization: Only collect necessary data
- Right to Deletion: Users can delete their Idiomark files
- No Raw Storage: Raw source text should not be stored permanently
File Integrity
"signature": {
"algorithm": "sha256",
"hash": "<hash-of-content>",
"signed_by": "optional-identity"
}
Implementation Guide
Reference Implementation
The official Idiomark implementation is maintained at:
github.com/idiomark
Extracting from Text Samples
import { extractFromTextStrings } from '@idiomark/core'
const samples = [
'First writing sample...',
'Second writing sample...',
'Third writing sample...'
]
const result = await extractFromTextStrings(samples, {
sampleSize: 1000
})
// result contains the personality metrics for file generation
Validating a Idiomark File
idiomark validate me.idiomark
# ✓ Valid Idiomark file v1.0.0
# ✓ All required fields present
# ✓ Signature valid
Versioning
Idiomark uses semantic versioning. Major versions indicate breaking changes to the file format.
Migration Strategy
{
"idiomark": "2.0.0",
"compatibility": {
"can_read": ["1.0.0"],
"migration": "automatic"
}
}
Contributing
Specification changes require:
- Proposal via RFC
- Community discussion
- Reference implementation
- Test suite
See contributing.md for details.
License
The Idiomark specification is licensed under MIT. Implementations may have different licenses.
Copyright © 2026 Idiomark contributors