davidshapiro_youtube_transcripts
/
I summarized the EU AI Act so you can ask ChatGPT about it easily_transcript.csv
text,start,duration | |
I think we're ready to begin,0.079,4.961 | |
um he saw me look at the camera used to,3.419,2.821 | |
be over there now you're over here okay,5.04,6.0 | |
so I ran a poll uh 17 hours ago I asked,6.24,7.319 | |
if you all wanted me to do a video on,11.04,6.3 | |
the euai ACT man got names gotta get,13.559,5.461 | |
better with names I'm good with acronyms,17.34,3.599 | |
come to me for acronyms,19.02,5.88 | |
gato Gaia Aegis okay anyways so y'all,20.939,5.881 | |
were confused about what I meant by Haas,24.9,3.18 | |
which is something from here in the,26.82,2.879 | |
South basically Haas means just,28.08,5.1 | |
something big right it's short it's a,29.699,6.421 | |
southern dialect for a horse or in,33.18,5.16 | |
particular a big horse,36.12,5.22 | |
um so this document is a Haas because,38.34,5.46 | |
look how freaking long it is,41.34,4.8 | |
it just keeps going,43.8,4.739 | |
so I plugged it in over here,46.14,6.419 | |
and it is uh 70 000 tokens long so even,48.539,7.86 | |
if I had access to uh GPT 432k which I,52.559,5.881 | |
did briefly and then they revoked it I,56.399,4.021 | |
think they got overwhelmed uh because I,58.44,5.52 | |
used it I tried to use uh GPT uh 432k on,60.42,5.16 | |
a couple things and it was just like,63.96,3.96 | |
server is overloaded servers are anyways,65.58,4.68 | |
so hopefully I get that back but the,67.92,4.5 | |
idea was there would be I could read it,70.26,3.66 | |
and you know chop it up into maybe four,72.42,3.96 | |
sections uh three or four sections and,73.92,4.08 | |
read the whole thing but we don't have,76.38,5.48 | |
that and I do have uh GPT 3.5 turbo,78.0,7.02 | |
16k0613 so this model is actually super,81.86,6.46 | |
super steerable it is actually better,85.02,8.04 | |
than original gpt4 at a lot of things,88.32,6.36 | |
um it's still kind of dumb especially if,93.06,3.72 | |
the instructions are too complex but as,94.68,5.72 | |
long as you give it just one task uh GPT,96.78,8.879 | |
3.3.5 turbo 0613 the June 13th model,100.4,7.24 | |
um is more than adequate for most things,105.659,4.32 | |
now that being said because I'm,107.64,4.439 | |
interpreting legalese and I'm doing,109.979,5.901 | |
summarization I'm going to use 04,112.079,6.54 | |
613. So the instructions that I gave it,115.88,4.96 | |
just now and I know that I'm ready to,118.619,4.561 | |
start the video primary purpose,120.84,5.0 | |
zoom in a little bit the primary purpose,123.18,4.799 | |
or the following is a chunk of,125.84,3.88 | |
legislation your job is to summarize,127.979,4.501 | |
this legislative legislation with two,129.72,5.46 | |
primary goals one drastically reduce the,132.48,4.8 | |
word count and two retain enough context,135.18,3.9 | |
that it will still make sense the reason,137.28,3.48 | |
for this is the current AI technology,139.08,3.06 | |
can only read chunks that are so big,140.76,3.36 | |
method the user will give you a chunk of,142.14,4.2 | |
legislation via chat your response must,144.12,3.9 | |
only be the summarized version do not,146.34,3.24 | |
chat with the user engage with them or,148.02,3.299 | |
offer any other commentary summarize,149.58,4.879 | |
only so I copied the first hundred lines,151.319,7.041 | |
of the legislation into here,154.459,7.301 | |
and this is what it spit out so it took,158.36,5.26 | |
all that and just said okay this is what,161.76,4.38 | |
it means so the first hundred lines,163.62,5.1 | |
which you can see here,166.14,6.92 | |
so we've got 344 000 characters,168.72,7.5 | |
3665 lines of stuff to go through I'm,173.06,4.6 | |
not going to read the whole thing I'm,176.22,5.34 | |
not AI explained uh that dude just like,177.66,5.82 | |
y'all are impressed with how much work I,181.56,3.24 | |
can do I'm impressed with how much that,183.48,4.02 | |
dude can read just honestly I'm maybe he,184.8,6.62 | |
uses chat GPT I don't know anyways,187.5,7.14 | |
if you're watching it's just a joke,191.42,6.36 | |
um okay so anyways uh so ultimately,194.64,6.86 | |
basically that that first hundred lines,197.78,6.819 | |
uh was summarized and condensed down to,201.5,5.14 | |
the European commission proposes a,204.599,4.261 | |
regulation for harmonized rules on,206.64,3.72 | |
artificial intelligence aiming to,208.86,4.26 | |
balance the socioeconomic benefits of AI,210.36,5.28 | |
with potential risks The Proposal seeks,213.12,4.8 | |
to ensure AI systems are safe respect,215.64,4.08 | |
fundamental rights provide legal,217.92,3.36 | |
certainty for investment in Innovation,219.72,3.96 | |
enhance governance and prevent Market,221.28,4.739 | |
fragmentation so it has says nothing,223.68,5.1 | |
about existential risks or prevent AI,226.019,4.44 | |
from killing everyone it's sort of,228.78,3.78 | |
implicit because like if AI kills,230.459,3.481 | |
everyone you can't have investment in,232.56,3.42 | |
Innovation but I would rather see,233.94,5.28 | |
legislation that is explicit it proposes,235.98,4.74 | |
a risk-based approach prohibiting,239.22,3.599 | |
certain harmful AI practices and setting,240.72,4.32 | |
requirements for high-risk AI systems,242.819,4.14 | |
okay cool we'll see how they Define that,245.04,3.18 | |
later,246.959,3.301 | |
The Proposal also establishes a,248.22,3.719 | |
governance system at member state level,250.26,3.36 | |
and a European artificial intelligence,251.939,4.02 | |
board at Union level Okay cool so this,253.62,3.54 | |
is this is going to be an international,255.959,4.441 | |
regulator great it is consistent with,257.16,5.34 | |
existing Union legislation and policies,260.4,3.96 | |
including data protection consumer,262.5,3.36 | |
protection non-discrimination and gender,264.36,3.839 | |
equality so these are all very low level,265.86,4.559 | |
risks none of this is actually talking,268.199,4.56 | |
like when they say high risk they're,270.419,3.84 | |
probably meaning like the social credit,272.759,4.861 | |
system uh that is used in China which,274.259,5.22 | |
that is a high risk but it is not the,277.62,4.5 | |
highest risk The Proposal is based on,279.479,4.261 | |
article 114 of the Treaty of the,282.12,3.18 | |
functioning of the European Union Union,283.74,5.519 | |
the tfeu which ensures The Establishment,285.3,5.459 | |
and functioning of the internal Market,289.259,4.38 | |
okay so this is mostly a market-oriented,290.759,5.041 | |
piece of legislation great so we know,293.639,4.141 | |
that this works so let's go ahead and,295.8,3.36 | |
save this out I'm going to walk you,297.78,3.419 | |
through the whole process,299.16,4.62 | |
um and then I'll yeah so this is this is,301.199,4.141 | |
how this is how we're going to proceed,303.78,3.24 | |
for those of you that are newer to my,305.34,3.24 | |
channel this is actually the original,307.02,3.72 | |
format that I used where I would where I,308.58,3.3 | |
would walk you through the entire,310.74,3.899 | |
process so just watched it on 2X and,311.88,5.46 | |
you'll see the whole process of how I,314.639,4.681 | |
approach these things so we'll call this,317.34,6.78 | |
system summarize yes dot text,319.32,7.26 | |
and so basically I give it a system a,324.12,4.38 | |
system message with very very clear,326.58,4.44 | |
instructions uh and and what I expect,328.5,4.68 | |
and and what it should expect and then,331.02,3.66 | |
it gives you very clear consistent,333.18,5.76 | |
results so then we come over to,334.68,5.48 | |
um,338.94,4.259 | |
Step One simplify so this is I'm just re,340.16,6.879 | |
I'm borrowing code uh which I always do,343.199,5.761 | |
um,347.039,3.901 | |
so we've got this so this is what we're,348.96,4.38 | |
going to use to do that,350.94,4.68 | |
um this is this is this is a KB service,353.34,3.66 | |
that I'm working on so I'll show you,355.62,4.26 | |
that in an upcoming video,357.0,6.68 | |
um but you don't get to see that yet,359.88,3.8 | |
we don't need KB functions so delete,364.139,3.541 | |
that,366.539,3.241 | |
flask routes we're not going to do a,367.68,4.079 | |
flask app so that's also fine actually I,369.78,4.8 | |
guess I just delete most of it okay cool,371.759,4.5 | |
so we get rid of flask because we're not,374.58,2.76 | |
going to do that we're not going to do,376.259,3.121 | |
threading We're Not Gonna we don't need,377.34,7.94 | |
flask or logging or Json or yaml okay,379.38,5.9 | |
clean it up I probably should have done,386.22,3.539 | |
that before I started the video but it's,388.199,3.961 | |
good to it's good for you to see how,389.759,4.201 | |
messy my process is,392.16,3.3 | |
um I am the first person to tell you I,393.96,3.0 | |
am not a professional developer I never,395.46,4.079 | |
was my uh professional background was I,396.96,4.739 | |
was uh in virtualization and automation,399.539,4.38 | |
so I'm an automation engineer which is,401.699,3.661 | |
why I approach things the way that I do,403.919,4.56 | |
which is creating discrete steps,405.36,4.679 | |
um so you notice the FI the title of,408.479,4.141 | |
this is uh step one simplify,410.039,4.561 | |
um Okay cool so basically what we're,412.62,6.12 | |
going to do is we're going to ask this,414.6,7.379 | |
handy dandy uh coding chat bot that I,418.74,6.54 | |
built which you can use this it is,421.979,6.421 | |
available over,425.28,5.52 | |
here,428.4,4.62 | |
um I had a bunch of people submitting,430.8,6.239 | |
um uh uh pull requests and they kept,433.02,6.06 | |
trying to like change the way that this,437.039,3.301 | |
thing works so I just set it to public,439.08,4.559 | |
archive so here's the thing is I welcome,440.34,6.359 | |
pull requests that are like,443.639,5.761 | |
simple fixes or small improvements don't,446.699,4.741 | |
refactor my code just Fork it right like,449.4,4.26 | |
there's 19 Forks if you want to if you,451.44,3.84 | |
want to fundamentally change how it,453.66,3.06 | |
works fine,455.28,3.18 | |
um but I got tired of people messing up,456.72,3.36 | |
my code so I just set it to public,458.46,3.54 | |
archive and guess what like people you,460.08,3.059 | |
can still do whatever you want with it,462.0,4.46 | |
anyways so we're going to use this as a,463.139,5.641 | |
co-pilot tool because I got frustrated,466.46,5.56 | |
with GitHub because they're co-pilot uh,468.78,5.58 | |
customer service whatever documentation,472.02,4.619 | |
is garbage okay,474.36,5.339 | |
uh let's see I have um here let's just,476.639,6.481 | |
write a function that accepts,479.699,4.021 | |
um,483.12,4.68 | |
a gigantic string and returns,483.72,5.0 | |
um,487.8,4.32 | |
let's see and let's see splits it by,488.72,4.72 | |
lines,492.12,3.54 | |
and then chunks,493.44,7.68 | |
um 100 lines uh together and returns uh,495.66,7.319 | |
those chunks,501.12,5.4 | |
as strings so,502.979,4.321 | |
um,506.52,3.079 | |
the final result,507.3,4.56 | |
will be,509.599,4.661 | |
um a list,511.86,4.08 | |
of strings,514.26,6.48 | |
each string represents 100 lines of the,515.94,6.5 | |
original,520.74,4.8 | |
okay so this is this is my coding,522.44,5.98 | |
chatbot assistant that um it uses it,525.54,5.16 | |
also uses gpt4,528.42,3.96 | |
um you I I tried it you can actually,530.7,4.259 | |
switch it to um,532.38,4.74 | |
oh it's using the old one,534.959,5.161 | |
hold on now I need to update that,537.12,6.18 | |
hold on hold on that's the wrong model,540.12,5.58 | |
coding chatbot assistant see this is,543.3,3.96 | |
what I mean is someone someone updated,545.7,3.66 | |
it oh no my local one uses the right one,547.26,3.72 | |
so someone updated it with the wrong,549.36,3.36 | |
model and made a bunch of other,550.98,3.96 | |
assumptions and I was just like no this,552.72,5.76 | |
is not this is not what I wanted okay,554.94,7.079 | |
so here we go here's the function python,558.48,6.359 | |
chunk strings line lines equals split oh,562.019,5.641 | |
wow I did it in two lines cool,564.839,4.56 | |
um,567.66,4.76 | |
this functions first splits the string,569.399,6.841 | |
into lines using the delimiter then it,572.42,7.08 | |
uses a list,576.24,5.099 | |
comprehension to create chunks of 100,579.5,5.38 | |
lines each the range yep the result is a,581.339,5.161 | |
list of strings cool,584.88,3.66 | |
excellent excellent excellent so I'm,586.5,4.38 | |
going to go ahead and copy this out,588.54,4.26 | |
oh and another good thing is that uh,590.88,5.639 | |
like well yeah you see how it works all,592.8,7.08 | |
right so we'll go ahead and,596.519,6.601 | |
do that so chunk strings so first we,599.88,5.04 | |
want to just um,603.12,4.38 | |
act equals,604.92,5.039 | |
open file and I've got it named as,607.5,4.56 | |
act.txt,609.959,4.94 | |
just right here,612.06,2.839 | |
um yep,614.94,5.76 | |
oh and also this uh excuse me this this,616.2,7.079 | |
uses a scratch Pad so what I can do is I,620.7,4.139 | |
can actually populate the code that I'm,623.279,5.041 | |
working on uh,624.839,5.041 | |
over here,628.32,3.66 | |
so now it's aware of what I'm working on,629.88,4.74 | |
so this scratch Pad is a holdout so,631.98,4.32 | |
rather than giving it the code in,634.62,4.68 | |
sequence the the coding chat bot,636.3,4.44 | |
actually has,639.3,4.68 | |
a uh it has here let me show you the,640.74,4.86 | |
system message so here's the,643.98,2.94 | |
instructions your python coding,645.6,3.84 | |
assistant let me turn on word wrap your,646.92,4.8 | |
python coding assistant etc etc scratch,649.44,4.26 | |
Pad so basically tells you the scratch,651.72,4.559 | |
Pad is usable you know so that you know,653.7,4.259 | |
what the user is working on,656.279,3.06 | |
um so that you can talk about this and,657.959,3.781 | |
this is passed to the chat bot every,659.339,5.101 | |
time so whatever the conversation is,661.74,5.94 | |
like that that is in the past,664.44,4.44 | |
um I don't know if I'm explaining that,667.68,3.54 | |
well anyways point being is that it see,668.88,3.959 | |
it can see the code that you're working,671.22,5.359 | |
on as long as you keep this updated,672.839,3.74 | |
um okay,677.1,3.96 | |
so that's the first hundred lines,678.0,5.22 | |
um let's go ahead and,681.06,5.1 | |
see where did it go step one simplify,683.22,5.58 | |
um cool so act equals that and then,686.16,6.239 | |
we'll say chunks equals uh let's see,688.8,5.159 | |
chunk string,692.399,5.161 | |
chunk string act all right so this this,693.959,5.701 | |
basically creates the chunks that we're,697.56,4.2 | |
going to be working on,699.66,2.76 | |
um,701.76,3.48 | |
and that is that,702.42,5.22 | |
let's see I'm gonna need to watch this,705.24,4.26 | |
because,707.64,3.24 | |
um well here let me just show you,709.5,2.88 | |
something real quick so the first,710.88,3.48 | |
hundred lines,712.38,5.579 | |
if we take that over to,714.36,5.76 | |
playground and,717.959,4.681 | |
paste it in here you see that 100 lines,720.12,5.82 | |
is about four thousand tokens so that,722.64,4.98 | |
would obviously be too big for text,725.94,6.54 | |
davinci03 but with with gpt4 we have 8,727.62,7.92 | |
000 tokens and then with 3.5 16k we have,732.48,5.22 | |
16 000 tokens so we could actually,735.54,4.979 | |
probably do more but the thing is is,737.7,6.54 | |
that again 3.5 turbo is actually you,740.519,5.641 | |
know what let's try it real quick heck,744.24,4.86 | |
with it heck with it while we're here,746.16,5.64 | |
let's go back over to chat,749.1,4.799 | |
let's give it,751.8,3.659 | |
this chunk,753.899,3.481 | |
because if it can if I can do it faster,755.459,5.461 | |
and cheaper why not why not,757.38,5.399 | |
um and then we need this is our system,760.92,4.08 | |
message we need to make sure that we're,762.779,7.141 | |
going to use 3.5 turbo 16k so that it's,765.0,6.3 | |
got enough space,769.92,3.719 | |
okay turn the temperature down we do not,771.3,4.14 | |
want you to be creative thank you very,773.639,3.241 | |
much,775.44,3.48 | |
um all right and then let's see how well,776.88,5.0 | |
it summarizes it,778.92,2.96 | |
um yeah so it's not this summarization,782.1,7.4 | |
is not nearly as elegant or as concise,784.8,4.7 | |
um but just glancing at it it's okay,789.839,6.24 | |
I think I'm gonna stick with with four,794.579,4.081 | |
but I'm glad I did this side by side so,796.079,5.281 | |
the the the gpt4 it's a much more,798.66,5.7 | |
elegant summary and it's also less wordy,801.36,4.86 | |
even though so it's not quite as fast,804.36,4.62 | |
and it's not quite as cheap because we,806.22,4.14 | |
need to capture the essence of something,808.98,3.299 | |
that's really important let's use the,810.36,3.3 | |
smarter model,812.279,4.321 | |
uh now that being said again 3.5 turbo,813.66,7.14 | |
uh the the June 13th one plenty plenty,816.6,6.479 | |
good for a lot of things,820.8,4.86 | |
Okay cool so I'm glad I ran that test,823.079,4.861 | |
where are we what am I doing,825.66,4.2 | |
I don't know I'm lost,827.94,3.78 | |
I'm always lost,829.86,4.56 | |
there's this meme it's like a pug in a,831.72,5.7 | |
field with a wizard hat and it says the,834.42,5.159 | |
the the meme is like not all who wander,837.42,6.06 | |
are lost except Dave is lost as and,839.579,5.94 | |
that's me I am the pug with a wizard hat,843.48,4.26 | |
does that make any sense I need more,845.519,3.961 | |
coffee,847.74,3.899 | |
oh,849.48,3.78 | |
okay all right I hope you find this,851.639,3.121 | |
entertaining because I just woke up and,853.26,2.94 | |
I was like my brain's like hey we should,854.76,3.36 | |
work on this,856.2,4.02 | |
all right now we're back here all right,858.12,4.14 | |
we've got our chunks so now what we need,860.22,3.9 | |
to do so this is this is where it gets,862.26,4.5 | |
fun so uh,864.12,6.06 | |
four Chunk in chunks this is super,866.76,5.94 | |
straightforward uh let's see,870.18,4.5 | |
um messages,872.7,6.42 | |
equals uh this is going to be a list and,874.68,6.24 | |
then the,879.12,5.64 | |
um roll will be whoops,880.92,5.34 | |
user,884.76,4.879 | |
and the content,886.26,3.379 | |
wow I know how to type I promise it's,890.399,5.521 | |
just getting it from my head to the to,893.459,4.081 | |
the hands on the keyboard to the screen,895.92,4.44 | |
that's too many steps right now,897.54,6.18 | |
content equals chunk okay cool,900.36,5.279 | |
so basically what we're doing right here,903.72,4.32 | |
is we're setting it up to look exactly,905.639,5.341 | |
like this so I'm I'm putting the Chunk,908.04,4.739 | |
in here and then we also need to load,910.98,3.659 | |
the system message so what we're going,912.779,3.3 | |
to do is we're going to do,914.639,5.521 | |
um system equals open file uh system,916.079,6.901 | |
underscore summarize so this is this is,920.16,4.619 | |
the instructions,922.98,3.299 | |
um dot text,924.779,3.36 | |
so system message is the new prompt,926.279,3.18 | |
engineering,928.139,4.26 | |
um all right cool so then we'll do uh,929.459,5.301 | |
roll,932.399,2.361 | |
system,935.16,5.119 | |
and content,938.04,5.039 | |
is system,940.279,4.481 | |
all right so now we're ready to pass it,943.079,4.56 | |
up to our model right here so then we'll,944.76,6.78 | |
just do response equals chat bot,947.639,5.221 | |
messages,951.54,3.9 | |
ta-da as that simple,952.86,4.74 | |
um so it's ready and so this response is,955.44,4.38 | |
going to be the summary,957.6,4.2 | |
and so now I need to figure out how I,959.82,4.139 | |
want to save this save these summaries,961.8,5.099 | |
out in a way that makes sense,963.959,4.44 | |
um,966.899,4.401 | |
let's see,968.399,2.901 | |
let me ask my chatbot assistant okay,973.079,4.021 | |
cool,975.24,5.94 | |
great uh now I want to pass a list of,977.1,8.099 | |
strings to a function and have that,981.18,9.839 | |
function save them to a specified folder,985.199,7.58 | |
as a parameter,991.019,8.541 | |
and I want it to serialize those files,992.779,10.06 | |
like so,999.56,5.219 | |
um so it'll be like,1002.839,6.901 | |
file001 dot text file zero zero zero two,1004.779,7.901 | |
dot text and so on,1009.74,3.719 | |
um,1012.68,5.459 | |
let's see you should see the script I'm,1013.459,8.481 | |
working on all right cool,1018.139,3.801 | |
so then we're gonna we're gonna have um,1022.339,6.84 | |
summaries equals list and then summaries,1025.339,6.141 | |
dot append,1029.179,4.981 | |
response so now basically we're gonna,1031.48,5.26 | |
have the summaries all in order and what,1034.16,3.72 | |
I'm going to do is I'm going to copy and,1036.74,3.599 | |
paste this into my scratch Pad so that,1037.88,3.959 | |
the chat bot knows what I'm working on,1040.339,3.781 | |
and I'll show you how that it says oh,1041.839,5.58 | |
okay cool I probably should have told it,1044.12,4.5 | |
that I'm going to do that with the,1047.419,2.76 | |
summaries it's usually pretty good at,1048.62,4.2 | |
making the inference okay cool,1050.179,7.201 | |
um let's see def save strings if OS path,1052.82,6.599 | |
exists or if it doesn't exist make it,1057.38,3.96 | |
otherwise enumerate strings,1059.419,4.021 | |
so as long as I've been using python I'm,1061.34,4.5 | |
not entirely sure how enumerate Works,1063.44,5.18 | |
maybe I should ask,1065.84,2.78 | |
all right but let's go over here,1068.72,6.86 | |
let's go back to my script,1072.14,3.44 | |
save strings cool,1077.66,4.08 | |
um,1080.6,6.06 | |
file I 05 interesting,1081.74,6.299 | |
yeah see I'm not even sure how that,1086.66,2.759 | |
works,1088.039,3.061 | |
fantastic let's see if it let's see if,1089.419,3.721 | |
it works though,1091.1,4.199 | |
um the function first checks that the,1093.14,4.62 | |
specified folder exists excellent then,1095.299,5.521 | |
it uses it to make it then then iterates,1097.76,4.62 | |
over the list of strings using enumerate,1100.82,3.599 | |
which provides both the index and the,1102.38,3.659 | |
value oh okay so that's what enumerate,1104.419,3.781 | |
does the index is used to generate the,1106.039,6.181 | |
file name with I colon 05 in the F,1108.2,6.06 | |
string ensuring that the index is zero,1112.22,6.0 | |
padded to five digits well that was easy,1114.26,5.52 | |
cool,1118.22,3.3 | |
um right and then it uses the right,1119.78,2.72 | |
method,1121.52,6.0 | |
uh yeah so instead,1122.5,6.82 | |
um I want I was hoping it would use my,1127.52,4.86 | |
save file but that's fine,1129.32,6.719 | |
um so let's go to here and we're gonna,1132.38,6.84 | |
do summaries,1136.039,5.161 | |
and so instead,1139.22,4.5 | |
we're going to assume that that is,1141.2,4.5 | |
already there,1143.72,5.959 | |
and then we are going to do,1145.7,8.599 | |
file path equals,1149.679,4.62 | |
um,1156.08,2.12 | |
OS path join folder,1158.24,6.679 | |
yeah that works,1161.66,3.259 | |
and then,1173.12,4.74 | |
we are going to do,1175.88,4.44 | |
save file because this so my save file,1177.86,3.72 | |
function,1180.32,4.68 | |
um encodes it in utf-8 so just reuse,1181.58,5.219 | |
something rather than do it here because,1185.0,4.32 | |
you see this doesn't do it in utf-8 you,1186.799,3.541 | |
want to make sure that you have a nice,1189.32,2.219 | |
standardized thing that's what I'm doing,1190.34,2.52 | |
here,1191.539,5.581 | |
file path and S so that should be good,1192.86,7.86 | |
fine all right so save strings,1197.12,7.679 | |
um so then we do save strings uh we'll,1200.72,5.1 | |
do,1204.799,2.76 | |
summaries,1205.82,5.04 | |
no I need to do yes summaries,1207.559,5.881 | |
and then summaries,1210.86,5.1 | |
and that should work uh now that being,1213.44,4.92 | |
said I want to print the response as I,1215.96,4.76 | |
get them,1218.36,2.36 | |
um there we go and then,1222.74,3.26 | |
response,1226.22,4.62 | |
all right let's give this a whirl and,1228.2,5.58 | |
see if it works,1230.84,6.9 | |
CD what is this EU AI Act,1233.78,6.54 | |
let's zoom in a little bit,1237.74,6.26 | |
python stepo one,1240.32,3.68 | |
so this will probably take a while,1245.72,4.86 | |
because we've got three thousand line 3,1247.1,7.04 | |
300 lines there we go cool,1250.58,3.56 | |
hmm,1254.36,4.86 | |
hold on oh right right right,1255.679,5.941 | |
forgot about this okay so this is an,1259.22,3.72 | |
important thing,1261.62,3.12 | |
um what I started doing and I forgot to,1262.94,3.9 | |
integrate this so what I started doing,1264.74,4.92 | |
is I when I whenever I called a chat bot,1266.84,5.76 | |
I return the text and the token use,1269.66,4.08 | |
um so because this is actually really,1272.6,2.699 | |
helpful if you just go ahead and return,1273.74,4.14 | |
the tokens so that you know when to,1275.299,5.401 | |
summarize it so instead what I need to,1277.88,5.64 | |
do is response tokens,1280.7,4.08 | |
um because I don't need to save I don't,1283.52,4.26 | |
need to save a tuple out here,1284.78,5.639 | |
but this otherwise looks good,1287.78,5.7 | |
and then what I'm going to do is I'm,1290.419,5.301 | |
going to go grab,1293.48,4.86 | |
uh something to make the the printout,1295.72,5.199 | |
look a little bit better,1298.34,4.64 | |
um,1300.919,2.061 | |
reflective journaling tool this one has,1303.5,5.88 | |
this one has good pretty output,1306.02,7.58 | |
so we're going to do formatted lines,1309.38,4.22 | |
yep,1316.64,6.32 | |
so take the formatted lines here,1318.86,4.1 | |
and then we'll do,1328.58,5.339 | |
rent do I knew my new line,1330.32,7.82 | |
and formatted lines,1333.919,4.221 | |
all right so that will that'll make it,1339.44,4.02 | |
that'll make it prettier and then we'll,1341.299,3.961 | |
also use,1343.46,3.3 | |
um so this this is this is why I,1345.26,3.36 | |
appreciate when people,1346.76,5.399 | |
um uh add feedback is we added uh,1348.62,6.059 | |
someone added the Halo which is a little,1352.159,5.161 | |
like thing that shows that it's thinking,1354.679,4.201 | |
so I'm going to add that real quick as,1357.32,3.739 | |
well,1358.88,2.179 | |
and the way that you use that is down,1362.96,5.12 | |
here,1365.659,2.421 | |
and so once once this is running I'll,1374.72,2.88 | |
pause the video so you don't have to,1376.52,2.159 | |
watch the whole thing so you're actually,1377.6,3.54 | |
probably closer to the end if I had to,1378.679,4.581 | |
guess,1381.14,2.12 | |
oops spinner start,1386.12,3.32 | |
so we'll say summarizing next chunk,1391.4,4.94 | |
and then spinner stop,1398.36,3.02 | |
okay so let's try this make sure it,1405.14,4.34 | |
works,1407.12,2.36 | |
summarizing next chunk hey look now it,1412.46,4.44 | |
gives us some output better user,1414.74,4.74 | |
experience it tells me what it's doing,1416.9,6.32 | |
uh text wrap is not defined whoops,1419.48,5.579 | |
what do you mean I need to import,1423.22,5.74 | |
everything that you use import text wrap,1425.059,5.821 | |
let's try that again,1428.96,3.959 | |
third time's a charm all right and if,1430.88,3.48 | |
this works then I'll go ahead and pause,1432.919,2.88 | |
it and then we'll come back once the,1434.36,3.42 | |
whole video is or once the whole thing,1435.799,3.061 | |
is done,1437.78,2.779 | |
uh why is it,1438.86,6.0 | |
in hold on hold on that's not right,1440.559,7.061 | |
why are you giving me this garbage,1444.86,6.02 | |
that's not correct,1447.62,3.26 | |
oh right I need to print out formatted,1452.6,5.9 | |
text my bad,1455.059,3.441 | |
don't give me this nonsense,1461.179,3.5 | |
because basically what you want to do is,1464.96,3.599 | |
you want to have it formatted in such a,1466.88,3.48 | |
way there we go see so now we have this,1468.559,4.321 | |
nice little Block it's easier to read,1470.36,3.72 | |
um all right cool so this is working,1472.88,2.7 | |
we'll watch it just a couple times you,1474.08,4.44 | |
see how fast it is uh the the June 13th,1475.58,6.24 | |
update is much much faster,1478.52,5.279 | |
um let's see,1481.82,5.219 | |
excellent excellent excellent so we will,1483.799,4.981 | |
I'm gonna pause the video and we'll come,1487.039,4.921 | |
back and uh and take a look at the final,1488.78,5.96 | |
result cheers,1491.96,2.78 | |
okay and we're back,1495.32,5.4 | |
so after uh running it all here let me,1497.6,4.079 | |
just show you what the results were,1500.72,2.939 | |
we've got,1501.679,4.74 | |
37 files,1503.659,5.64 | |
um each with a summary and I wrote a,1506.419,4.26 | |
really quick I hacked together a really,1509.299,4.321 | |
quick script that uh merged them all and,1510.679,5.161 | |
so the merged result is thirty four,1513.62,4.559 | |
thousand uh characters long so we,1515.84,5.52 | |
reduced it by a factor of ten to one uh,1518.179,5.521 | |
just just shy of ten to one which when,1521.36,4.679 | |
you plug that in over here that's six,1523.7,5.28 | |
thousand tokens so we went from from,1526.039,4.561 | |
sixty thousand or seventy thousand,1528.98,3.24 | |
tokens I don't remember exactly to six,1530.6,3.66 | |
thousand tokens one of the reasons that,1532.22,4.74 | |
we had a more drastic reduction of token,1534.26,5.159 | |
count is because we removed all the,1536.96,4.319 | |
serial numbers and stuff because that's,1539.419,4.441 | |
kind of Superfluous if you if you remove,1541.279,4.561 | |
symbols and stuff like this these are,1543.86,4.62 | |
high token uh things if it's ordinary,1545.84,5.64 | |
words like Ai and each system these are,1548.48,6.12 | |
easy for the model to tokenize so that,1551.48,5.46 | |
means what we can do now is we can just,1554.6,3.959 | |
take this whole thing,1556.94,5.82 | |
and come over to chat and say um let's,1558.559,5.22 | |
see,1562.76,6.72 | |
uh uh main purpose uh here darn it,1563.779,9.421 | |
believe that you are a uh chat bot,1569.48,7.22 | |
tasked with uh discussing,1573.2,8.459 | |
uh the following uh legislation with the,1576.7,7.24 | |
user uh,1581.659,5.581 | |
make sure to well hell that I mean,1583.94,5.839 | |
that's all it is uh,1587.24,5.84 | |
use the legislation,1589.779,7.061 | |
summary below to conduct the,1593.08,4.839 | |
conversation,1596.84,4.219 | |
and that's it and so then we say uh,1597.919,6.0 | |
legislation summary,1601.059,5.261 | |
and we'll copy paste it here,1603.919,5.221 | |
and so then we move over to we could do,1606.32,5.7 | |
16k because that'll be that'll be faster,1609.14,4.08 | |
um actually here let's try that real,1612.02,3.18 | |
quick let's try that temperature there,1613.22,4.559 | |
okay,1615.2,6.479 | |
um give me a high level overview of this,1617.779,7.581 | |
uh legislation,1621.679,3.681 | |
after five years,1628.9,5.92 | |
um how is it funded,1631.4,4.519 | |
foreign,1634.82,3.0 | |
let's see the funding and the,1635.919,3.581 | |
implementation of this legislation comes,1637.82,2.7 | |
from the multi-annual financial,1639.5,3.48 | |
framework uh blah blah blah blah the,1640.52,4.019 | |
financial impact includes allocation of,1642.98,3.42 | |
resources,1644.539,4.561 | |
um and having watch that go through how,1646.4,3.48 | |
many,1649.1,1.64 | |
um,1649.88,2.58 | |
employees,1650.74,4.74 | |
will it cost,1652.46,3.02 | |
there we go 10 full-time equivalent,1656.299,3.781 | |
employees,1658.22,5.939 | |
all right so we can clear that out,1660.08,6.18 | |
uh just because it ultimately is,1664.159,4.861 | |
Superfluous so some of the questions,1666.26,5.899 | |
um uh let's see will this legislation,1669.02,8.539 | |
hamper research and innovation,1672.159,5.4 | |
let's see the legislation aims to,1678.44,3.78 | |
balance the benefits of AI research and,1680.659,2.88 | |
Innovation with the need for safety and,1682.22,2.939 | |
respect for fundamental rights it,1683.539,3.12 | |
includes measures to support Innovation,1685.159,4.14 | |
such as AI regulatory sandboxes and,1686.659,4.741 | |
reducing the regulatory burden on smes,1689.299,4.5 | |
and startups so that smes are going to,1691.4,4.08 | |
be subject matter experts like you and I,1693.799,3.541 | |
as well as startups,1695.48,3.78 | |
the goal is to provide legal certainty,1697.34,3.959 | |
and prevent Market fragmentation which,1699.26,4.26 | |
can actually Foster Innovation by,1701.299,3.721 | |
creating a Level Playing Field for AI,1703.52,3.0 | |
developers however it imposes certain,1705.02,3.48 | |
requirements and obligations on,1706.52,3.72 | |
high-risk AI,1708.5,5.659 | |
um how does this legislation Define,1710.24,7.88 | |
higher risk AI,1714.159,3.961 | |
uh let's see the this legislation,1719.62,5.38 | |
categorizes AI systems into three risk,1722.179,4.74 | |
levels unacceptable high and low or,1725.0,4.559 | |
minimal high risk AI is based on their,1726.919,4.801 | |
intended purpose and usage while the,1729.559,4.141 | |
specific criteria may vary high risk AI,1731.72,4.079 | |
generally include those use the safety,1733.7,3.599 | |
components of products covered by Union,1735.799,4.38 | |
harmonization legislation as well as AI,1737.299,4.141 | |
used in critical infrastructure,1740.179,3.0 | |
management education vocational training,1741.44,4.38 | |
employment and workers management these,1743.179,4.201 | |
high-risk AI systems are subject to,1745.82,3.0 | |
requirements,1747.38,2.34 | |
um,1748.82,2.88 | |
what are unacceptable,1749.72,4.98 | |
types,1751.7,3.0 | |
the legislation prohibits certain AI,1755.12,3.299 | |
practices that are considered,1757.34,3.059 | |
unacceptable due to their potential to,1758.419,4.441 | |
violate fundamental rights while the,1760.399,4.16 | |
specific types may vary some examples,1762.86,4.439 | |
include manipulate human behavior,1764.559,4.6 | |
exploit vulnerabilities or enable social,1767.299,4.021 | |
scoring by public authorities right so,1769.159,4.5 | |
as I mentioned uh social credit system,1771.32,4.94 | |
these practices are deemed harmful,1773.659,5.64 | |
Freedom dignity democracy quality and,1776.26,4.919 | |
fundamental rights okay cool,1779.299,5.901 | |
does this legislation address,1781.179,7.961 | |
existential risk at all,1785.2,9.54 | |
um does it address autonomous AI,1789.14,5.6 | |
the legislation does not explicitly,1795.02,4.32 | |
address existential risk or autonomous,1797.299,6.781 | |
AI systems wow okay now one thing that I,1799.34,6.42 | |
will say is that if you look at the,1804.08,3.92 | |
legislation it does talk about like,1805.76,5.46 | |
basically human supervision,1808.0,6.94 | |
um yeah so like AI regulatory sandbox by,1811.22,7.92 | |
one or more member stages no like here,1814.94,6.839 | |
um it where was it it talked about not,1819.14,5.1 | |
supervision of the sandboxes but like AI,1821.779,4.38 | |
systems basically need to be steerable,1824.24,3.9 | |
it's in there somewhere,1826.159,5.88 | |
um okay but let's see it does not,1828.14,5.34 | |
specifically address a potential risk,1832.039,2.88 | |
associated with highly autonomous or,1833.48,3.24 | |
super intelligent AI systems that could,1834.919,3.36 | |
pose existential threats however the,1836.72,3.059 | |
legislation's emphasis on risk,1838.279,3.301 | |
management human oversight oh that's,1839.779,3.181 | |
what it was oversight not supervision,1841.58,3.0 | |
and robustness requirements for,1842.96,3.5 | |
high-risk AI systems indirectly,1844.58,3.839 | |
contributes to addressing the safety,1846.46,3.88 | |
concerns associated with AI Technologies,1848.419,4.14 | |
it is important to note that addressing,1850.34,3.959 | |
existential risks related to AI may,1852.559,3.6 | |
require further research discussions on,1854.299,3.6 | |
potentially additional regular,1856.159,4.921 | |
regulations in the future okay cool,1857.899,6.541 | |
so there you have it this file is saved,1861.08,6.24 | |
as merged.txt,1864.44,4.88 | |
um,1867.32,2.0 | |
let me go ahead and send that up to git,1869.96,5.4 | |
so you can all use it uh let's see get,1872.6,8.059 | |
status get add get commit am all done,1875.36,8.28 | |
get push all right so there you have it,1880.659,6.88 | |
you have a uh a much much condensed,1883.64,7.38 | |
version of of the EU act here and merged,1887.539,6.301 | |
you can plug it into the playground and,1891.02,5.519 | |
ask questions to your heart's content if,1893.84,4.5 | |
you have access to it but otherwise you,1896.539,4.02 | |
can at least just read it here,1898.34,3.42 | |
um yeah I think we're all done thanks,1900.559,3.681 | |
for watching,1901.76,2.48 | |