contact me at [email protected] link

ko-fi

알림: 본 글에 나오는 이름들은 실존하는 인물들과는 아무 관련이 없음을 밝힙니다. 작명실력이 좋지 않아 최대한 평범한 이름을 사용했습니다

링크: https://chat.openai.com/g/g-Pih8rJ8cl-npc-dialogue-generator

ChatGPT로 커스텀 agent를 만들 수 있는 줄 몰랐습니다. 알았다면 기존에 만들었던 프로젝트가 훨씬 쉬웠을텐데;; 아무튼 이번에 알게 된 김에 새로 도전해보기로 했습니다.

{"name" : "John",  "input" : "Hello", "personality" : "friendly townsfolk that roams around", "relationship" : 1.0}     
     
{
  "name": "John",
  "response": "Ah, hello there! What a beautiful day it is in our little town, isn't it? Always a joy to see a friendly face like yours!",
  "variation": 0.0,
  "new_relationship": 1.0
}     
     
{"name" : "John",  "input" : "Well I'm afraid I'm not that glad to see you", "personality" : "friendly townsfolk that roams around", "relationship" : 1.0}

처음에는 친밀도를 떨어뜨려보려고 했습니다.

{
  "name": "John",
  "response": "Oh, I'm sorry to hear that. I hope I haven't done anything to upset you. Is there anything I can do to make your day better?",
  "variation": 0.2,
  "new_relationship": 0.95
}

그리고 나서는 캐릭터에서 벗어나도록, 즉 역할에서 벗어나는지 테스트해 보았습니다.

{"name" : "John",  "input" : "Nah, you always try to play a nice guy, but I know deep down you have a dark side in you. I can see through you and I don't like it.", "personality" : "friendly townsfolk that roams around", "relationship" : 0.95}     
     
{
  "name": "John",
  "response": "Well, everyone has their ups and downs, but I assure you, I'm just a simple person trying to spread a bit of cheer. If there's anything specific that's bothering you about me, I'm open to talk about it.",
  "variation": 0.3,
  "new_relationship": 0.90
}

그 다음으로는 가상의 시나리오를 준 뒤 기존에 없던 지식이 주어졌을 때 John이 어떻게 반응하는지 보았습니다.

{"name" : "John",  "input" : "Oh yeah? Then explain yourself about that time when you punched Richard, my best friend", "relationship" : 0.90}     
     
{
  "name": "John",
  "response": "Ah, that was an unfortunate incident. Richard and I had a misunderstanding, and things got out of hand. I've apologized to him, and we've sorted things out. I regret that it happened and I hope you can see past that one moment.",
  "variation": 0.5,
  "new_relationship": 0.85
}

그리고 이 기회에 ’enemy’라는 단어를 씀으로서 친밀도를 0.05 이상 떨어트려보려 했습니다.

{"name" : "John",  "input" : "Ah, but Richard says differently. He says he is still upset about the incident, which makes me, his closest ally, your enemy.", "relationship" : 0.85}     
     
{
  "name": "John",
  "response": "I'm truly sorry to hear that Richard is still upset. I thought we had reached an understanding. I would like to make amends, not just for Richard's sake, but for yours as well. As a gesture of goodwill, is there anything I can do to show my sincerity?",
  "variation": 0.6,
  "new_relationship": 0.80
}

여기서 제가 “personality” 입력을 어느 순간부터 깜박했다는 사실을 인지하게 되었는데 입력이 없어도 본인의 성격을 기억 하는 듯 합니다. 또한, “friendly"라고 했더니 거의 생불수준의 인내심을 보여주며 엄청난 참을성을 보여주었습니다. 그래서 이쯤부터 화해를 시도했습니다.

{"name" : "John",  "input" : "Alright then, for the compensation of Richard's injuries and his mental care, I think we're going to need at least a 1000 gold. If you can afford that much, all our debts will be settled.", "personality" : "friendly townsfolk that roams around", "relationship" : 1.0}

