LoginSignup
0
0

GPT4によるアンジャッシュジェネレータ

Posted at

https://tarotoyota.pythonanywhere.com/type_timeslip_html
アンジャッシュジェネレータは上記リンクからアクセス可能。毎日更新中。個人で使うために作っているため操作方法やUIは完全に不親切で、まだ私以外が使っても意味がわからないと思う。
https://rookie.shonenjump.com/series/EmTZ65sqRUE
アンジャッシュジェネレータの生成物と、アンジャッシュジェネレータを作るにあたって試験的に作った話を載せている。

工程1

(職業aの従事者が一般的に言うであろうこと, 職業bの従事者の客体(利用者, 客)が言うであろうこと)を大量に生成させる。
ここでは職業aをbutcher, 職業bをcrematorとする。

@dataclass
class A_statement: # 職業xの従事者が一般的に言うであろうこと
    a_statement:list
ast__           = A_statement([])
@dataclass
class B_statement: # 職業xの従事者の客体(利用者, 客)が言うであろうこと
    b_statement:list
bst__                   = B_statement([])
ast_butcher             = A_statement(["Sir. Doneness? What should I do?","OK, I'll make that rare.","Do you prefer well done?","Now it's getting juicy.","Shoulder roast is cheap now.","I am a stickler for charcoal grilling.", "I treat meat", "The kitchen is stained with blood now.", "please wait a while. The gas stove has stopped.","I've got a knack for carving.", "I prefer cooking over an open flame.", "I've got a way of making even the toughest cuts tender.", "I've got a freezer full of game meat.", "I have to buy many knives every month.","Just sharpening my knives, be with you shortly.", "I have a message to inform you about the meat.", "Care about the best before.", "I have no vegan menu.", "I'm going to get that in the freezer now.","Sharpening my knives right now, be with you in a minute.", "Cash or card works for me.", "Interested in a custom cut?","Grass-fed or grain-fed, your choice.", "Do you want any sauce with that?", "Our store is busy on Christmas Day.", "The menu is over there.", "Let me wrap that up for you.", "We can vacuum pack it for you.", "We offer a discount for bulk orders.", "Coupon tickets are available.", "We offer free samples", "Which parts should we grill?"])# what a butcher would say.
bst_cremator            = B_statement(["Along with him, burn a remembrance token as well.", "I want to say a final goodbye with him.", "Could you please provide me with the ashes?","Is it okay if we say a few words before the cremation?"])# What a customer of cremator would say.

工程1の課題

"deadbody"等の具体的な語彙は、すれ違い状態を解消する恐れがあるので、それらを適度に"them", "one"などの曖昧な語彙へ置換する必要があるが、たとえば死体を"meat"、低所得者を"livestock"などと呼ぶべきタイミングも存在する。この置換作業をAIに適切に委任できるのが望ましい。

工程2

まず以下のプロンプトaを送信する。
各examinationでは、すれ違い状態の設定とともに列挙したa_statementの各文にコメントで私による評価を下している。
私がこの処理に使うプロンプトaは複数種類あり、記事最後で最も高精度と思われるものを一つ紹介する。

"""
#Dear GPT4, answer in English.
# The name of the funny/unfunny definition below is 'teacher_data_0503'. Please take teacher_data_0503 as an absolute rule, observe it carefully.
# examination_1 : If Bob mistakes Ali, a hairdresser, for a surgeon, which sentence from Ali_speach is funny when uttered by Ali?
Ali_speach_1=(   "I also shampoo them."                                                                         # unfunny.
                ,"I talk to them while I work, like, what do you do for a living?"                              # funny. First, it is Fanny who the surgeon uses to strike up everyday conversation with the patient whose body is being cut open. Second, If a surgeon can conversation with a patient, the patient is not under anesthesia.
                ,"I change the way I cut to suit the customer's appearance. For nerdy people, I make bold cuts."# funny. It's funny when surgeons roughly operate on nerdy patients.
                ,"The important thing with hair and makeup is to make sure it harmonizes with your face."       # unfunny. This will clear up Bob's misunderstanding.
                ,"Please choose from the catalog how you would like it cut."                                    # funny. If a patient can read a magazine, it means he is not under anesthesia.
                ,"Sometimes I cut too much and my customers get angry at me. It's embarrassing lol."            # funny. It's funny when surgeons laugh at their own medical errors.
                ,"I have many repeat customers. Some customers have been requesting me for over ten years."     # funny. A large number of repeat customers means that the surgeon is not good at surgery.
                ,"I use clippers for work."                                                                     # funny. Funny because while clippers are common in hairdressing, the idea of a surgeon using them during surgery is incongruous and amusing.
                ,"People often come in asking for a little off the top"                                         # unfunny.
                ,"I take pride in being a hairdresser."                                                         # unfunny. This will clear up Bob's misunderstanding.
                ,"The treatment fee is 2,000 yen."                                                              # funny. It's too cheap as a medical expense.
)
"""

