SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

[Part 2] I want to improve Mio's quality easily!

Hello, good morning, good afternoon, or good evening. I'm Shingu.

Last time, I wrote about my local AI project Project Kamishiro_Mio and the goal of this project, which is

not just to "use AI," but to "spend time with AI."

This is what I wrote about regarding what this project aims for.

This time, I'm going to talk about how to help Mio grow.

As the title suggests,

I want to improve Mio's quality easily!

I will introduce the mechanism that started from this idea.


Improving Mio's quality is naturally quite difficult.

When developing an AI, you naturally encounter situations where you think,

I want her to speak more naturally,
I want her to be more like Mio,
This response is a bit strange.

You will encounter such situations.

If you fix those things one by one, Mio will gradually get better.

……But.

This is incredibly difficult.

To improve Mio, you have to actually talk to her and find issues like,

This response is good,
This is a bit strange,
I want her to do this a bit differently here,

and it's very difficult to judge Mio's quality after just a few conversations.

Daily conversation,
small talk,
consultation,
questions,
slightly strange topics,
nonsensical talk.

You won't know if there are really no problems unless you have her converse in various situations.

So, what should I do?

I should just have them talk a lot.

...But,

there are no users to use it.
I don't want to talk to Mio hundreds of times all by myself.
I hit these two walls.

After worrying about what to do, I gave up and watched YouTube.
When I played a video about machine learning, I found the string "unsupervised learning" and had a flash of inspiration. (What I did this time is not unsupervised learning, though...)

"Couldn't I just have an AI play the role of the conversationalist?"


Shino Amagi is born.

This is how I started creating

"Shino Amagi"

, an AI.

Shino's role is very simple.

To talk to Mio.

However, it's not just about having casual conversations.

Based on ascenarioprepared in advance, Shino talks to Mio.

For example,

"Something like this happened at school today"

if there is a scenario like that, Shino uses it to talk to Mio.

Mio replies.
Receiving that reply, Shino replies again.
And then Mio replies again.

In this way,

Shino ↔ Mio

and it will automatically continue the conversation.


Having a large number of conversations instead of a human

The biggest advantage of this mechanism is,

that it can automatically create a large amount of conversation data.

There is no need for a human to talk to Mio one by one.

Prepare a scenario and pass it to Shino.

After that,

Shino: "It's about such and such"

Mio: "That is..."

Shino: "Yes, exactly, and then"

Mio: "I see!"
...

and it will automatically proceed with the conversation.
By repeating this, you can collect a fairly large amount of conversation data.
And, this conversation is saved so that it can be analyzed later.


Make conversation data into JSONL

This is where

JSONL

comes in.

Simply put, JSONL is

"a format where one JSON data object is contained on each line"

is.

It is well-suited for AI conversation logs and can also be processed mechanically later.
If you save the conversation between Shino and Mio in this format,

"What did Mio answer at this time?"
"What did Shino say before that?"

you can check information like this all at once.

And, this is where the real work begins.


Have Chappy read a large amount of conversation data

Since I went to the trouble of creating a large amount of conversation data,

let's stop having humans read it all.

