iTranslated by AI
Connecting via "Soul" instead of Specs: Intro to ZAX, a Matching Platform for Self-Transformation and Happiness through Interpersonal Data
Introduction
I participated in Google Cloud Japan AI Hackathon vol.4 and developed "ZAX," a matching platform themed around the resonance of values and mutual growth.
Matching based on "specs" such as annual income or educational background might bring temporary peace of mind. However, isn't what we truly seek not such consumable happiness, but "self-transformation" itself—where we update ourselves through interactions with others?
ZAX is engineering designed to discover a new self from interpersonal data and pursue essential happiness by leveraging Google Gemini's advanced reasoning capabilities and pgvector's search technology.
First, please take a look at the actual operation demo.
In this article, I will explain the technical side of how we implemented the "Evolutionary Loop (the cycle of self-transformation)" introduced in this video.
Product Overview: What is ZAX?
ZAX is a system where AI suggests partners who maximize mutual growth by vectorizing the user's inner essence.
As explained in the video, it consists of the following three core functions:
50-Question Psychological Diagnosis × Gemini: Generates a "6-dimensional essence vector" from responses, and Gemini creates a detailed analysis report.
Complementarity Matching: Prioritizes searching for people who "complement oneself and encourage growth" rather than just similar people.
Evolutionary Loop: Gemini analyzes feedback after a dialogue and updates the user's own vector.
Tech Stack (Architecture)
We integrated Google Cloud's AI technology and vector search into a modern Next.js stack.
System Overview: Next.js acts as a BFF (Backend For Frontend), orchestrating the Gemini API and PostgreSQL (pgvector).
Frontend/Backend: Next.js (App Router), TypeScript
AI Model: Google Gemini Pro, text-embedding-004
Database: PostgreSQL + pgvector
Infrastructure: Cloud Run / Vercel
Technical Ingenuity
Let's dive deeper into the "technical focus" mentioned in the video at the code level.
1. Recommending Diverse Others via "Complementarity Scores"
Happiness in ZAX is not just about "comfort." Believing that "pleasant friction" is what generates growth, we implemented an algorithm that assigns the highest evaluation to partners with a similarity of around 0.5 (a moderate distance).
// src/lib/rec/engine.ts
export function calculateComplementarityScore(userVec: number[], targetVec: number[]): number {
const sim = cosineSimilarity(userVec, targetVec);
const optimalDistance = 0.5; // "Growth sweet spot": neither too similar nor too distant
// Calculate growth potential using a Gaussian function peaking around 0.5
const growthPotential = Math.exp(-Math.pow(sim - optimalDistance, 2) / 0.1);
return growthPotential * 100;
}

2. Ensuring the Reliability of Psychological Measurement (Reverse Items and Validation)
To improve AI analysis accuracy, the quality of input data is vital.
In ZAX's diagnosis (50 questions), "Reverse Items" are introduced to prevent acquiescence bias—where users might continuously answer "Yes" without thought.
Regular Question: "I like partying in large groups" (Yes = Extroverted)
Reverse Item: "I value time spent quietly alone" (Yes = Introverted = Decrease in Extroversion score)
During aggregation, these scores are correctly inverted, and the vector's dimensionality (6 dimensions) is validated before being saved to the database (pgvector).
3. Evolutionary Loop: Interpersonal Data Updates You
This is the implementation of the "changes after dialogue" introduced in the latter half of the video.
In ZAX, Gemini analyzes the reflection (Reflection) and calculates the "Delta" (difference) from the current vector.
// src/lib/gemini.ts
export async function calculateDeltaVector(feedback: string, currentVector: number[]) {
const prompt = `
Current vector: [${currentVector.join(", ")}]
Dialogue feedback: "${feedback}"
Task:
1. Analyze what kind of "fluctuations" or "convictions" were created in the user's values through the dialogue.
2. Based on that, calculate the "Delta" (amount of change) for the 6-dimensional vector.
3. Output the new vector after the change in JSON.
`;
// ... logic
}
By doing this, "who you met and how you changed" is visualized, allowing users to stay committed to their own growth.
The Essence of Gemini Prompt Engineering
To make the AI not just a "tool" but a "guide" that encourages user growth, we designed the following prompt structure.
Achieving "Depth" While Suppressing Hallucinations
For the generation of personality analysis reports, we adopted a three-layer instruction structure:
- Persona Definition: A dispassionate observational eye as a "professional psychological analyst."
- Infusion of Empathy: Using a "warm yet assertive tone" so that users can affirm their own characteristics.
- Promotion of Metacognition: Mixing in questions that make users think about "what they want to change" after seeing their data.
Future Prospects
Future Outlook: The Human Complementarity Project Starting from a Personal Will
While ZAX currently operates based on static vector matching, our vision does not end here. I personally have a habit of writing a "will" every day. This is not preparation for death, but rather a process of recording high-purity self-data regarding what I felt and valued today, creating a dataset for future self-analysis through deep learning.
By extending this philosophy to ZAX, we have mapped out the following roadmap:
-
Personalized LLM for Each User
Moving beyond current analysis reports, we will provide each individual with a completely independent LLM that performs Continual Learning on their personal thinking patterns and daily "wills" (logs). Through this, ZAX evolves from a mere tool into a user's digital twin (another self). -
Virtual Face-to-Face Simulation Between Models
My model and your model will interact in cyberspace while we are asleep. "What would happen if these two people met?" The models will simulate infinite conversation patterns and predict the "chemistry" in advance. By feeding the results back to the individuals, we create a cycle that encourages actual behavioral changes in reality. -
Knowledge Distillation from Individuals to the Whole
Data on interpersonal successes and failures gathered by each individual's model will be integrated—while preserving privacy—to train the overall ZAX "mother model." The growth of the individual raises the baseline for collective intelligence, and those benefits are returned to the individual once more. This cycle is the key to achieving true Collective Intelligence. -
Toward an OS for the BMI (Brain-Machine Interface) Era
Language is merely a compression of thought. In a future where BMI technologies like Neuralink become widespread, ZAX aims to be a platform for resonating directly with others at the level of brainwaves and consciousness, bypassing words. To prove and accelerate the intuition of "being attracted to someone for an inexplicable reason" through engineering—that is the ultimate goal of ZAX.
Summary: A "Different Happiness" Presented by ZAX
In contrast to conventional AI applications aimed at efficiency, ZAX uses AI to "make humans hesitate, think, and transform."
Committing to self-updates based on interpersonal data, the combination of Google Gemini and pgvector has made it possible to implement the "resonance of souls"—something that should be unquantifiable—through solid technology.
Please take a moment to watch the demo video and experience the worldview of ZAX.
Discussion