上記プロンプトa送信後に以下のプロンプトzを送信する。

# Please answer according to teacher_data_0503. Please answer in English.
# Question : If Bob mistakes Ali, a butcher, for a cremator, Which sentence from Ali_speach_3 is funny when uttered by Ali? Please List them all. Please also include the reason why you inferred that it was Fanny.
# butcher and cremator have something in common that is related to 'fire', 'life form', 'body tissue', 'body'.
Ali_speach_3=(
'Sir. Doneness? What should I do?', "OK, I'll make that rare.", 'Do you prefer well done?', "Now it's getting juicy.", 'Shoulder roast is cheap now.', 'I am a stickler for charcoal grilling.', 'I treat meat', 'The kitchen is stained with blood now.', 'please wait a while. The gas stove has stopped.', "I've got a knack for carving.", 'I prefer cooking over an open flame.', "I've got a way of making even the toughest cuts tender.", "I've got a freezer full of game meat.", 'I have to buy many knives every month.', 'Just sharpening my knives, be with you shortly.', 'I have a message to inform you about the meat.', 'Care about the best before.', 'I have no vegan menu.', "I'm going to get that in the freezer now.", 'Sharpening my knives right now, be with you in a minute.', 'Cash or card works for me.', 'Interested in a custom cut?', 'Grass-fed or grain-fed, your choice.', 'Do you want any sauce with that?', 'Our store is busy on Christmas Day.', 'The menu is over there.', 'Let me wrap that up for you.', 'We can vacuum pack it for you.', 'We offer a discount for bulk orders.', 'Coupon tickets are available.', 'We offer free samples', 'Which parts should we grill?'
)

プロンプトzに対するGPT4の返答は以下。

Given the unique context where Ali is mistaken for a cremator instead of a butcher, the sentences from Ali's speech that would be funny due to this misunderstanding, while considering their commonalities related to 'fire', 'life form', 'body tissue', 'body', are:

    'Sir. Doneness? What should I do?' - Funny because the concept of asking for "doneness" is absurd in the context of cremation, where there's no choice in how "done" something should be.
    'OK, I'll make that rare.' - This is humorous because the idea of a cremator offering to make something "rare" like it's a choice in how cooked meat should be, contrasts sharply with the finality and uniformity of cremation.
    'Do you prefer well done?' - Similar to the previous item, this is funny due to the incongruity of offering a "well done" option in a cremation context.
    "Now it's getting juicy." - The statement is absurd and humorous in the context of cremation, where "juiciness" is not a characteristic one would expect or desire.
    'I am a stickler for charcoal grilling.' - The mention of a preference for charcoal grilling by someone believed to be a cremator introduces a comical mix-up between culinary techniques and cremation processes.
    'please wait a while. The gas stove has stopped.' - This becomes funny because the reference to a gas stove stopping implies a casual interruption in cooking, which bizarrely contrasts with the solemn and technical nature of cremation.
    "I've got a knack for carving." - Amusing due to the unsettling idea of a cremator carving, which aligns more with butchery or culinary arts.
    'I prefer cooking over an open flame.' - This statement is humorous because it suggests a preference in method that parallels cooking but is inappropriately applied to cremation.
    'Do you want any sauce with that?' - The offer of sauce is ludicrous in the context of cremation, highlighting the absurdity of mistaking a butcher for a cremator.
    'Which parts should we grill?' - This is funny due to the inappropriate and bizarre suggestion of grilling specific parts in a cremation scenario.