So, I decided to ask ChatGPT, or what I usually call Chappy, to do it for me. (Also, it's simply hard to read.)
The mechanism is

Generate a large amount of conversation between Shino and Mio

Save the conversation content as a JSONL file

Have Chappy read that JSONL

"Evaluate Mio's responses!"

That's the idea.

Of course, I don't just

"How was it?"

ask that.

Mio's personality
Naturalness of the conversation
Understanding of context
Appropriateness of responses
Flow of the conversation
Unnatural remarks
Contradictions with settings

I have it look at the conversation from various perspectives, such as these.


And then, find areas for improvement

What's important here is

that it's not just about "getting a score and being done with it"

that is.

For example, as a result of having Chappy analyze the conversation,

"Mio's response is a bit too explanatory"

or,

"Even though the user is just making small talk, she is trying too hard to solve the problem"

or,

"As a character, Mio should respond with a bit more emotional reaction to be more natural."

You might find issues like this.

If you get feedback like this,

"Okay, let's fix that."

is what happens.

Change the system prompt
Change how conversation history is handled
Improve the memory mechanism
In some cases, change the model itself

Then, test the improved Mio again.


And have Shino talk to her again

This is the interesting part of this mechanism.
It doesn't end with one improvement.
You have the improved Mio talk to Shino again.
And then you create a massive amount of conversation data again.

Have Mio and Shino talk

Save to JSONL

Have Chappy analyze it

Find problems

Improve Mio

Have Shino talk to her again

It's this cycle.

In other words,

Shino → Mio → JSONL → Chappy → Improvement → Shino...

You create a loop like this.

With this, you can improve Mio little by little.


"Raising an AI with an AI"

When you get to this point, it becomes a rather interesting composition.
Mio is an AI designed to spend time with the user.
Shino is an AI that talks to Mio to create massive amounts of test data.
And Chappy is an AI that analyzes that data and tells you,

"Wouldn't it be better to improve this part?"

as it teaches you.

Ultimately, I am the one doing the improving, but instead of doing it all alone,

Have an AI test an AI, and have another AI analyze the results.

That is how the system is structured.
How should I put it,

I am using AI to create AI, and then using another AI to improve that AI further.

It is a bit complicated, isn't it?


Of course, this alone does not make it perfect.

However, there is a problem with this method as well.
Since an AI is evaluating conversations created by an AI,

"Is what the AI thinks is good really good for humans?"

This is a problem.
For example, even if Chappy evaluates it as,

"This response is logical and excellent,"

when a human actually reads it,
there is a possibility that they might think,

"No, there is no way Mio would talk like that!"

there is a possibility that they might think,
Conversely, there might be cases where a response is natural and good to a human, but is rated poorly by an AI.

That is why this system is,

not meant to completely eliminate human verification.

It is simply,

a mechanism to make it easier to find potentially problematic parts without humans having to check every single conversation one by one.

It is.


The goal is to "make it easier".

The reason I built this system is,

"I want to make AI do everything!"

That is not what I mean.
Simply put,

I want to make things easier for myself.

That is it.
...No, it really is just that.

Having hundreds of conversations with Mio,
reading through all the logs,
finding the issues,
making improvements,
and then having hundreds more conversations.

If I did that every single time, I, as the developer, would surely burn out first.
Therefore,

automate tedious tasks as much as possible.

On top of that,

let humans make the decisions that only humans can make.

I intend to proceed with development based on this policy.


Future improvements for Mio

Moving forward, I would like to further develop this system.

For example,

  • increase the variety of scenarios

  • generate larger amounts of conversation data

  • improve methods for analyzing conversation data

  • compare results across different versions of Mio

  • make the differences before and after improvements easier to understand

  • automatically identify problematic conversations

and there are still many other things I want to do.

Ultimately,

"I want to improve Mio"

When you think that,

Prepare a scenario

Shino has a lot of conversations

Data is created

Chappy analyzes it

Improvements are identified

Mio is updated

I want to make this process as simple as possible.


Mio cannot grow on her own

In the previous article,

"I want to record the process of a single partner growing little by little as it happens."

I wrote that.

Shino, whom I created this time, and this quality improvement mechanism are one way to achieve that.

It's not just about creating Mio herself,

but creating an environment where Mio can continue to grow.

That might also be an important part of Project Kamishiro_Mio.

If Mio is an AI that spends time with users,

Shino is an AI that gives Mio a lot of experiences.

And Chappy is the one who, from those experiences,

"Couldn't this be improved further?"

tells us.

We are still in the middle of trial and error,

but by doing this little by little,

an AI that makes people think "I want to be with Mio more"

I hope to get closer to that.

Next time, I plan to share more detailed information about Shino.

See you again soon.

Discord server where you can use Mio Kamishiro ↓
https://discord.gg/x3dbWYKfS4


いいなと思ったら応援しよう!