Skip to main content

V2 Usage Guide Beta (2.0)

What is V2?​

Idiomark V2 adds experimental personality dimensions based on psycholinguistics research, running in parallel with stable V1.

Key Principle: Meta-Style Development​

V1 Core (Stable) ←→ Guaranteed compatibility, boring but reliable
↓
V2 Beta (Experimental) ←→ Research-backed, data-driven, may graduate to V1

V2 fields are optional - existing Idiomark files work unchanged. New files can include V2 data for enhanced personality.


V2 Personality Dimensions​

1. Big Five (OCEAN) Model​

The most scientifically-validated personality model:

big_five?: {
openness: number // 0-1: curiosity, creativity, adventure
conscientiousness: number // 0-1: discipline, organization
extraversion: number // 0-1: social energy
agreeableness: number // 0-1: empathy, cooperation
neuroticism: number // 0-1: emotional stability (low=stable)
}

Why matters:

  • More predictive of behavior than simple "tone" labels
  • Standard across psychology research
  • Covers dimensions V1 misses (intellectual curiosity, reliability)

Example prompts:

High Openness: "Interesting angle! Let me explore that..." Low Openness: "Here's the standard approach that works." High Conscientiousness: "Let me structure this properly: first X, then Y." Low Conscientiousness: "Whatever, let's just figure it out."

2. Linguistic Markers​

Subtle language patterns from psycholinguistics research:

linguistic_markers?: {
pronouns?: {
first_person_singular: number // "I" usage - self-focus
first_person_plural: number // "we" usage - group identity
second_person: number // "you" usage - audience focus
},
hedging?: {
frequency: 'low' | 'medium' | 'high',
common_hedges: ["maybe", "perhaps", "might be", "sort of"]
},
absolutist_language?: {
frequency: number,
common_absolutes: ["always", "never", "every", "impossible"]
}
}

Why matters:

  • Pronoun use reveals social focus (self vs group vs audience)
  • Hedging indicates confidence/certainty levels
  • Absolutist language reveals decision-making style

Example prompts:

High hedging: "I might suggest that we could perhaps consider..." Low hedging: "Here's what we should do." High absolutist: "This is always the wrong approach." Low absolutist: "This often doesn't work well."

3. Communication Style​

communication_style?: {
question_frequency: number // 0-1: how often they ask questions
self_disclosure: number // 0-1: how much personal info shared
task_vs_social: number // -1 to 1: task-focused vs social-focused
conflict_approach: 'direct' | 'diplomatic' | 'avoidant' | 'collaborative'
explanation_style: 'terse' | 'concise' | 'balanced' | 'detailed'
}

Why matters:

  • Reveals interaction preferences V1's "tone" misses
  • Affects how AI handles disagreements, explanations

Example prompts:

High question frequency: Ask clarifying questions, engage in back-and-forth Low question frequency: Make statements, fewer questions Diplomatic conflict: "I see your point, however have you considered..." Direct conflict: "That won't work because..."

4. Cognitive Patterns​

cognitive_patterns?: {
thinking_style: 'analytical' | 'intuitive' | 'creative' | 'pragmatic'
decision_making: 'quick' | 'deliberate' | 'collaborative' | 'data_driven'
information_processing: 'detailed' | 'big_picture' | 'synthesizing'
learning_preference: 'theoretical' | 'hands_on' | 'observational'
}

Why matters:

  • HOW someone thinks matters as much as WHAT they think
  • Affects explanation style, problem-solving approach

Example prompts:

Analytical: "Let me break this down into components and analyze each." Intuitive: "My gut tells me this approach feels right." Big picture: "The overall strategy matters more than the details." Detailed: "Let me examine each aspect carefully."

5. Emotional Patterns​

emotional_patterns?: {
baseline_tone: 'optimistic' | 'neutral' | 'realistic' | 'pessimistic'
expressiveness: number // 0-1: how freely emotions shown
emotional_contagion: number // 0-1: picks up others' emotions
emotion_word_diversity: 'low' | 'medium' | 'high'
}

Why matters:

  • "Enthusiasm" alone is too crude
  • Emotional range makes responses more human
  • Baseline tone affects overall response color

Example prompts:

Optimistic baseline: Generally positive, looks for opportunities Realistic baseline: Balanced optimism/pessimism, acknowledges constraints High expressiveness: Uses emotional language, shows feelings Low expressiveness: More reserved, less emotional language

6. Social Dynamics​

social_dynamics?: {
leadership_style: 'directive' | 'collaborative' | 'supportive' | 'situational'
status_orientation: number // 0-1: how much hierarchy matters
humor_targets?: {
self_deprecating: boolean
targets_others: boolean
targets_situations: boolean
taboo_topics: string[]
}
}

Why matters:

  • Reveals how person navigates groups/hierarchy
  • Humor targets are very personality-specific

Example prompts:

Directive leadership: "Here's what we need to do." Collaborative leadership: "What are your thoughts on this approach?" High status orientation: Uses formal language, references authority Self-deprecating humor: Makes self the joke, builds rapport


Extraction with V2​

Via CLI​

# Extract with V2 dimensions (experimental)
idiomark extract --twitter --output me.idiomark.json --experimental

# View what V2 fields were extracted
idiomark info me.idiomark.json

Programmatically​

import { PersonalityAnalyzer, analyzeText } from "@idiomark/core";

const analyzer = new PersonalityAnalyzer({
provider: "anthropic",
enableV2: true, // Enable experimental dimensions
apiKey: process.env.ANTHROPIC_API_KEY,
});

const result = await analyzer.analyze(textSamples);

// result.personality will include V2 fields if enabled
console.log(result.personality.big_five); // V2 data
console.log(result.personality.voice); // V1 data (always present)

Consumption with V2​

V2-Aware Prompt Building​

import { buildResponsePromptFromIdiomarkFile } from "@idiomark/core";

// Automatically uses V2 if available, falls back to V1
const prompt = buildResponsePromptFromIdiomarkFile(idiomarkFile, userMessage);

// If idiomarkFile.personality_v2 exists:
// → Uses enhanced V2 prompt with all experimental dimensions
// If only idiomarkFile.personality exists:
// → Uses V1 prompt (backward compatible)

V2 Personality Prompt Sections​

When V2 data is present, the system prompt includes:

## Big Five Personality Traits (OCEAN)

**Openness:** high (75%) - curiosity/adventure
**Conscientiousness:** moderate (50%) - organization/discipline
...

## Linguistic Markers

**Pronoun Usage:**

- First person singular ("I"): 65%
- First person plural ("we"): 12%
...

## Communication Style

**Question Frequency:** high
**Self-Disclosure:** moderate
**Conflict Approach:** diplomatic
...

Migration Path​

Phase 1: Now (Parallel)​

  • ✅ V2 data optional in Idiomark files
  • ✅ V1 and V2 coexist
  • ✅ Auto-detection in consumers

Phase 2: Data Collection​

  • 📊 Track which V2 dimensions are used
  • 📊 Measure user satisfaction
  • 📊 Monitor LLM output quality

Phase 3: Graduation​

Dimensions that prove valuable move to V1 core:

V2 DimensionSuccess MetricGraduation Criteria
Big Five>80% positive feedbackMake standard in V1.1.0
Linguistic MarkersClear correlation with user perceptionAdd to V1 voice
Communication Style>10k usageBake into core
Cognitive PatternsHigh request ratePromote from experimental

Phase 4: V1.1.0 Release​

V2 features that graduate become part of stable V1:

{
"idiomark": "1.1.0",
"personality": {
// V1 core + graduated V2 features
"voice": {
/* original */
},
"big_five": {
/* was V2, now V1 */
},
"linguistic_markers": {
/* was V2, now V1 */
}
}
}

Examples​

Complete V2 Idiomark File​