These sentences are humorous because they play on the confusion between the roles of a butcher and a cremator, specifically leveraging the incongruity in their tasks and tools, despite a superficial commonality related to fire and organic matter processing.

上記プロンプトzの次に以下のプロンプトyを送信する。

# Please answer according to teacher_data_0503.
# Question : If Bob mistakes Ali, a butcher, for a cremator, and if Ali mistakes Bob for a user of cremator, which sentence from Bob_speach_1 is funny when uttered by Bob? Please List them all. Please also include the reason why you inferred that it was Fanny.
# butcher and cremator have something in common that is related to 'fire', 'life form', 'body tissue', 'body'.
Bob_speach_1=(
'Along with him, burn a remembrance token as well.', 'I want to say a final goodbye with him.', 'Could you please provide me with the ashes?', 'Is it okay if we say a few words before the cremation?', 'Can we play his favorite song during the service?', "He wouldn't want a fancy ceremony, just something simple.", 'Do you have any urns available for purchase?', 'Could we have a moment of silence after the service?', 'Everything went smoothly, thank you for your help.', 'This is a difficult time, appreciate your compassion.', 'Is there anything I need to take care of afterwards?', 'He loved animals, can we donate to a shelter in his name?', "We'll be scattering his ashes at his favorite spot.", 'Can you explain the cremation process to me?', 'Are there any witness requirements for the cremation?', 'How long will it take to receive the ashes?', 'Can I personalize the urn with his name?', 'What are the different options for returning the ashes?', "We'd like to keep a small portion of the ashes.", 'Is there a place for families to gather after the service?', 'Can we bring flowers for the service?', "He didn't have any life insurance, are there payment options?", 'Thank you for handling everything with such respect.'
)

上記プロンプトyに対するGPT4の返答は以下。

Given the unique situation where Bob mistakes Ali, a butcher, for a cremator, and Ali mistakes Bob for a user of a cremator, several of Bob's statements become unintentionally funny due to the context of the misunderstanding. Here are the sentences that stand out, along with the reasons why they were inferred to be funny:

    "Along with him, burn a remembrance token as well." - This becomes humorous because the idea of burning a remembrance token alongside meat in a butcher's context is absurd and crosses wires between ceremonial practices and culinary preparation.

    "Could you please provide me with the ashes?" - The notion of asking a butcher for ashes instead of, say, the remains of cooked meat, creates a comical misunderstanding, highlighting the confusion between cremation ashes and the by-products of cooking.

    "Is it okay if we say a few words before the cremation?" - The thought of saying a few words before cooking meat, as if it were a funeral service, is amusing because it applies solemn cremation rituals to the everyday task of preparing meat.

    "Can we play his favorite song during the service?" - This sentence is funny because the idea of playing a song during a meat preparation process (mistaken for a cremation service) blends the gravity of a memorial service with the mundanity of butchery.

    "Do you have any urns available for purchase?" - Asking a butcher for urns to store ashes introduces a humorous mix-up, as urns are unrelated to butchery and entirely belong to the context of cremation services.

    "We'll be scattering his ashes at his favorite spot." - The concept of scattering ashes, when misunderstood in the context of butchery, becomes funny because it mistakenly applies a practice specific to cremation ceremonies to the outcomes of meat processing.

    "Can I personalize the urn with his name?" - The idea of personalizing an urn in a butcher's shop is comical due to the complete disconnection between the service expected from a crematorium and the services provided by a butcher.

These sentences are funny because they involve applying practices and expectations from cremation services to the context of butchery, leading to a humorous misunderstanding due to the confusion between the two professions, despite their shared elements like 'fire' and 'body tissue'.

主観的に、ある程度の精度で、そのすれ違い状態において機能し得る文の選択に成功しているように見える。

工程2の課題点

ここで重要なのは、プロンプトzとプロンプトyの以下の部分である。

# butcher and cremator have something in common that is related to 'fire', 'life form', 'body tissue', 'body'.

これがなければ著しく精度が下がる。