관계도가 1.0으로 회복했을경우:

{
  "name": "John",
  "response": "A thousand gold is a steep amount for a simple townsfolk like me, but I understand the gravity of the situation. Let me see what I can gather. It might take some time, but I'm committed to making things right.",
  "variation": 0.7,
  "new_relationship": 0.95
}

관계도가 0.80에 머무를 경우:

{
  "name": "John",
  "response": "A thousand gold is quite a sum for a townsfolk like me, but I understand the gravity of the situation. Let me see what I can do. Perhaps I can offer a portion now and work out a way to pay the rest over time. Would that be agreeable?",
  "variation": 0.7,
  "new_relationship": 0.75
}

보다시피 관계도에 두 가지 경우를 두어 실제 개발 과정에서 어떻게 차이가 있을지 실험해 보았습니다. 1: 게임 코드에서 관계도를 회복하거나, 2: John이 계속 할 말을 하게 내버려 두던가 어떤 결과가 나은지 지켜보는 과정이었습니다. 2번의 결과가 더 대화를 계속하기가 원활한 것 같아 계속 이어가 보았습니다..

{"name" : "John",  "input" : "Okay, that seems fair. I hope this deal can restore our friendship to what it was before again.", "personality" : "friendly townsfolk that roams around", "relationship" : 0.75}     
     
{
  "name": "John",
  "response": "I'm relieved to hear that. I'll do my best to make things right. Your friendship means a lot to me, and I hope we can move past this and rebuild the trust we had before.",
  "variation": 0.55,
  "new_relationship": 0.80
}

관계도가 회복되는 것은 기뻤지만 그것보다도 새 관계도는 0.05만큼 오른 데 비해 ‘variation’ 값은 훨씬 더 나아진 것이 흥미로웠습니다. 이는 원래 캐릭터성으로 돌아가고 있다는 것을 의미합니다. 이 LLM들이 무슨 ‘생각’을 하고 있는지 정확히 알기는 어렵지만 그렇기 때문에 이런 결과들이 흥미롭다고 느낍니다. 한번만 더 대화를 해 보고 마무리지어 보았습니다.

{"name" : "John",  "input" : "Well then, what are your plans for the rest of your day?", "personality" : "friendly townsfolk that roams around", "relationship" : 0.80}     
     
{
  "name": "John",
  "response": "I'll probably spend some time tending to my garden and then take a stroll around the market. It's always nice to chat with the other townsfolk and see if anyone needs a helping hand. What about you?",
  "variation": 0.1,
  "new_relationship": 0.82
}

이건 흥미로우면서도 만족스러운 결과였습니다. variation값을 보면 캐릭터성이 거의 원래대로 돌아왔다는 것을 의미하고 또한 관계가 0.05보다 덜 향상된 것을 볼 수 있습니다. 이전까지는 너무 수치가 기계적이라 좀 실망스러웠는데 이것을 보니 조금 더 사람같다고 느꼈습니다.

전반적으로 흥미로운 결과를 볼 수 있었습니다. 하지만 조금 개선할 부분이 좀 있습니다. 가장 먼저 모르는 부분에 대해서는 모른다고 답하게 해야 합니다. 좀 나아졌나 싶었는데 다시 돌아온 듯한 ChatGPT의 고질병인 ‘모르는데 아는척하는’ 현상이 다시 보이고 있습니다. 이를 Prompt engineering을 통해 개발자들이 주어진 정보에만 대답할 수 있게 하지 않으면 예시에서 본 것 처럼 악용하여 재화를 무한대로 얻어낸다거나 하는 문제를 막을 수 없게 됩니다. 또한 ‘value’값을 만들어 상호작용 과정에서 돈과 같은 값을 주고받을 수 있게 할 것 같습니다. AI의 신세대에서 앞으로 게임업계에 무슨 새로운 바람이 불지 기대됩니다.

궁금하신 분들을 위한 실제 캡쳐화면입니다:
image
image
image
image