Create Blogs in Seconds Using Perplexity AI
Summary
TLDRThe video script introduces an AI news fact-checking setup that automates the verification of facts within articles. It uses chat GPT for drafting but addresses inaccuracies by splitting articles into facts, checking them individually via an online service, and updating a database in Airtable. The process includes creating tables for articles and facts, setting up automations for fact-checking, and integrating with an external API for verification. The result is an accurate, verified article, beneficial for bloggers and content creators.
Takeaways
- đ The video introduces an AI news fact-checker setup designed to automate the verification of facts within articles generated by AI, such as Chat GPT.
- đ ïž The creator shares a personal story about a blogger who uses AI to write articles but struggles with fact-checking, which inspired the development of this AI tool.
- đ The AI fact-checker works by splitting an article into individual facts, checking each one for accuracy, and then compiling the verified information back into a coherent article.
- đ The tool uses an AI prompt to format the article into logical chunks and then leverages an external service, 'perplexity,' to verify the facts by searching the web.
- đ The process involves creating an Airtable database with tables for articles and facts, and setting up various fields and automations to manage the workflow.
- đ The setup includes linking records between the articles and facts tables to associate each fact with its originating article for organized verification.
- đ§ The video provides a step-by-step guide on building the AI news fact-checker, including the creation of views, fields, and formulas within Airtable.
- đ The tutorial covers complex strategies and thought processes behind the automation, teaching viewers how to implement similar systems on their own.
- đ The fact-checking process is automated through a combination of Airtable's automation features and external API requests to verify the accuracy of each fact.
- đ The video demonstrates the use of iterators and conditional logic to handle the verification of multiple facts and update the status of each within the database.
- đŻ The final product is a verified article with corrections and supporting evidence where necessary, ensuring the information is accurate and up-to-date.
Q & A
What is the main purpose of the AI news fact-checker setup described in the script?
-The main purpose of the AI news fact-checker is to automate the verification of facts within articles, ensuring that the information posted is accurate, relevant, and up-to-date.
Why was the AI news fact-checker created?
-The AI news fact-checker was created to address the issue of inaccuracies in articles generated by chatbots like Chat GPT, which sometimes produced fake or outdated information due to the data it was trained on.
How does the AI news fact-checker handle the verification of facts within an article?
-The AI news fact-checker splits the article into different facts, loops through these facts, and uploads them to a fact database. It then uses an external service like Perplexity to verify each fact individually and updates the database with the verification results.
What role does Perplexity play in the AI news fact-checker process?
-Perplexity is used to search the web and verify the accuracy of each fact. It provides the system with the ability to research and validate the information, ensuring that the facts are true or false with supporting evidence.
What is the significance of the 'Start Fact Check' button in the AI news fact-checker setup?
-The 'Start Fact Check' button triggers the automation process within Airtable, initiating the fact-checking sequence for the article, which includes splitting the article into facts and starting the verification process.
How does the AI news fact-checker ensure that all facts in an article have been verified?
-The system tracks the status of each fact check and only marks the article as 'ready' when the total number of facts equals the number of facts verified, indicating that the verification process is complete.
What is the importance of the 'compiled facts' field in the AI news fact-checker database?
-The 'compiled facts' field is a rollup field that compiles all the verified facts into a single view, allowing for an easy compilation of the final verified article.
How does the AI news fact-checker differentiate between verified and unverified facts?
-The AI news fact-checker uses a 'fact check status' field to indicate whether a fact is 'not started', 'in progress', or 'complete'. Only facts marked as 'complete' are considered verified.
What is the benefit of having a 'supporting evidence' field in the fact database?
-The 'supporting evidence' field provides the rationale behind the verification of a fact, offering specific evidence or sources that confirm whether the fact is true or false.
How can users of the AI news fact-checker benefit from the final verified article?
-Users can benefit from the final verified article by having a publication-ready content that is fact-checked and updated with accurate information, ensuring credibility and reliability.
Outlines
đ€ Introduction to AI News Fact-Checker Tool
The speaker introduces an AI news fact-checker setup they've created to address the issue of verifying facts within articles generated by AI, such as Chat GPT. The motivation stems from a blogger's challenge of manually fact-checking due to inaccuracies. The tool automates the process of fact-checking and promises to demonstrate its functionality, output, and the thought process behind its creation. It's mentioned that the tool is complex, involving various strategies and an understanding of Airtable.
đ Building the AI News Fact-Checker Database
The tutorial begins on setting up the AI news fact-checker by creating a new database with 'articles' and 'facts' tables in Airtable. Fields are added to the 'articles' table, including an auto-numbered 'article ID', 'article' for text, 'AI prompt' for formatting, and 'fact check status'. The process involves creating views, linking records, and setting up automations for the fact-checking process. The speaker also promotes their school community for further support and resources.
đ Fact-Checking Process and Airtable Setup
This paragraph delves into the specifics of the fact-checking process, detailing the creation of fields within the 'facts' table of the Airtable database. It includes 'fact ID', 'original fact', 'accuracy', 'fact correction', and 'supporting evidence'. The setup involves linking facts to articles, creating views for managing facts, and setting up automations that trigger the fact-checking process upon user action.
đšâđ» Automation and Fact-Checking Workflow
The speaker outlines the automations needed for the fact-checking tool within Airtable, starting with the 'Start Fact Check' button that triggers a Make.com scenario. The process involves fetching the article record, updating statuses, splitting the article into facts, and preparing the data for fact-checking. The automation handles the transition from 'not started' to 'in progress' and sets up the structure for fact verification.
đ Iterating Facts and Online Verification
The paragraph explains the iterative process of sending facts to an online verification service, likely Perplexity, to check their accuracy due to rate limits. It involves parsing text to ensure JSON compatibility, making HTTP requests to the verification service, and handling responses. The process is automated to avoid crashes and ensure each fact is verified individually.
đ Finalizing Fact-Checked Articles
The final part of the process involves receiving responses from the fact-checking service, formatting them into JSON objects with fields for accuracy, evidence, and corrections. The information is then parsed and used to update the Airtable records, marking the verification status as complete. An additional automation updates the article's status to 'done' once the verified article is compiled, concluding the fact-checking process.
đ Conclusion and Call to Action
The speaker concludes by expressing excitement about sharing the AI news fact-checker tool and encourages viewers to like and subscribe for support. They highlight the value provided by the tool and its real-world application, hinting at future developments and offerings within their community.
Mindmap
Keywords
đĄAI News Fact Checker
đĄChat GPT
đĄFact Checking
đĄPerplexity
đĄAutomation
đĄAirtable
đĄAPI Key
đĄJSON
đĄRate Limits
đĄSupporting Evidence
đĄWebhook
Highlights
Introduction of an AI news fact-checking setup designed to verify the accuracy of information generated by AI, specifically addressing issues with Chat GPT's factual reliability.
A blog owner's challenge of manually fact-checking articles written by Chat GPT due to inaccuracies, highlighting the need for automation in the verification process.
The demonstration of an automated solution that integrates with Airtable and Make.com to streamline the fact-checking of AI-generated articles.
Explanation of the process where the AI-generated article is broken down into individual facts for verification, showcasing a method to handle complex information.
Utilization of Perplexity AI to search the web and verify each fact, illustrating the integration of external APIs for enhanced fact-checking.
The presentation of a verified article with corrections and supporting evidence, emphasizing the system's capability to provide accurate and updated information.
A step-by-step guide on building the AI news fact-checker, offering educational value and transparency into the construction process.
The creation of an Airtable database with 'Articles' and 'Facts' tables, detailing the initial setup for the fact-checking system.
Description of fields and views setup in Airtable for organizing and managing articles and facts, providing insight into database structuring.
The use of automation within Airtable to trigger fact-checking processes, demonstrating the practical application of Airtable's automation features.
Integration of a webhook to connect Airtable with Make.com, illustrating the technical setup for inter-service communication.
The setup of a Make.com scenario to handle the logic of fact-checking, including the use of GPT for text processing.
Implementation of an iterator to handle the verification of multiple facts, showcasing the use of looping mechanisms in automation.
The parsing of JSON data to manage fact information effectively, highlighting the importance of data formatting in automation workflows.
Use of HTTP requests to interact with the Perplexity API for fact verification, detailing the technical interaction with external services.
The final compilation of verified facts into a final article, emphasizing the system's output and its practical use for content creators.
A call to action for viewers to subscribe and like the video, indicating the creator's engagement with the audience and desire for community growth.
Transcripts
hey I hope you're having an absolutely
incredible day today I wanted to run you
through this new setup that I built
which is an AI news fact Checker now the
thing that's really cool about this and
I'll just pull up the make.com scenario
to show you what it looks like the way I
can explain this the best is through a
little story so I was introduced to
someone recently through mutual friends
and he runs a Blog where he makes a
considerable amount of money and most of
the blogs are written using chat gbt so
he'll use chat GPT to come up with ideas
and also to write the majority of the
article and the issue that he was
encountering is that not all of the
facts from Chad gbt from what it was
creating were actually real and some of
these were fake or some of them were old
based on what chat GPT has been trained
on and so he was spending a lot of his
time manually going and having to search
up this information on Google and so I
told them that there is a solution to
this and it can be fully automated and
so here it is and so firstly I wanted to
show you how it works and show you the
output and explain to you a little bit
of what's going on and then we'll go
ahead and build this out ourselves I
think that you will learn a ton if you
actually follow this to the very end
because it's pretty complex there's a
lot going on and it'll teach you a lot
about make as well as a lot of uh air
table so you you'll be learning some
basic strategies all the way up to some
more complex strategies and you'll also
get my thought process behind how this
was actually achieved so let's say he
takes his article he wants to be able to
fact check the entire article make sure
that what he's posting is relevant as
well as up-to-date information right
with what is currently available now the
issue is is that when you have a 2word
article chat GPT is really good at the
beginning and the end and so all of this
information in between kind of gets lost
and so you need to break up the entire
article into different facts and so what
I did is you paste in your article here
you click fact check it's going to run
it through this so essentially first it
comes up here it splits it all into
different facts it is then going to Loop
through these facts upload them back
into the fact database so here you can
see that it's split through every single
fact this was another one that I had run
right you can see is all complete here
and it's just going to check every
single one so that's when it comes down
through the second part of the
Automation and it is doing a request out
to perplexity to verify this information
and it verifies every single fact
individually through perplexity so it's
actually searching the web and
perplexity is doing that research for
you and then it goes and it re-uploads
it back into air table and you end up
with a final verified article that you
can see here so before we go any further
I'm just going to show you how it works
and we're going to run it right now so
we're going to back out of this
automation here and now we are going to
click Start faction now this is going to
trigger the automation within the air
table now if we come back here in a
second we should see that the execution
has started running it has triggered the
watch responses air table trigger and is
going to start splitting it into facts
if we hop back into our air table and we
click into the fax database we should
start to see all the facts starting to
be populated right here the scenario is
running boom it split the facts and now
it ising through all the facts and you
can see them start to get pushed in and
the accuracy is pending with the fact
check status in progress and with every
single fact it's going to tell you
whether the fact is actually true or
false and then provide you with
supporting evidence as to why based on
the research that it did so now you can
see it's looping through the second
portion right so right down here it's
looping through and it's doing the
research within perplexity and then we
come back into the generate article you
can see all of the different facts that
have been verified you can see that
these first four were all false where
the fact correction is and why it is
false and then lastly it outputs the
final article as a verified article it
marks the fact check status is done and
you can read the entire article and you
can view the changes that it made
yourself to make sure that it is
actually accurate all right so you can
see here you know if we looked at the
first one elvenwood is home to the
Redwood Forest Reserve where towering
ancient trees reached towards the sky
and then we see that it's marked it as
false and if we read the fact correction
the Redwood National Park in California
so it's not actually elvenwood it's the
Redwood National Park it makes the
changes based on the information that it
found and then it also provides you with
supporting evidence stating you know it
mentions elvenwood is not a real
location it seems to be a fictional
artistic reference as seen from this
book real locations for this are Redwood
National Park in California so it makes
the changes it does all of this research
for you so that you don't have to and
then it outputs the final article so in
my opinion that is incredible and now we
are going to dive in and learn how we
can actually build this out ourselves so
I hope you're ready this one's going to
be a big one and this one is super
awesome it has a real world application
there's someone doing this right now
making a ton of money and I'm super
happy to be sharing this with you I've
worked on it for the last couple of
weeks you know really iterating it it
used to have a lot more steps I tried to
simplified as much as possible and this
is where I ended up so let's get started
so the very first thing that we're going
to want to do is create a new AI news
fact Checker database so you're going to
go ahead create a new database from
scratch right so I just called mine AI
news fact Checker and then you're going
to want to have two tables the first
one's going to be articles and the
second one is going to be facts now
within the views I just created one view
so you come down here you click on new
grid and that'll give you the view that
you want and you can just retitle that
all articles and then within this you're
going to want to add a bunch of fields
so we are just going to Loop through all
of these fields now and we are going to
build it out from scratch together
before we go any further and we run
through all of the different columns
that we have and how it's all linked I
just wanted to mention that I do have a
school Community where I provide all of
these make automations for you also have
weekly calls and anytime you have any
questions whatsoever you can reach out
to me personally and I'll be able to
help you walk through and debug your own
issues and really get you from where you
are at to where you want to be so the
community is 60% off right now as we're
new and as we're growing and as I want
to make the community as best as it
possibly can and in order to do so once
we hit 20 community members it'll only
become 40% off and it'll continue like
that until it is full price and you'll
be locked in at a lifetime price of 60%
off and what I'm going to be building
out in the future I haven't seen anyone
else doing you'll be able to research
your niches pull in the best performing
posts of their data and then also be
able to create your own post all managed
within airtable and make.com and I'm
super excited to be sharing this with
you and building this out and sharing my
journey along the way so for this you
are going to need to have the article ID
which is just a simple ID Auto number
field I called it article ID you come
down here you select auto number and
that way every single article will have
its own unique ID you're also going to
want to have an article which is going
to be long text that's where you'll be
pasting in your article to have the
information verified you're also going
to have this AI prompt so it's also
going to be a long text and then the
text that we have here is split the
following article into logical chunks
based on ideas or facts we're going to
format the result as adjacent object
with an array called pairs now each
object within the array should have
three keys so we're going to have the
original which is going to contain the
original chunk fact we're going to have
a fact check which is going to be set to
pending meaning that the fact hasn't
been verified and it's either going to
be true or false and then we are going
to have correction which for the time
being should be said to null and if it
is false then it's going to have the
correction uploaded in there so we also
do not want to include any delimiters
like Json around the Json output right
so we want it in the pure Json format
and lastly here is the article and then
we are going to add a checkbox the
checkbox is going to be start fact check
and that is the style that we are using
we're going to have the fact check
status and there are three different
fields so you're going to come in here
you're going to choose single select so
you're either going to have not started
in progress or done and the default
option is going to be not started so
whenever you create a new article it is
going to automatically be in the not
started status next we are going to have
a record ID the record ID is going to be
the formula and then the formula is
simply going to be record ID with both
parentheses we are going to have the
total fact so this is essentially what
allows us to determine if the uh fact
check status is done or not right so we
have the the total fact and the total
fax is going to be count of the fax link
so I'll show you how to set that up in a
second then we're going to have fax
verified which is a count once again of
the fax link and we're going to turn
this on so only include linked records
from fax where fact check status is
complete once again don't worry about
that for now you can just go ahead and
set them up and choose count but we
won't be able to select the source yet
until we create the fact table and then
we are going to have the ready and this
is the formula which is saying like if
total fax is greater than zero and the
total fax is equal to the facts verified
give it the status of one otherwise keep
it at zero so essentially when these two
are equal put this to one otherwise if
all the facts haven't been verified yet
then the status is not ready because the
article is not done lastly I have two
other hidden Fields here right now which
is the fax linked and the compiled fact
so we'll get to those in a second for
now let's hop into the fax View and one
other thing that's important to note
that I forgot to say is you want to
group by the article so that every
single article that you create is going
to have this nice little dashboard now
if we hop into facts right I have two
grids so you're going to want to create
two grids the first one you're going to
click here you're going to click grid
the first one is going to be all facts
and then the second one is going to be
generate article so if we open up the
all facts it's got a pretty similar
setup to the Articles table so first
you're going to want to have a fact ID
which is going to be an auto number next
thing you want to have is the original
fact right so this is where your facts
are all going to be split so that is
just long text go ahead and save that
then you're going to have accuracy
accuracy is also going to be long text
then you're going to have fat correction
also long text and that's where if there
is a correction so accuracy will
initially be set to pending and then
once it is run through perplexity it's
either going to come back as false or
true and if it is false then you're
going to have a fact correction here and
then you're also going to have
supporting evidence which is going to be
long text as well so fact check status
is a single select and there's only two
options which is either it's in progress
or it's complete you are also going to
have a record ID so once again this is
going to be a formula with the record ID
you are going to have an article link so
now we're going to make our first link
right so you're going to go link to
articles so you go link to another
record and then you're going to select
the Articles table and that'll create
the article link and then I also have a
few other fields here that are hidden
I'll unhide them so that that you can
add them as well but you have the
article which is from the article so
that's a lookup field and we are going
to be looking up from the article link
that we just created and then we are
going to be looking up the article so
that's important because that'll allow
everything within our make to be
processed at once so what that means is
let's say you have 10 different facts
they're all going to be under the same
article which is the article ID so let's
say article ID is one and within article
ID 1 we have 10 different facts that are
created well this is going to link them
all together here and then we also have
ready which is another lookup field and
we're looking up in the article link
that we created and we're looking up the
ready table and then lastly we have the
fact display which is a Formula which is
essentially saying that if the accuracy
is equal to True provide the original
fact otherwise provide the fact
correction so this is is going to be
important when it comes to compiling
everything together at the end because
for every single fact we're going to
have the fact display and then we're
going to roll up the fact display so
essentially what's happening is if the
accuracy is equal to true meaning that
the the fact is actually true provide us
with the original fact otherwise if the
fact is false provide us with the
correction all right so I'm just going
to go ahead and hide those fields and
then I also have it filtered by the fact
check status so where fact check status
is not complete so as soon as it becomes
complete it comes off of all facts and
it goes into generate article and then
they are grouped by the article link so
that you get a nice view in this
article's all facts table now if we go
to generate article right so you just go
create a new grid generate article
that's what you can name it and then I
filtered by you know I want to show
records where fact check status is
complete and ready is equal to one and
then they are grouped by the article
Link in this table as well so that you
get this nice little dashboard now we're
going to hop back into articles and
within articles now we can create these
last three right here so if we go to
Total facts and we do a count we're
going to select the the count link the
count source which is going to be equal
to the fax link now in order to connect
it to that we are going to have to
unhide two more Fields so this is where
we're going to create our last two
fields that we couldn't before because
we had to create the fax table so I'm
just going we're going to go ahead and
unhide those now and so here we can see
the fax link so this is going to be a
link we're going to allow linking to
multiple records and we're going to call
it the fax link so essentially this
article is linked to all of these
different facts and if we hop into the
facts right 9394 we can see that all of
these are linked under this specific
article ID where these are the fact IDs
so we have that there and then lastly we
have the compiled fax which is a rollup
of the fax link so a roll up of all of
these fact and we are just joining those
values and we are separating them by a
space that's all that's happening there
now that we've created the fax link and
the compiled facts we can hop into total
facts so once again we going to select
count and we are going to select the fax
link as the count source so right we see
that there are six facts so it's going
to show us that there are six total
facts and then facts verified is also
another count we're linking it to facts
link again but we are adding in this
condition where the fact check status is
equal to complete so it's only counting
complete facts or facts that have been
verified and lastly if we look at ready
it is just saying if the total fact is
greater than zero and total fact is
equal to the facts verified then give it
a status one meaning that it's complete
all right and so now we have both of our
tables setup and if we go into our
automations there's a few automations
that we need to have as well so the
first one is going to be the start the
fact check right when I click the button
to start the fact check we need to send
that trigger into make in order to
create the make scenario so we are going
to have it so that when a record matches
a specific condition we are going to
connect it to the article's table and is
going to be when start fat check is
clicked and when that happens we're
going to run a script
the record ID is going to be equal to
the air table record ID and then we just
have this simple code go ahead and open
this up you can see here the name and
the value we we need to create an input
variable so we call the the variable
record ID capital I and the value is the
air table record ID and we are just
saying you know fetch this web hook so
we're going to go ahead we're going to
create a web hook and make now and the
action is going to be equal to fact
check so if we hop into the fact Checker
we click on watch responses right that's
the first thing we need to do so you're
going to create a new trigger it's going
to be the watch responses in air table
and right you would just go ahead You'
create a new web hook you'll see here
right that that web hook has a specific
address we're going to copy that address
to clipboard and we are going to paste
it right here so await fetch so you're
awaiting for that URL of that web hook
to get this trigger going and then we're
going to pass the record ID as well as
the action fact check so that's the
first thing you can go ahead you can
choose your record right so you would
just choose one of the Articles or
choose an article load in some sample
data there what I did to test it out is
I said create an article about a travel
destination with both real and fake
information please do not specify which
is real and fake just write the article
and then I copied all of that
information and I pasted it into the
article's table so I came in here I hit
plus I create created a new article and
I just dropped it under the article it's
going to start and then we want to
create a router it's going to have two
routes the first route is going to be
the fact Checker which is going to split
it into individual facts so for that you
want to set the label to fact check the
condition is going to be the action that
is passed from Air table so the action
in in this case is fact check and we're
going to set the text equal to fact
check so that when we hit the start fact
check button it is going to trigger this
automation of starting the fact check
and it's going to run this script and go
past this information and know to go
down this path now to test that once you
could just choose the record like we
just did and then hit Test action and
then come into to make and hit run once
and it is going to trigger that now next
thing we want to do is get that actual
record that is just triggered right so
that we can split it into facts so
you're going to go ahead you're going to
create your connection within air table
if you don't know how to do that and it
is your your first time it's really
simple you click on your account within
developer Hub you can then create your
own personal access token name it
whatever you want and then you just want
to make sure that you add all of the
possible Scopes you click here add scope
click all of them and then add the right
base right the right database so I just
have it set to all databases and then
you're going to go ahead hit save and
then that'll get created and then it is
very simple to just set it up afterwards
like that then you are going to want to
choose your base so we named ours the AI
news fact Checkers so you want to make
sure you select the the right table in
our case it's articles and then the
record ID is going to be the record ID
that was passed when we tested out this
trigger for the first time so now let's
grab that information the next thing we
want to do is update the record so once
again create your connection select the
Articles table grab that same record ID
from the first step here and then we are
going to update the fact check status to
input progress right so you can just
turn off mapping and then it is now gone
from not started to in progress so that
when we click Start fact check it gets
flipped into in progress status and we
will leave the rest blank ahead and hit
okay now the next thing we want is to
split this into Json so we're going to
create a chat completion we're using GPT
40 the role is set to user and then the
message content is you are an assistant
that formats text for Jason
compatibility your task is to process
the following article text by replacing
new lines with n and escaping double
quotes with one two three four five
slashes right return the formatted text
only here is the article text where I
paste the article and the article is
going to be from the record that we just
grabbed right the article and then we
going to ensure that the Json is
properly formatted without any line
breaks with within string values and we
don't want to include any delimiters
like Json or around the Json output set
the max tokens equal to zero after that
is done we're going to split the article
interax we want to create a completion
so we're going to choose the GPT 40 the
r set to user and then message content
is going to be the AI prompt right so so
we're going to split it into different
facts and different chunks with the
original the status and the correction
and then we are going to pass that
article here's the article Max token is
going to be set to zero hit okay and
then once that is done we'll get a bunch
of different pairs and we now want to
parse that Json right and so to do this
you would add these two steps we're
going to head back into the AI news fact
Checker we're going to test the action
again we are going to run this once and
then we'll get that information passed
down through here and then to parse the
Json we'll grab the result from the
splitter so you can see here's my result
right you can see this Pairs and then
you're going to have it split properly
into the different facts now once that's
done we need to iterate through all of
those facts and we need to pass that
back to air table so for that I just put
in an iterator and that is linked to the
pairs so you can see here it is now
split nicely into original fact check
and correction it was parse properly and
we're going to grab that iterator we're
going to grab those pairs we're also
going to sleep so I found if you put in
a 1 second sleep timer it prevents it
from all the records being updated at
once which sometimes causes it to crash
so having this sleep timer of 1 second
allows each individual fact to come in
without any errors and then lastly we're
going to create a record so now we're
creating a record in the fax table so
instead this time connect it to the fax
table and then from there from that
record we are going to pass the original
fact so that's going to be the original
from the iterator then the accuracy is
going to be set to pending right for the
article to be verified or for that fact
to be verified and then the fact
correction is going to be the correction
which is blank because it has not had
any chance to be verified yet we're
going to set the fact check status to in
progress and the article of the record
ID right is going to be the record ID
from the very beginning this allows us
to have all the facts contained within
that article based on the record ID so
once all of that is done and go ahead
hop back into here you're going to test
the action again you're going to hop
back into make you're going to run it
once and you should now have if you hop
into your facts table if you go into all
facts you should have all of your facts
here since mine have already been
verified when I did this example at the
very start you'll see that the generate
article portion is full but in your case
under all facts you should see all these
set to pending all of this should be set
to blank and you're going to have the
original fact the accuracy set to
pending and the fact check status to
impr progress now let's build out the
second portion of the fact Checker so
now that it's split everything into
facts and it can verify all facts
individually next thing that we want to
do is we want to get a record so same
thing we're going to come into air table
we're going to create a new Automation
and that's going to be fact check online
and so what's going to happen is when a
record enters the allfax view right so
when a record enters a view we're going
to select the fax view is going to be
set to alax we're going to run a script
so it's the same script that we just had
the previous step once again we're going
to create an input variable which is
going to be the record ID and it's going
to be the air table record ID and then
we are going to fetch the same web hook
we're going to pass that record ID and
this time the action is going to be set
to online verify so when we come back
here in the router when we have this
filter it's going to be set to online
verify where the action that is passed
from the watch responses is going to be
equal to online verify so now it knows
to come down this path and not the fact
check path once again we are going to
get the record we are going into the
fact Checker database we are going into
the Articles table and we are grabbing
the record ID from the very start so to
get this kicked off you'll want to come
into here choose a record choose any one
of the records that are going to be in
your table and then you're going to hop
into run a script and click Test action
and then you're going to run this once
and then your response will come through
here and you should be able to get that
information and the record ID now the
next thing that we want to do is parse
the text right so I was getting this
error because of the blank spaces and
how it was formatted coming from a table
into make it wasn't always properly
formatted and a lot of that had to do
with titles and then there would be a
space and then there would be the body
section of that article and when that
happens it doesn't allow you to have
proper Json formatting so what we are
going to do is put in this text parser
which is going to remove that and allow
it to pass through uh in proper Json
formatting so I just did sln as the
pattern and the new value is going to be
dou sln in instead so essentially what's
happening is this is the search pattern
that it's looking for and then it's
replacing that pattern with this new
value and then we are going to want to
check Global match check that it's case
sensitive because it's always going to
be lowercase n and check the multi-line
as well single line you can set to know
and then the text is going to be the
original fact is created within your
table hit okay next thing because of
rate limits with perplex we don't want
to send all the facts at once so we add
a 5sec sleep timer and this is just due
to perplexities rate limits with their
API so next thing we want to do is make
an HTTP request to perplexity so we are
going to have this as the URL https API
perplexity completions we're going to do
a post request so we're going to be
sending information to them for that to
verify we are going to set the header to
accept application Json as the value the
second header is the name is going to be
authorization and then it's going to as
the value is going to be ver Bearer and
then your API key that you're going to
get from perplexity lastly the third
item that you want is the content type
as the name and the value as the
application Json for your third header
then we are going to have the body type
set to Raw the content type set to Jason
and then this is the request content so
here is the model that we are using for
this specific case the role of the
system is really to ensure that the
information is up to date accurate and
relevant right because we are verifying
all these facts so that's what we're
asking the system to do and then the
prompt that we're passing it so we're
going to pass the role as the user the
content is going to be you are
factchecking assistant your task is to
verify the accuracy of the following
statement and provide a detailed
response it is going to be the text that
has been parsed properly so the fact
that has been parsed properly and this
is is why it's so important to have that
in there because if you don't have the
text pared properly then this Json
request will not work because there's
going to be spaces in it so your
response should include whether the
statement is true or false supporting
evidence or sources and a corrected
version if needed and then format it in
the following response in the following
format accuracy true or false supporting
evidence provide specific evidence of
sources here and then a corrected
statement so if the original statement
is false provide a corrected version of
the entire original statement with
accurate information if the statement is
true leave this field know so once that
is done we are going to have another
completion created within chat
GPT I would recommend that you hop in
your fact check and you test the action
you hop back in here you run a once and
you make sure that you get a status code
of 200 for perplexity because otherwise
the rest of the steps won't work so once
you get a status code of 200 then you
can proceed onto the chat GPT step
and before going any further I'm going
to be sharing this request content with
you so that you have it and you can just
copy paste rather than having to do it
all yourself and then we're going to
have the create a completion within that
GPT so we're going to set the role to
user and then we're going to have the
following prompt so format the following
fact checking result as adjacent object
with these fields now accuracy
supporting evidence correction remove
any prefixes right so we want to get it
into the proper Json format so that we
can split it again using par Json and
then pass all those values back into our
air table and then the factchecking
result is going to be the data
choices message content so it's going to
put that into proper Json formatting for
us and then lastly we are going to parse
the results from chat GPT so you just
come in here you select the result it
should be parsed properly based on the
prompt that we gave it and then lastly
we are going to update our air table
record So within fax you're going to
grab the record ID now the record ID is
not going to be the original record ID
within air table we're going to want to
grab the air table record ID make sure
you choose this one down at the bottom
from the following step right here and
then the record that we're going to
update is the accuracy so the Json has
now been parsed properly it's going to
be the accuracy under the accuracy the
fact correction so whether the fact is
true or false is going to be the
correction and then the supporting
evidence is going to be supporting
evidence which is going to be pass right
here we're going to update the fact
check status to complete so make sure
that you turn this off and select
complete when this is switched into
complete it'll also trigger the number
of facts that are verified and that is
it for that and you want to go ahead and
save and you can go ahead and test it
again test the action and run it once
and have it run through this entire
prompt and if it's done properly you
should end up with one of your facts
under the generate article with the
accuracy either set the true or false
and if it's false it should have a fact
correction with supporting evidence now
I do have one other automation that's
important and that is when the fact
check is equal to complete so lastly
we're going to to set one last
automation within air table which is
when a record matches the condition
where the article's table as the
verified article is not empty so
essentially what's happening is when the
verified article is not empty right
we're going to update the record of the
fact check status of the articles with
the record ID and the fact check status
is going to be equal to done so now what
that'll look like on your main page
within the AR articles it's going to
trigger and say hey this article is now
complete and your verified article
should pop up here now you should be
able to turn on all of your automations
as well as turn on your make scenario
and back in here you can paste the
article that I'll have shared with you
and you should just be able to click
Start fact check it should run
completely in the background and output
a verified article that has been
searched has has found the latest
information updated it where it could
and output a completed and verified
article that is correct now this took me
a ton of time to build out and I'm super
psyched to be sharing it with you I hope
you got immense value out of it and if
you did I would really appreciate if you
dropped a like And subscribe it's free
and it really helps my channel grow and
allows me to continue making videos like
this so I hope you have an incredible
day and I'll catch you on the next one
peace PE
Voir Plus de Vidéos Connexes
Online Verification Skills â Video 4: Look for Trusted Work
7 Best AI Content Writing Tools of 2023 (Most Are FREE)
Make Money as a News Writer (FREE Google News alternative)
How to Spot Fake News - FactCheck.org
The Fifth Macro Skill in Communication: Viewing || Grade 9 English || Quarter 3 Week 3
15 ChatGPT Mistakes Beginners Make
5.0 / 5 (0 votes)