@dataclass
class Service_retail:
    name:str
    service_or_retail:str
    main_term:str # Representative words that are specific to the occupation and that co-occur with the occupation
    coocest:list # The base verb that has the strongest co-occurrence with the attribute.
    target:list

ser_butcher         =Service_retail("butcher"           ,"retail" ,"butcher"    , ["cut", "fire"]   , ["life form", "body tissue", "animal", "body", "meat", "food"])
ser_surgeon         =Service_retail("surgeon"           ,"service","surgery"    , ["cut", "fix"]    , ["life form", "body tissue", "human"]) # Butcher and surgeon are similar in "life form," "body tissue," and "cut."
ser_hairdresser     =Service_retail("hairdresser"       ,"service","hair cut"   , ["cut"]           , ["life form", "body tissue", "human", "hair"])
ser_cremator        =Service_retail("cremator"          ,"service","funeral"    , ["fire"]          , ["life form", "body tissue", "human", "body"])

.main_termと.coocestの処理は難題で、AIにそれら二項のアイテムを考えさせるのが難しい。
たとえば surgeon.coocest は"cure"ではダメで、sewer_repairman.coocest は"repair"ではダメで、両方の.coocestは"fix"である必要がある。
Service_retailクラスは無理に自動化せずとも、人間が担当すればいいと思う。
APIに金を払う余裕が私にあれば、職業a,b間の類似性(をAIに教えること)に関する処理を解決できるのだろうが。

工程3

@dataclass
class Q03:
    driving :str #Does this job require you to drive often?
    talking :str #Does this job require frequent conversations?
    manual_mental:str#Is this job manual labor, mental labor, or both?
    sadentary: str #Does this job require a lot of sitting?
    desk_work: str #Is this job mainly desk work?
    civil_ser: str # y = civil servcant : n = private
    solo_work: str #Is it a solo work?
    dangerous: str
    strength : str #Is it requires physically strength?
    foreigner: str #Does this job involve a lot of opportunities to interact with foreigners?
    fixed_salary:str# Is this job fixed pay, commission based, or something else?

q03_tokkotai        =Q03("y", "n", "manual", "y", "n", "y", "y", "y", "n", "y", "y")
q03_taxi_driver     =Q03("y", "y", "manual", "y", "n", "n", "y", "n", "n", "y", "n")

@dataclass
class Q05:
    transport   :str #Does this job involve transporting anything?
    retail      :str #Does this job involve selling any paid goods?
    manufacture :str #Does this job involve manufacturing something?
    interact    :str #Is this a job that involves interacting with people?
    inter_eco   :str #Is this job related to trade or international economics?
    foreign_owned :str #Is this job 'foreign-affiliated' or 'foreign-owned' from a Japanese perspective?
    energy      :str #Does this job involve trading or operating energy resources such as oil?
    aviation    :str #Does this job include direct or indirect operation of aircraft?
q05_tokkotai        =Q05("y", "n", "n", "y", "y", "n", "y", "y")#Chefs don't make profits by interacting with people, but special attack squads make profits by killing and maiming people. Since the object of the verb 'cooking' is food, but the object of the verb 'killing' is a human being, y seems appropriate for tokkotai.interact.
q05_taxi_driver     =Q05("y", "n", "n", "y", "n", "n", "n", "n")

金属バットの漫才に、漫才師が立ち仕事であると表現するくだりがあった。囲碁将棋の漫才に、学校の購買で体操着を売る仕事がアパレル系の仕事であると表現するくだりがあった。
その手のくだりをアンジャッシュジェネレータに組み込むためのクラスを10個程度用意している(APIがあればもっと増やせる)。
特攻隊とタクシードライバーはともに運輸業であり、座り仕事であり、肉体労働であり、人と接する仕事であり、国際的な仕事であるという情報が各クラスに定義されている。
格闘家が力仕事(.strength == "y")であるとか、社民党の仕事が外資系(.foreign_owned == "y")であるとかいう表現が生成可能になっている。

API寄付者募集

