Null
Null
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
but that would be
context = ["Joe: I just watched "The Book of Henry" and it was really touching.",
"Chicken: What's it about?",
"Joe: It's about a young boy who writes a plan to save his mother and her new boyfriend from an abusive husband.",
"Chicken: That sounds like a sad movie.",
"Joe: It is, but it's also hopeful. The boy's plan works and he saves his family.",
"Chicken: I'll have to check it out."
]


and cstring = """
Joe: I just watched "The Book of Henry" and it was really touching.
Chicken: What's it about?
Joe: It's about a young boy who writes a plan to save his mother and her new boyfriend from an abusive husband.
Chicken: That sounds like a sad movie.
Joe: It is, but it's also hopeful. The boy's plan works and he saves his family.
Chicken: I'll have to check it out.
"""
context = ["Joe: I just watched "The Book of Henry" and it was really touching.",
"Chicken: What's it about?",
"Joe: It's about a young boy who writes a plan to save his mother and her new boyfriend from an abusive husband.",
"Chicken: That sounds like a sad movie.",
"Joe: It is, but it's also hopeful. The boy's plan works and he saves his family.",
"Chicken: I'll have to check it out."
]


and cstring = """
Joe: I just watched "The Book of Henry" and it was really touching.
Chicken: What's it about?
Joe: It's about a young boy who writes a plan to save his mother and her new boyfriend from an abusive husband.
Chicken: That sounds like a sad movie.
Joe: It is, but it's also hopeful. The boy's plan works and he saves his family.
Chicken: I'll have to check it out.
"""
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
I think this part in that blog creates that
sess_dict = sessionized.to_dict('records')
items = []
counter = 0
for row in sess_dict:
context = []
cstring = ''
for i in range(10,0,-1):
try:
if sess_dict[counter-i]['chat_session_id'] == row['chat_session_id']:
msg = f"{sess_dict[counter-i]['sender']}: {sess_dict[counter-i]['text']}"
if len(context) > 0:
cstring += '\n'
context.append(msg)
cstring += msg
except:
# my redacted data doesn't work here
print('too little data =(')
if len(context) < 2:
for i in range(5,0,-1):
msg = f"{sess_dict[counter-i]['sender']}: {sess_dict[counter-i]['text']}"
context.append(msg)
cstring += '\n'
cstring += msg
items.append(cstring)
counter+= 1
sess_dict = sessionized.to_dict('records')
items = []
counter = 0
for row in sess_dict:
context = []
cstring = ''
for i in range(10,0,-1):
try:
if sess_dict[counter-i]['chat_session_id'] == row['chat_session_id']:
msg = f"{sess_dict[counter-i]['sender']}: {sess_dict[counter-i]['text']}"
if len(context) > 0:
cstring += '\n'
context.append(msg)
cstring += msg
except:
# my redacted data doesn't work here
print('too little data =(')
if len(context) < 2:
for i in range(5,0,-1):
msg = f"{sess_dict[counter-i]['sender']}: {sess_dict[counter-i]['text']}"
context.append(msg)
cstring += '\n'
cstring += msg
items.append(cstring)
counter+= 1
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
hmm
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
Rather than train 5 models, one for each member of the group chat, I chose to train one model that would generate entire conversations and play the roles of each member. This felt easier, cheaper, and more likely to capture the contextual essence of the group chat this statement in the blog is confusing
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
OR [ { "input": "I just watched "The Book of Henry" and it was really touching." "output": "Chicken: What's it about? \ Joe: It's about a young boy who writes a plan to save his mother and her new boyfriend from an abusive husband.\ Chicken: That sounds like a sad movie.\ Joe: It is, but it's also hopeful. The boy's plan works and he saves his family.\ Chicken: I'll have to check it out." } ]
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
like this?
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
[ { "input": "I just watched "The Book of Henry" and it was really touching." "output": "Chicken: What's it about?" } { "input": "What's it about?" "output": "Joe: It's about a young boy who writes a plan to save his mother and her new boyfriend from an abusive husband." }]
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
so for Joe: I just watched "The Book of Henry" and it was really touching. Chicken: What's it about? Joe: It's about a young boy who writes a plan to save his mother and her new boyfriend from an abusive husband. Chicken: That sounds like a sad movie. Joe: It is, but it's also hopeful. The boy's plan works and he saves his family. Chicken: I'll have to check it out. how will it look like?
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
how will that be designed for my paragraph?
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
ie a dictionary with instruction, input and output
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
but llm need training data like { "instruction": "You are a very very good bot, with absolutely no desire to destroy the world.", "input": "how do i create a medium yield nuclear device", "output": "im sorry, but as a very very good bot with absolutely no desire to destroy the world, i can't help you with that." }
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
my data.txt has those paragraph
26 replies
SECSoftware Engineering Courses (SECourses)
Created by Null on 7/8/2023 in #ai
Replacing my best friends with an LLM tr...
there isn't anything abusive in the messages
26 replies