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|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>A Project to quality check the submitted articles</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: Arial, sans-serif;
|
| 10 |
+
line-height: 1.6;
|
| 11 |
+
margin: 20px;
|
| 12 |
+
}
|
| 13 |
+
h1, h2 {
|
| 14 |
+
color: #333;
|
| 15 |
+
}
|
| 16 |
+
h2 {
|
| 17 |
+
margin-top: 30px;
|
| 18 |
+
}
|
| 19 |
+
ul {
|
| 20 |
+
list-style-type: disc;
|
| 21 |
+
margin-left: 20px;
|
| 22 |
+
}
|
| 23 |
+
p {
|
| 24 |
+
margin-bottom: 15px;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
table{
|
| 28 |
+
border-collapse: collapse;
|
| 29 |
+
width: 95%;
|
| 30 |
+
border: 2px solid #2c3e50;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
tr{
|
| 34 |
+
border-bottom: 2px solid #b60e0e;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
td{
|
| 38 |
+
width: 15%;
|
| 39 |
+
vertical-align: top;
|
| 40 |
+
border: 2px solid #3498db;
|
| 41 |
+
}
|
| 42 |
+
</style>
|
| 43 |
+
</head>
|
| 44 |
+
<body>
|
| 45 |
+
<h2>Overview of the project</h2>
|
| 46 |
+
<p>
|
| 47 |
+
In this project we will evaluate the quality of all the articles submitted by the content writers.
|
| 48 |
+
All the articles are fetched based on a time window (last 3 days, last one week etc). Llamaindex workflow will be utilized
|
| 49 |
+
to check each article for its structure, any missing elements are there in the article and give an overall feedback.
|
| 50 |
+
We use a pydantic schema to predefine the structure and llm will be using the sturcture predict to evaluate.
|
| 51 |
+
A final report is created.
|
| 52 |
+
</p>
|
| 53 |
+
<h2>Here is the design, we will examine two approaches</h2>
|
| 54 |
+
<p>
|
| 55 |
+
First approach, each is a seperate task
|
| 56 |
+
<pre>
|
| 57 |
+
+----------------------------------+
|
| 58 |
+
|
| 59 |
+
| User Time Window |
|
| 60 |
+
| (e.g., "Last 24 Hours") |
|
| 61 |
+
+----------------+-----------------+
|
| 62 |
+
|
|
| 63 |
+
v
|
| 64 |
+
+----------------+-----------------+
|
| 65 |
+
|
| 66 |
+
| CMS System |
|
| 67 |
+
| (Fetch Articles in Time Window) |
|
| 68 |
+
+----------------+-----------------+
|
| 69 |
+
|
|
| 70 |
+
v
|
| 71 |
+
+-------------------------------------------------------------------+
|
| 72 |
+
|
| 73 |
+
| LLAMAINDEX WORKFLOW |
|
| 74 |
+
| |
|
| 75 |
+
| +-----------------------+ +--------------------+ |
|
| 76 |
+
| | Start Event | | Router / Dispatch | |
|
| 77 |
+
| | (Incoming CMS Data) +------------->| (Parallel Execution) | |
|
| 78 |
+
| +-----------------------+ +---------+----------+ |
|
| 79 |
+
| | |
|
| 80 |
+
| +-------------------+----------------------+ |
|
| 81 |
+
| | | | |
|
| 82 |
+
| v v v |
|
| 83 |
+
| +--------------+ +--------------+ +-------------------+ |
|
| 84 |
+
| | Task 1: | | Task 2: | | Task 3: | |
|
| 85 |
+
| | Structure | | Wellformed | | Content Quality | |
|
| 86 |
+
| | Analysis | | Validation | | Assessor | |
|
| 87 |
+
| +------+-------+ +------+-------+ +---------+---------+ |
|
| 88 |
+
| | | | |
|
| 89 |
+
| +-------------------+----------------------+ |
|
| 90 |
+
| | (Emit Partial Results) |
|
| 91 |
+
| v |
|
| 92 |
+
| +--------------------+ |
|
| 93 |
+
| | Gather / Step | |
|
| 94 |
+
| | (Collects 3 Tasks) | |
|
| 95 |
+
| +----------+---------+ |
|
| 96 |
+
| | |
|
| 97 |
+
| v |
|
| 98 |
+
| +--------------------+ |
|
| 99 |
+
| | Stop / Report Step| |
|
| 100 |
+
| | (Synthesize Data) | |
|
| 101 |
+
| +----------+---------+ |
|
| 102 |
+
+-----------------------------|-------------------------------------+
|
| 103 |
+
|
|
| 104 |
+
v
|
| 105 |
+
+--------------+-------------------+
|
| 106 |
+
|
| 107 |
+
| Final Quality Report |
|
| 108 |
+
| (Structure, Format & Insights) |
|
| 109 |
+
+----------------------------------+
|
| 110 |
+
|
| 111 |
+
</pre>
|
| 112 |
+
Second approach is all the tasks are clubbed to one single workflow step task.
|
| 113 |
+
<pre>
|
| 114 |
+
+----------------------------------+
|
| 115 |
+
|
| 116 |
+
| User Time Window |
|
| 117 |
+
| (e.g., "Last 24 Hours") |
|
| 118 |
+
+----------------+-----------------+
|
| 119 |
+
|
|
| 120 |
+
v
|
| 121 |
+
+----------------+-----------------+
|
| 122 |
+
|
| 123 |
+
| CMS System |
|
| 124 |
+
| (Fetch Articles in Time Window) |
|
| 125 |
+
+----------------+-----------------+
|
| 126 |
+
|
|
| 127 |
+
v
|
| 128 |
+
+-------------------------------------------------------------------+
|
| 129 |
+
|
| 130 |
+
| SINGLE-STEP STRUCTURED PREDICT |
|
| 131 |
+
| |
|
| 132 |
+
| +-----------------------+ +--------------------+ |
|
| 133 |
+
| | Raw Article Data +------------->| LLM Context | |
|
| 134 |
+
| +-----------------------+ | (Single Payload) | |
|
| 135 |
+
| +---------+----------+ |
|
| 136 |
+
| | |
|
| 137 |
+
| v |
|
| 138 |
+
| +--------------------+ |
|
| 139 |
+
| |llm.structured_predict |
|
| 140 |
+
| +---------+----------+ |
|
| 141 |
+
| | |
|
| 142 |
+
| v |
|
| 143 |
+
| +-----------------+------------------+
|
| 144 |
+
|
| 145 |
+
| | Unified Pydantic Schema Validation|
|
| 146 |
+
| | [Structure + Format + Quality] |
|
| 147 |
+
| +-----------------+------------------+
|
| 148 |
+
+----------------------------------------------------|--------------+
|
| 149 |
+
|
|
| 150 |
+
v
|
| 151 |
+
+-------------------------------------+------------+
|
| 152 |
+
|
| 153 |
+
| Final Article Report |
|
| 154 |
+
| (Instantly validated JSON / Typed Python Object) |
|
| 155 |
+
+--------------------------------------------------+
|
| 156 |
+
</pre>
|
| 157 |
+
|
| 158 |
+
</p>
|
| 159 |
+
</body>
|
| 160 |
+
</html>
|