---
title: "Compare News Sources"
video_id: YtZpk_8osMo
url: https://www.youtube.com/watch?v=YtZpk_8osMo
workflow_page: https://workflows-of-ai.com/workflow/compare-news-sources
language: en
captions: generated
---

0:02 hey there Marcus here um the workflow
0:05 today I'm not actually going to show you
0:07 how to set it up it's already set up so
0:09 it's a little bit like the chefs on TV
0:11 where everything is
0:13 prepared uh but I will show you what is
0:16 set up and what is going to do so the
0:18 workflow today is we're going to take
0:20 two different uh articles talking about
0:23 Labor Market in AI one from Fox News and
0:25 one from
0:27 CNN we're going to scrape those
0:30 uh and then we're going to analyze
0:32 what's the difference between them how
0:34 how how do they uh which tone do they
0:38 have which sentiment do they
0:40 have uh as always this is Drupal uh
0:44 vanilla Drupal installed already uh AI
0:47 interpolator installed already and in
0:49 this case I have set up the content
0:51 types and Fields that we need but I'm
0:52 going to go through that now uh also as
0:55 always this is open source it's
0:57 completely free you can set it up
0:59 directly after this video is done all by
1:01 yourself on your computer or in a uh
1:04 server in the
1:05 cloud so we start by logging
1:08 in then I'm going to show you the
1:10 content type here then so I called it
1:13 diff In
1:15 Articles uh we're using content types in
1:17 this case but usually when you work with
1:21 a lot of data and um data analytics you
1:25 should be doing custom entities in
1:26 druple right um and in this case you
1:30 could even run it as API and have the
1:32 data stored outside of truple if you
1:35 would like if you're uh doing a lot of
1:37 data analyses
1:38 right so first of all they have two uh
1:42 link Fields here and the link Fields
1:45 it's just a CNN link and a Fox News
1:48 links that's taking external links no
1:51 link text needed they are required both
1:53 of them then we have the Fox News
1:55 article that's a text format long
1:57 because that's a HTML field right
2:00 uh and these using the scraping bot
2:03 crawler then that's the crawler using
2:05 the scraping bot API
2:07 services so the Fox News article is
2:09 getting its uh Bas it's based on the Fox
2:12 News link right so it's going to go to
2:14 this link scrape it and then under
2:16 advanced settings we have made sure that
2:18 we're using browsers because we're using
2:20 the scraping bot services and we're from
2:22 United States so there's no uh gdpr
2:25 blocker or something like that and then
2:27 the crawler mode is set to article
2:29 segment because we just want the content
2:31 we don't want the whole website because
2:34 we only care about the actual content
2:35 and we don't want some specific selector
2:38 that you can also do with this we have
2:40 made sure that it's in batch mode so we
2:43 can see the progress we did the same
2:45 with the CNN article
2:47 then and then the last thing is a diff
2:50 sentiment where we want to see the
2:51 difference between these and here is the
2:54 interesting thing then because since we
2:57 have two context fields in this case we
2:59 can use a base field so we having the
3:03 rule open a string long that takes text
3:05 and generates text right but we have
3:07 something called the advanc mode which
3:09 is based on a token module and the token
3:11 module gives you all the tokens
3:13 available for this
3:15 entity which means that we have all the
3:18 fields under the the node in this case
3:20 so you can see here based on article one
3:22 and article this is the prompt based on
3:24 article one and article two look at how
3:27 they differ in tone sentiment and
3:28 analysis on the sub object into
3:30 sentences write me eight sentences on
3:32 this we have article one the limiter and
3:35 then the token for that article to
3:38 delimiter the article for
3:41 that then under advanced settings we
3:43 make sure that the interpolator weight
3:45 is
3:46 higher because of course we have to make
3:49 sure that the content of uh the website
3:52 is scraped before we do the analysis
3:55 runs batch mode gp4 because this is
3:59 pretty uh complex so now we can just try
4:02 to do this and since it's identity type
4:04 we could sorry we could set up we could
4:08 do this with as many links as we want
4:10 right this it's not just this CNN link
4:13 and this Fox News links this is just
4:14 example here right I also make sure to
4:17 show the field so you can see that
4:19 they're actually going to be filled out
4:21 if you're going to sell this as a
4:23 service or something you should of
4:24 course hide that data also since it's
4:28 scraping you have to check check your
4:30 local law you might not be able uh be
4:33 allowed to store it right this is just
4:36 for an example
4:37 now so we do
4:40 comparison going to get the CNN link
4:43 paste it in we're going to get the fox
4:46 link and paste it in this we don't have
4:48 to fill in because that's going to get
4:50 filled in same with the diff sentiment
4:52 hopefully now then click save and the AI
4:55 interpolator starts working it's going
4:57 to be three uh jobs that it need needs
4:59 to do in the progress part so it's
5:01 currently scraping one of the websites
5:04 now it started scraping the second
5:08 website and then as third thing
5:10 hopefully now it's going to do uh
5:13 basically a diff analysis on how
5:16 they um how they uh look at the topic
5:21 from which angles which tone which
5:23 sentiment and so on it wasn't a very um
5:27 Advanced prompt right now so this comes
5:30 back to prompt engineering you can of
5:32 course create a lot more advanced
5:34 prompts here to get exactly what you're
5:36 looking for so I go to edit again so we
5:39 can see it in field mode so you see it's
5:41 got the CNN article and just the content
5:44 right same with Fox News just the
5:47 content and then it has the diff
5:49 sentiment here so both articles discuss
5:52 the potential impact of artificial
5:54 intelligence on labor markets
5:55 specifically addressing blah blah blah
5:58 however they differ in tone Center ment
5:59 and Analysis article one from CNN adopts
6:02 a more neutral tone and provides an
6:04 in-depth analysis on report by Goldman
6:08 Sachs and I um this uh I just took two
6:13 articles now and I think actually the
6:15 Fox News article was more of a of a a
6:19 opinion piece so this doesn't say
6:21 anything about the actual uh news
6:24 sources uh it was just to have some
6:27 example in this case so
6:30 so that is basically how you would set
6:32 up such an
6:33 analysis uh using the AI
6:36 interpolator so um yeah have fun doing
6:41 it thank you for
6:43 watching
