Video summary
The presentation outlines a comprehensive pipeline designed to transform raw article data into graded reviews using the Fedora Editorial Assistant. The process begins by fetching articles from the Fedora Community Blog and Fedora Magazine via the WordPress REST API, converting the resulting JSON and HTML source data into Markdown format suitable for writing enhancement. A critical lesson highlighted during the ingestion phase is the relationship between chunk size and system resources; initially running the task on CPU led to memory issues due to large token counts, prompting a shift to a GPU environment managed by mentors. This step utilizes RAG with internal Duckling parsing to create a vector store, which is packaged into Open Container Images (OCI) hosted on Quay for efficient querying and deployment.
To ensure high-quality output, the system employs a rigorous evaluation framework using Rag Eval before generating reviews. The pipeline analyzes the dataset quality, filtering out articles that fail specific criteria such as missing featured images or excessive tags, ultimately producing a final verdict on drafts. For instance, a sample review might identify that an article has a good tone and structure but lacks necessary metadata and is too brief. Authors can download these detailed reviews as text files to make targeted improvements before resubmitting their work for publication in the Fedora Account Lab or magazine. The system currently supports two models, Google Gemma and Granite, which are used to assess the draft against established guidelines regarding tone, structure, and community warmth.
The tool offers multiple interfaces to accommodate different user needs, ranging from a graphical Streamlit application for non-technical users to command-line interfaces and Jupyter notebooks for developers. The Streamlit app allows users to paste a draft directly into a text area and receive an instant review with actionable feedback, while the CLI provides a streamlined experience for tech-savvy users who can integrate the Qdrant vector store and call models directly. Additionally, a Jupyter notebook is available for those who wish to visualize every step of the process, from fetching articles via the WordPress API to performing quality analysis and chunking strategies. This flexibility ensures that contributors can engage with the system at their preferred level of technical depth while maintaining consistency in editorial standards.
Finally, the project emphasizes reproducibility and community contribution through a well-documented repository containing guides for setup, environment configuration, and scaling. Users are instructed to create a virtual environment, install dependencies from the provided requirements.txt file, and set necessary environment variables before running the fetch or review scripts. The documentation also includes a contribution guide for those interested in helping the project grow, alongside instructions on how to refine system prompts and iterate on the pipeline. By providing clear guidelines on reproducing the work locally and pushing updates to the Quay registry, the team ensures that the editorial assistant remains accessible and adaptable for future developments in Fedora's publishing ecosystem.
Read the full video transcript
All right, so in this part of the
presentation we are going to take an
article and we will try to move from raw
data to grade up review. But first we
will try to pull or like to fetch
articles from the Federal
uh com blog and then also the Federal
magazine using WordPress API
and we will end up like sort of
setting the guidelines as the ground
truth
and then
do ingesting and like chunking using Ram
Rag that runs like Duckling internally
to do the parsing and the chunking. Uh
there is a lesson that I just want that
we learned and that I just want to
mention here is that
the more like higher the number of chunk
or like the chunk size is
uh
it's it's likely that you will run into
like uh
like short short like storage issue,
right? Uh
because at like at first we were running
it entirely like on CPU which actually
sort of
like led my mentors to provisioning
um
a GPU environment in which now we do the
work. So
the the fourth step is like building the
vector store
uh
uh Ram Rag in this case actually sort of
produces um OCI images like open
container images that are hosted or like
published on Quay
from which you actually now do the your
query
and then at the end we did
model evaluation using like
Rag Eval which is a Rag evaluation tool.
Um so
we do have the repo itself. So here's
the repo for this tool which you can
actually
test out.
Um
So basically
here is what the pipeline actually sort
of looks like. So you have the WordPress
REST API
that fetches the articles from like
Federal Account blog and then Federal
magazine and then you actually end up
getting like raw data and then like
source data in JSON and HTML format.
And then these are actually sort of
converted into markdown because that's
what you actually use for the writing
enhancement.
And then Ram actually
with Duckling that runs internally. So
at the end you build the vector store
and you get these uh OCI images that I
was there on Quay. And which would
actually find here on Quay
uh under like this Fedora Quay uh like
repo. So you'd find all of these uh uh
the three OCIs. I like the three open
container images. So the first one for
the community blog, the magazine is in
an editorial just means combining both
the community blog and the magazine.
Um I'll come back to this.
So basically
um the problem with chunks as you see is
something you were actually going to
read uh here in the repo.
And then at first you just try to clone
the repo and you CD into it. Uh make
sure you create like um
an environment like a virtual
environment. And then the
requirements.txt file is already created
in the repo, so you can install it. And
then you set your environment variable
with this.
So this is how you fetch your articles
using [clears throat] the WordPress API.
Uh
uh the files are also in the repo.
And you stage the corpus.
You can try to regenerate like a quality
report. It's uh
just analyze the data set quality before
you start like your writing enhancement.
And then here is how you actually build
the right vector store. We just truncate
100 because
at first uh which is what you see here,
we run into like
uh memory outage uh because of the the
the the number of tokens that it takes.
But now we do have a working environment
environment provided by the community
through
my mentors and then we increase the
chunk size.
Um so you can push them uh which I just
showed you
uh on Quay a few seconds ago. And you
can also now try to run it directly
using the three uh Streamlit uh
app.
Which is here.
And then the app actually
uh it's either you can check it against
like Fedora community blog articles or
like Fedora magazine articles or like
both publications.
So, you have this text
area where you actually paste a a draft
article and then you just click on
review article, it gives you like a
review after after it runs. Uh we we
chose two models for now. Um
So, we chose the Gmail, which is the
recommended one uh
for now and then like Granite.
Um
and then as you can see here, I actually
took uh Fedora article and then I pasted
it here and then after that it says,
"Okay, uh first of all, there is no
featured image." So, this one failed.
Um
the
says, "Okay, more tags than easy space
after this one." and so on. Like at the
end, it will actually provide you with a
final verdict. Like it needs a revision,
of course. So, it is that the draft has
a good tone and structure, gameful but
is extremely brief and lacks all
necessary metadata and publishing like
elements. So, you can download like the
review uh any author can actually
download the review to a txt file and
make the improvement in their draft and
resubmit again, making sure they all
work and then yeah, have it published in
the Fedora Account Lab or like magazine.
Um the other thing is you can actually
run it directly uh again. Uh
Uh first of all, like when you get back
here, there is a doc folder
a doc folder in which you see this
guide.md that gives you like a guide of
how to reproduce this work on your local
machine or like uh locally. Anyways, um
so, these are like the installations
that you have to do like the
prerequisites. Um and then you clone the
repo, you see the into it and then this
is the expected output when you just try
to find uh what's in the repo.
Like creating the Python the the virtual
environment and then you activate it.
Uh so, here you try to install like the
requirements.
And then
yeah, creating just like a .env and then
like uh now
creating like your environment
variables. And after that, uh
just editing this one these ones and
then you can now fetch the articles
here.
If you run like the fetch article
directly, it will fetch both. If you
want to fetch only like
um either like the com blog articles or
like the magazine articles. So, you
could do that too by giving this {dash}
{dash} source and then com blog or like
magazine.
Uh so, this is the expected output. Uh
it would actually maybe tell you that
okay, there is this much number of
articles that were fetched and state and
saved into data {slash} raw {slash} com
blog and 40 magazine, too. Then you can
verify the output with this.
Um so, you could analyze like the data
set quality, as I said uh before. And
then here like the expected output would
just give you a
uh like after the analysis, how many of
those articles actually uh have good
quality for your writing enhancement.
And then how many of them like passed
and how many of them like failed.
Uh so, you can do the review and then
now you pull the models like G mine
granite.
And then now you build your the vector
store and then you push them to Qdrant.
You make you make sure they're on
Qdrant.
Um now you can go ahead and try and test
it, right? So, you could test them
either like on
using the Streamlit app, which is
actually really intuitive for
anybody who does not have maybe like a
tech background who just want like a
GUI, a graphical user interface, where
they would actually come and uh paste in
the draft article and then just click on
uh review article. Or you could do it
using the CLI, right? I just prepared
this to save us some time. So, you run
it from a llama run, right? And then you
give it the
uh the Qdrant image and then you call
the model. So, you wait for it and then
it works also like um on the command
line interface. So, basically ask you
the question, uh what tone should a
future article in your blog article
actually use?
It says that the tone has to be a Yeah,
the tone of a future blog article should
be a careful balance between technical
authority and community warmth.
So, it gives you the pillars, what are
called what is the core philosophy, what
you have to avoid here.
Uh
adjusting the tone of my topic, you
know, for technical tutorials, and how
to guide debugging, and so on. So, like
at least you see that you can also run
it like if you're really like tech
savvy, you can run it using the CLI.
Another way of doing it is you can run
it using like uh because when you check
there is a
Yeah. Okay, like a Jupyter notebook that
you can actually try to launch. Uh
So, I'm just going to copy this one here
and then come back and paste it here.
Click.
And then it will launch a notebook where
you can actually sort of visualize
everything, right? So, here you try to
do all of the imports, like just the
setup. Now, here is how it where you
fetch the articles using WordPress API.
And after that, you do the quality
report analysis to remove articles that
are not of good quality, you know, for
your writing enhancement enhancement.
And chunking strategy. And so on. Now,
the write testing, you have all of
these, which were actually
over there
previously what I was showing in the
repo.
Um so, yeah, you could actually try to
run this and also visualize using the
notebook directly. Or you could use the
CLI or the Streamlit app, which is the
recommended one for everyone
regardless of your your competencies
like in in in in
in tech.
So, basically, that's it for all this
one.
And
you can do some iterations. Um
You can also refine like your system
prompt. So, here's the full pipeline,
and yeah. So, basically, that's it. And
then when you check this
docs folder inside the repository, there
are like guidelines on how to set it up,
how to reproduce it, and also if you if
I want to contribute, there is a
contribution guide. Uh
and also like other details on uh what's
needed for this project to scale or to
be reproduced.
Thank you so much for listening and uh
uh there is
a next video that will give a lot more
details about like the internal aspect
of this one.
Thank you.