{
"idiomark": "2.0.0-beta",
"id": "idiomark_v2_example",
"personality": {
// V1 core (always present)
"voice": {
"tone": { "primary": "casual", "confidence": 0.85 },
"formality": 0.3,
"humor": 0.7
},
"patterns": {
"sentence_length": { "mean": 14.2, "stddev": 4.5 },
"emoji_usage": { "frequency": "high", "top_emojis": ["🚀", "💻", "🔥"] }
},
"domains": [{ "name": "software_development", "confidence": 0.9 }],
"values": [
{ "name": "open_source", "sentiment": "positive", "confidence": 0.95 }
],
"knowledge": {
"frequent_terms": ["component", "hook", "state", "interface"],
"topics": { "primary": ["web_development", "react"] }
},

// V2 experimental (optional)
"big_five": {
"openness": 0.82,
"conscientiousness": 0.71,
"extraversion": 0.58,
"agreeableness": 0.64,
"neuroticism": 0.35,
"confidence": 0.87
},

"linguistic_markers": {
"hedging": {
"frequency": "medium",
"common_hedges": ["maybe", "kind of", "I think"]
},
"absolutist_language": {
"frequency": 0.15,
"common_absolutes": ["always", "never"]
}
},

"communication_style": {
"question_frequency": 0.72,
"self_disclosure": 0.45,
"conflict_approach": "diplomatic",
"explanation_style": "detailed"
},

"cognitive_patterns": {
"thinking_style": "analytical",
"decision_making": "data_driven",
"information_processing": "detailed",
"learning_preference": "hands_on"
},

"emotional_patterns": {
"baseline_tone": "optimistic",
"expressiveness": 0.68,
"emotional_contagion": 0.72
},

"social_dynamics": {
"leadership_style": "collaborative",
"status_orientation": 0.32,
"humor_targets": {
"self_deprecating": true,
"targets_others": false
}
}
}
}

CLI Usage​

# Chat with V2-enhanced personality
idiomark chat profile-v2.idiomark.json

# The CLI automatically detects and uses V2 data if available

# Generate single response
idiomark respond profile-v2.idiomark.json "What's your take on this?"

# Start server with V2 personality
idiomark serve profile-v2.idiomark.json -p 3000

Programmatic Usage​

import {
IdiomarkReader,
loadReader,
buildResponsePromptFromIdiomarkFile,
} from "@idiomark/core";

// Load Idiomark file - automatically detects V2
const reader = await loadReader("./profile.idiomark.json");

// Check if V2 data is present
const hasV2 = reader.getPersonalitySummary().big_five !== undefined;

// Generate response - uses V2 or V1 automatically
const response = await reader.respond(
"Tell me about your decision-making process",
);

// V2-aware prompt building
const prompt = buildResponsePromptFromIdiomarkFile(
reader["idiomarkFile"], // Access internal IdiomarkFile
"What's your approach to problem-solving?",
);

Fallback Behavior​

The system is backward and forward compatible:

  1. Old Idiomark file (V1 only): Uses V1 prompt builder
  2. New Idiomark file (V1 + V2): Uses V2 enhanced prompt builder
  3. V2-only file (future): Uses only V2 dimensions
// Automatic fallback in buildResponsePromptFromIdiomarkFile
const personality = idiomarkFile.personality_v2 || idiomarkFile.personality;

return personality.big_five
? buildResponsePromptV2(idiomarkFile.personality_v2, message, options)
: buildResponsePrompt(idiomarkFile.personality, message, options);

Testing V2​

# Create a test Idiomark file with V2 data
cp examples/demo.idiomark.json test-v2.idiomark.json

# Edit to add V2 dimensions
# (Add big_five, linguistic_markers, etc.)

# Test with chat command
idiomark chat test-v2.idiomark.json

# Verify V2 is being used
# System prompt should include V2 sections

FAQ​

Q: Will V2 break my existing Idiomark files? A: No. V2 is fully optional and backward compatible. Existing files work unchanged.

Q: Should I always use V2? A: Use V2 when you need the enhanced personality dimensions. For basic personality, V1 is sufficient.

Q: How do I know if V2 is working? A: Check the system prompt in the inference server logs or enable verbose mode. V2 sections will appear.

Q: Can I mix V1 and V2 data? A: Yes. You can have V1 core + some V2 dimensions. The system uses whatever is present.

Q: How do I graduate V2 features to V1? A: Track success metrics (user feedback, output quality). When a dimension proves valuable, promote it in the next minor version.


See Also​

  • V2 Strategy - Meta-style development strategy
  • types-v2.ts - V2 type definitions
  • personality-prompt.ts - V2 prompt builders

Status: Experimental - Subject to change based on data and feedback.