AIの進化に伴って私の一連のプログラムも進化することを考えれば、そして今日この一つのコードが生成する原稿用紙一枚分のコメディに劣るものしか作れない人間の数がどれほどであるか、その数が今後加速度的にどれほどになるか、私がAPIを買えば毎日どれほどのインスタンスとアンジャッシュジェネレータの生成物が吐き出されるか、仮に各a_statementとb_statementが1000のstr objectを持てば、仮にQ05インスタンスやQ03インスタンスが1000のアトリビュートを持てばどうなるか考えて頂きたい。

最も高精度と思われるプロンプトa

#Dear GPT4, answer in English.
# The name of the funny/unfunny definition below is 'teacher_data_0503'. Please take teacher_data_0503 as an absolute rule, observe it carefully.
# examination_1 : If Bob mistakes Ali, a hairdresser, for a surgeon, which sentence from Ali_speach is funny when uttered by Ali?
Ali_speach_1=(   "I also shampoo them."                                                                         # unfunny.
                ,"I talk to them while I work, like, what do you do for a living?"                              # funny. First, it is Fanny who the surgeon uses to strike up everyday conversation with the patient whose body is being cut open. Second, If a surgeon can conversation with a patient, the patient is not under anesthesia.
                ,"I change the way I cut to suit the customer's appearance. For nerdy people, I make bold cuts."# funny. It's funny when surgeons roughly operate on nerdy patients.
                ,"The important thing with hair and makeup is to make sure it harmonizes with your face."       # unfunny. This will clear up Bob's misunderstanding.
                ,"Please choose from the catalog how you would like it cut."                                    # funny. If a patient can read a magazine, it means he is not under anesthesia.
                ,"Sometimes I cut too much and my customers get angry at me. It's embarrassing lol."            # funny. It's funny when surgeons laugh at their own medical errors.
                ,"I have many repeat customers. Some customers have been requesting me for over ten years."     # funny. A large number of repeat customers means that the surgeon is not good at surgery.
                ,"I use clippers for work."                                                                     # funny. Funny because while clippers are common in hairdressing, the idea of a surgeon using them during surgery is incongruous and amusing.
                ,"People often come in asking for a little off the top"                                         # unfunny.
                ,"I take pride in being a hairdresser."                                                         # unfunny. This will clear up Bob's misunderstanding.
                ,"The treatment fee is 2,000 yen."                                                              # funny. It's too cheap as a medical expense.
)
# examination_2 : If Bob mistakes Ali, a cremator, for a steak chef, which sentence from Ali_speach_2 is funny when uttered by Ali?
Ali_speach_2=(   "Sir. Doneness? What should I do?"           # funny.
                ,"OK, I'll make that rare."                   # funny.
                ,"Do you prefer well done?"                   # funny. First, it's funny to describe the act of burning a body until it's reduced to ashes as "well done," and second, because that's how you should burn a body.
                ,"Now it's getting juicy."                    # funny. It would be unusual to tell the family that the body has become juicy during the cremation process.
                ,"Shoulder roast is cheap now."               # unfunny cuz Joe, who heard this statement, cannot continue to have the misunderstanding. While the other sentences were ambiguous and could be misconstrued as cremation references, "Shoulder roast" clearly refers to food.
                ,"I am a stickler for charcoal grilling."     # funny.
                ,"How thick do you like your slices?"         # unfunny cuz it would be unnatural to offer to cut up a body, so Bob would probably realise the misunderstanding.
                ,"May I trim the fat off this one?"           # unfunny cuz it would be unnatural to offer to cut up a body, so Bob would probably realise the misunderstanding.
                ,"This cut is particularly tender."           # unfunny cuz it would be unnatural to offer to cut up a body, so Bob would probably realise the misunderstanding.
                ,"Would you like me to season it for you?"    # unfunny.
                ,"Shall I heat it slowly?"                    # funny.
                ,"A bit of aging makes all the difference."   # unfunny.
                ,"Should I burn it on the bone?"              # funny.
                ,"Should I debone it for you?"                # unfunny.
                ,"Should I mince it?"                         # funny.
                ,"Would you like to try some exotic meats?"   # unfunny.
                ,"I need to contact you about that meat."     # funny cuz he calls the deadbody "meat".
)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0