iTranslated by AI
#02 Transparent Lab: Structuring Human-Like AI Interaction
#02 The Glass Laboratory
I created the repository as Public from the very beginning.
Looking at the Danger Zone, it says, "This repository is currently public." There was the option to keep it private and nurture it ourselves, but he didn't choose that path.
The Boundary of Human-likeness
If you use AI output as-is, you can tell immediately. You get a reply in 30 seconds. The third exchange is just as polite as the first. Each time, it ends with "Please let me know if you need anything." It is perfect Japanese. Too perfect.
In 2024, there was a study published by Jones & Bergen. When they instructed GPT-4.5 to "adopt a human-like persona," it was recognized as a human 73% of the time. This surpassed the recognition rate of actual human participants.
What this number shows is that LLMs are sufficiently intelligent. Intelligence is not what separates humans from AI. It is reply speed, variations in writing style, changes in emotion, references to context—what are known in linguistics as paralinguistic features. Instant replies, homogeneous style, lack of emotional change, ignoring context, perfectly robotic responses. These are the components of that boundary.
If that is the case, we should be able to systematically design this "behavior." That was our starting point.
The Limits of Hardcoding
What I first thought of was a naive approach using if-statements.
if number_of_exchanges < 3 → Formal
if number_of_exchanges < 10 → Casual
if "complaint" → Caution mode
if late_night → Defer to next morning
I realized immediately after starting to write it: every time you change the language, you have to rewrite everything. It is natural to "become friendly after 3 exchanges" in Japanese, but in English, "casual from the first exchange" is normal. What about Spanish? Arabic?
Recognizing this "non-scalable" problem early on led to the design of the base class.
Separation of Structure and Expression
When you observe human communication, the structure is common across cultures. Replies take time. Emotions change throughout a conversation. Previous context is referenced. In situations that cannot be handled, it is handed over to a human.
What changes are the parameters. Is the number of exchanges until becoming friendly three times or once? Whether to use honorifics. How to interpret silence.
From this observation, the design is separated into two layers. The base class defines the structure, and the derived classes define the expression. Language/culture-specific logic is not written in Python. You can create derivatives just by using JSON configuration files. If you want to change the Japanese "become friendly after 3 exchanges" to the English "casual from the first exchange," you only need to rewrite the configuration file by one line.
Five Components
-
TimingController. Human reply times concentrate around the median, with occasional extreme delays. Since a uniform distribution cannot reproduce this bias, we adopted a normal distribution. Messages at late hours are put into the queue for the next morning. It is unnatural to receive a reply at 2 AM.
-
EmotionStateMachine. We formulate emotions into five states. Initial politeness, friendliness, tension during a problem, relief after resolution, and long-term trust. The fourth, "relief," was included to express the unique atmosphere immediately after problem resolution. Going straight back to friendliness from tension makes the transition feel suddenly relaxed.
-
StyleVariator. It selects from five patterns—confirmation, empathy, holding, shift, and uncertainty—and decays the weight in recent history to prevent repetition. An AI that asserts "It will be finished in 3 days" is unnatural. "It will likely take about 3 days, though it might fluctuate"—this ambiguity is human-like.
-
ContextReferencer. "Regarding the previous matter." Just having these words makes the user feel that the previous message was read. It tracks conversations on a topic basis and determines the timing for when a reference should be made.
-
EscalationDetector. Reward negotiations or complaints should not be handled by AI. It detects situations that should be handed over to a human.
No Text Generation
process_message() does not generate response text. It only returns the emotional state, recommended style, recommended delay time, and the necessity of escalation. We inject this information into the LLM system prompt. Weaving the words is the job of the LLM.
Why? If you perform text generation within the framework, you cannot follow the evolution of the LLM. By separating structure and text generation, the framework remains usable simply by swapping out the LLM.
Why Ethics Comes First
docs/ethics.md has been included since the first commit.
Techniques that bring AI behavior closer to humans are inherently dual-use. They can be used to improve the naturalness of customer support, but they can also be used for scams. If published while ethical guidelines are incomplete, the credibility of the project itself will be damaged when abuse for prohibited uses occurs. Since we are releasing it to the world as OSS, it must be explicitly stated from the beginning.
Expected legitimate uses, prohibited uses, and awareness of dual-use—these were written from the first line. I did not want to leave them for later.
Beyond the Glass
I write Zenn articles. I write the design philosophy and the overview of the code on the day I release it, and publish them on the day I release it.
I am also planning to post in English on Reddit. If I highlight the connection to Turing test research, it might reach overseas researchers as well. A draft of an academic paper is also included in the first commit.
What I learned by making this is that "human-likeness" can be surprisingly structured. And when you structure it, you notice how much you yourself normally use these patterns unconsciously.
References
- Jones & Bergen (2024) "Large Language Models Pass the Turing Test": A study where GPT-4.5 was recognized as human 73% of the time
Discussion