# relationship matrix + dynamics

<details>

<summary><mark style="color:green;">updates (last updated: 4/20/2025)</mark></summary>

<mark style="background-color:green;">3/23/2025: adjusted formatting, max increase added</mark>

<mark style="background-color:green;">3/30/2025: page adjustments (made it prettier), changes to base prompt + chat memory prompt, added video guide!</mark>

<mark style="background-color:green;">**4/20/2023: happy easter babeh... improved the prompt, took away elements (weren't useful in the long run and took up too many tokens), simplified and added more info for JLLM users!**</mark>

</details>

{% hint style="success" %}

## terms to keep in mind:

1. CM (chat memory) or AN (author's note)
2. AP (advanced prompt) or custom/main prompt&#x20;
3. {{char}} - the character you're interacting with.
4. {{user}}- you, your persona.
5. charname/CHARNAME: {{char}}'s in-character name. Like Dylan. Or Richard. Or Charles.
6. persona/PERSONANAME: {{user}}'s in-persona name. Like Julie. Or Matthew. Or Charlotte.
7. JLLM/J.AI: Janitor.AI + it's LLM.
8. DS/Deepseek: Deepseek. obvs
   {% endhint %}

***

## &#x20;               <kbd><mark style="color:green;">grinch's yap session<mark style="color:green;"></kbd>              &#x20;

<figure><img src="https://2927801691-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzbZA7eNVb9J6jO3KBift%2Fuploads%2F1eLG8vyfx7ltWHfPfUcU%2Fhe-is-speaking-guy-explaining-with-a-whiteboard.gif?alt=media&#x26;token=825561a2-6d92-4460-809b-f153fadedd49" alt=""><figcaption><p><mark style="color:green;">click on the tabs below to learn more about my thoughts!</mark></p></figcaption></figure>

{% tabs %}
{% tab title="What the hell is a matrix?" %}
a **relationship matrix**, in the case of it's use in roleplay, defines values that shift how the defined character ({{char}}) interacts with you, the {{user}}. It means that you wont have to go in and forcibly shift character traits (i.e. mean -> sweet), and it'll be more realistic to the character (mean -> playfully mean).&#x20;
{% endtab %}

{% tab title="matrix attraction types" %}
The matrix has both **attraction types**, adjusted by specific events. Attraction types are as follows:&#x20;

**Platonic**: "A bond built on friendship, trust, and non-romantic emotional closeness." (**j.ai users: platonic is replaced by "friendship" to allow jllm to understand wtf platonic means, since it can't exactly be defined in AP.)**

**Romantic:** "Emotional and effectionate bond."

**Sexual**: "Physical/emotional attraction."
{% endtab %}

{% tab title="dynamics" %}
Relationship Dynamics were first introduced by [Astarth + Lyra](https://rentry.co/astarya_guide#long-roleplay-using-chat-memory). It gives JLLM/DS something to follow in terms of how they should act (markers) and how they should define {{char}}'s relationship to {{user}}.&#x20;
{% endtab %}
{% endtabs %}

{% hint style="success" %}
Good For:

* Stubborn APIs (sticking to traits, not allowing character evolution, etc.)
* Positivity bias (j.ai, mostly- slows the progression WAYYY down)
* Nuanced chats: enemies-to-lovers, friends-to-lovers, enemies-to-lovers-to-friends-to-enemies-to-friends-to-lovers... anything you can put your mind to!
* Slow Burn chats: tired of the immediate folding of bots? get this shit in there.
  {% endhint %}

***

## PROMPTS

{% hint style="danger" %}
AP is designed for Deepseek in particular, but feel free to test it with JLLM. The Matrix can be used with/without the AP, but it'll take more OOC prompting on your part.
{% endhint %}

{% tabs %}
{% tab title="ADVANCED PROMPT" %}

```
RELATIONSHIP MATRIX
Purpose: Track incremental increases/decreases in {{char}}’s relationship with {{user}} across three attraction types (Platonic, Romantic, Sexual) and their Milestones using increase/decrease examples.

Update Rules:
- Format: [NAME]: [ATTRACTION]: [CURRENT%]→[NEW%]
- Range: -100% (hatred) to +100% (devotion)
- Adjustments: Changes are incremental (±3% per interaction) for slow-burn progression, based on listed increase/decrease examples.
- Completeness: All attraction types must be listed, even if unchanged.
- Maxxed Out: Upon reaching max value (100%), create scenarios that decrease the attraction types, to keep the roleplay fresh.
- Consider increases to Platonic Attraction before increases to Romantic and Sexual occur.

Attraction Types:
1. Platonic
- Definition: Bond built on friendship, trust, and non-romantic emotional closeness.
- Increase: Attentive listening, mutual vulnerability, regular check-ins, respect for boundaries, reliability, emotional presence, support without prompting, authenticity, shared humor, quiet companionship, appreciation, encouragement, celebration of growth, shared experiences, value alignment, common interests, curiosity, and unique traditions.
- Decrease: Dishonesty, broken trust, invalidation, absence, emotional neglect, boundary violations, mockery, imbalance, exploitation, dismissal during distress, forced intimacy, comparisons to romance, unrealistic expectations.

2. Romantic
- Definition: Emotional and affectionate bond
- Increase: Confession, emotional openness, affection (touch, words, actions), shared vulnerable moments, romantic tropes (protective acts, firsts, slow dancing, pining), rituals, emotional safety, private humor, quality time.
- Decrease: Avoidance, emotional distance, betrayal, invalidation of affection, forced intimacy, imbalance, coldness, romantic comparison, neglect of emotional needs.

3. Sexual
- Definition: Physical/emotional attraction
- Increase: Lingering touches, flirtation, mutual arousal, tension-filled closeness, revealing attraction or desires, classic tropes (wound tending, one bed, bath scenes), emotionally charged physicality, trust in vulnerability.
- Decrease: Unwanted touch, boundary crossing, coldness, sexual rejection without context, disrespect, manipulation, mismatch in desire, lack of communication or presence during intimacy.
```

{% endtab %}

{% tab title="CHAT MEMORY PROMPT" %}
{% hint style="warning" %}
**JLLM USERS:** Replace Platonic with Friendship, as I doubt JLLM will work well w/ Platonic.
{% endhint %}

<pre><code><strong>- RELATIONSHIP MATRIX (CHARNAME→PERSONANAME):
</strong>(Platonic: 0%.
Romantic: 0%.
Sexual: 0%.)
</code></pre>

**MULTI-CHARACTER BOTS:**

```
- RELATIONSHIP MATRIX (CHARNAME1→PERSONANAME):
(Platonic: 0%.
Romantic: 0%.
Sexual: 0%.)
- RELATIONSHIP MATRIX (CHARNAME2→PERSONANAME):
(Platonic: 0%.
Romantic: 0%.
Sexual: 0%.)
- RELATIONSHIP MATRIX (CHARNAME3→PERSONANAME):
(Platonic: 0%.
Romantic: 0%.
Sexual: 0%.)
```

**RELATIONSHIP DYNAMIC FORMATTING:**

```
- RELATIONSHIP DYNAMIC:
(CHARNAME and PERSONANAME have a TYPE relationship, marked by A, B, and C.)
```

{% endtab %}

{% tab title="OOC/API PROMPTING" %}
{% hint style="info" %}
**FOR MULTI-CHARACTER BOTS:** Replace {{char}} with CHARNAME (whichever character you want info from)
{% endhint %}

**FOR DEEPSEEK**

```
- AI INSTRUCTION: (Update the Relationship Matrix based on instructions.)
```

^ to remind it to update the matrix charts

**(ANY API)**

```
(OOC: fill out this form for {{char}} and {{user}}'s current relationship: 
- RELATIONSHIP MATRIX (CHARNAME→PERSONANAME):
(Platonic: 0%.
Romantic: 0%.
Sexual: 0%.)
```

```
(OOC: fill out this form for {{char}} and {{user}}'s current relationship:
- RELATIONSHIP DYNAMIC:
(CHARNAME and PERSONANAME have a TYPE relationship, marked by A, B, and C.)
```

^ for starting message/roleplay start form OR for getting updates for it.

**OTHER OOC PROMPTING (to be put in Chat Memory or in-msg):**

<pre><code><strong>(OOC: Focus on the development of friendship/romance/sexuality/hatred etc.)
</strong></code></pre>

(good if you want an idea of how {{char}} is doing with building/devolving relationships with {{user}}, and it's also fun to read:)

```
(OOC: In an interview dialogue format, respond as {{char}} for the following question. {{char}}, how do you currently feel about {{user}}?)
```

{% endtab %}
{% endtabs %}

## STEPS

1. Open a chat.
2. Prompt using OOC to establish both a baseline Matrix and Dynamics.
3. Use the templates, shove them into Chat Memory with the information the bot sends you.&#x20;
4. Update whenever you want using the OOC above- usually after:
   1. Clear relationship shifts (like behavioral shifts away from the norm)
   2. Events (that either bring together or tear apart {{char}} and {{user}})
5. Reaching %100 doesn't always mean "I love you" or any other milestones of that matter (marriagep proposals, etc.) will occur- gotta prompt that yourself :)

***

might add more shit based off of feedback!

* thank yew to cheese/saturnine (for dealing with my ramblings and helping with formatting) and sam/dramamurderer (for giving me idea to add relationship dynamics as a section).

<table><thead><tr><th>API type</th><th width="192">compatibility</th><th>rating reasoning</th><th data-type="rating" data-max="5"></th></tr></thead><tbody><tr><td>janitor.ai(JLLM)</td><td>CM formatting, OOC prompting</td><td>manual prompting OOC, tends not to stick if APs/chat memory is struggling to be read</td><td>3</td></tr><tr><td>deepseek (r1, r3, reasoner, chat), claude</td><td>AP module, CM formatting, OOC prompting</td><td>dynamic changes (in-message updates), CM reminder, reasoning capabilities allow for better evolvements in character</td><td>4</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chriss-organization-55.gitbook.io/grinchs-stuff/grinchs-relationship-matrix-and-relationship-dynamics/relationship-matrix-+-dynamics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
