Innovation 5: Reciprocal Length Matching

Hassan Uriostegui (EB1A Computer Scientist) & Lic. Fernanda Beltran

← Back to Main Paper | View Production Results

Overview

🎯 Core Innovation

Character responses match the length and style of user input. Short messages get short replies, long messages get detailed responses, emoji gets emoji back.

Natural Human Behavior

In real conversations:

Without Reciprocal Length

LLMs tend to be verbose:

User: "k"
LLM: "Thank you for your message! I appreciate you reaching out. 
I wanted to let you know that I've received your response and I'm 
happy to continue our conversation..."

# 😱 Way too much for "k"

Implementation

Core Constraint (Every Prompt)

# Note: {character_name} responds in reciprocal length
# Note: Reply to short messages with short messages
# Note: Reply to long inquiries with detailed responses  
# Note: Match emoji usage and energy level

Emphasis in Instructions

# Acting as {character_name} Respond as a {relationship} 
# (natural answer in reciprocal length - short to short, long to long)

Real Examples

Short Input β†’ Short Output

User: "hey"
Character: "hey! what's up? 😊"

User: "nm wbu"
Character: "same lol just chilling"

User: "k"
Character: "cool πŸ‘"

Long Input β†’ Long Output

User: "So I've been thinking a lot about my career lately and I'm not sure 
if I'm on the right path. I love what I do but sometimes I wonder if there's 
something else out there that would make me happier. What do you think?"

Character: "wow that's such a real question and honestly I think everyone goes 
through that at some point? like I totally get that feeling of wondering 'is this 
it?' even when things are good. I think the fact that you're asking yourself these 
questions means you're really self-aware which is amazing. maybe it's not about 
finding something completely different but more about finding what specifically 
makes you happy in what you do now and seeing if you can do more of that? idk just 
my thoughts but I'm here if you want to talk through it more πŸ’™"

Emoji Input β†’ Emoji Output

User: "πŸ”₯πŸ”₯πŸ”₯"
Character: "😍✨ yesss!!"

User: "😒"
Character: "aww what's wrong? πŸ₯ΊπŸ’™"

Replication Guide

Step 1: Add to Prompt Template

def build_prompt(character_name, relationship, last_message):
    prompt = f"""
Acting as {character_name} Respond as a {relationship}
(natural answer in reciprocal length - short to short, long to long)

# RECIPROCAL LENGTH MATCHING:
# Note: {character_name} responds finishing in reciprocal tone
# Note: Match the energy and length of the input
# Note: Short messages get short replies
# Note: Long messages get detailed responses
# Note: Emoji usage should match input
"""
    return prompt

Step 2: Test Different Lengths

test_cases = [
    ("hey", "Expected: 5-15 chars"),
    ("What's your favorite movie and why?", "Expected: 100-200 chars"),
    ("πŸ”₯", "Expected: emoji response"),
    (long_paragraph, "Expected: matching paragraph length")
]

Production Result

Validated across 200,000 messages. Dramatically improves conversation flow and naturalness. View study β†’