<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Faturahman Yuda</title>
    <description>The latest articles on Forem by Faturahman Yuda (@fjoeda).</description>
    <link>https://forem.com/fjoeda</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1417570%2F2cb6e819-9f8e-4c32-a1c0-544a71190e4c.jpeg</url>
      <title>Forem: Faturahman Yuda</title>
      <link>https://forem.com/fjoeda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/fjoeda"/>
    <language>en</language>
    <item>
      <title>Comprehend AI - Elevate Your Reading Comprehension Skills!</title>
      <dc:creator>Faturahman Yuda</dc:creator>
      <pubDate>Sun, 14 Apr 2024 20:44:21 +0000</pubDate>
      <link>https://forem.com/fjoeda/comprehend-ai-elevate-your-reading-comprehension-skills-5f9e</link>
      <guid>https://forem.com/fjoeda/comprehend-ai-elevate-your-reading-comprehension-skills-5f9e</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/devteam/join-us-for-the-cloudflare-ai-challenge-3000-in-prizes-5f99"&gt;Cloudflare AI Challenge&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Developing strong reading comprehension skills is crucial for navigating today's information-rich world. Comprehend AI is a web app which helps you to practice your reading comprehension skill by giving you a set of multiple-choice questions, generated from any web articles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://comprehend-mvp.pages.dev/"&gt;https://comprehend-mvp.pages.dev/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frxuzk3eahvmse7i046bx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frxuzk3eahvmse7i046bx.png" alt="Comprehend AI main page" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Code
&lt;/h2&gt;

&lt;p&gt;I used two repos, each for the frontend and the backend.&lt;br&gt;
Frontend: &lt;a href="https://github.com/fjoeda/comprehend-mvp"&gt;https://github.com/fjoeda/comprehend-mvp&lt;/a&gt;&lt;br&gt;
Backend: &lt;a href="https://github.com/fjoeda/comprehend-engine"&gt;https://github.com/fjoeda/comprehend-engine&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Journey
&lt;/h2&gt;

&lt;p&gt;Comprehend AI frontend was built on the top of ReactJS, while the engine (backend) was built with Python using &lt;code&gt;django-ninja&lt;/code&gt; as the web API framework and Cloudflare Workers AI for the AI services.  The engine behind Comprehend AI consists of two main parts namely the article retriever and the question generator.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Article Retriever
&lt;/h3&gt;

&lt;p&gt;The article is retrieved from the web page using data scrapping technique, which was done with the help of &lt;code&gt;beautifulsoup4&lt;/code&gt; library. The data scrapping process was simply done by scrapping the text from the html &lt;code&gt;p&lt;/code&gt; tags since it will contain the paragraph. The paragraphs of the article are stored in a list from which an element is randomly selected to provide the question generator with context for creating a question about a specific part of the article.&lt;/p&gt;

&lt;p&gt;For the article source, we select the article randomly from &lt;a href="https://phys.org"&gt;phys.org&lt;/a&gt;, an online science news aggregator, by utilizing the RSS to get the list of article items and URLs.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Question Generator
&lt;/h3&gt;

&lt;p&gt;Two model were used for the question generator, &lt;code&gt;@cf/mistral/mistral-7b-instruct-v0.1&lt;/code&gt; as the main model and &lt;code&gt;@cf/meta/llama-2-7b-chat-int8&lt;/code&gt; when the main model endpoint fails (which I faced during the development process). In my own experience, &lt;code&gt;@cf/mistral/mistral-7b-instruct-v0.1&lt;/code&gt; provides the consistent response since I need the multiple-choice question in JSON format. &lt;code&gt;@cf/meta/llama-2-7b-chat-int8&lt;/code&gt; also did well, though it occasionally precedes the JSON formatted response with a statement. Thanks to the "no yapping" prompt trick, the model will directly give me the JSON format response. The question generator will give a question regarding certain part of the article, the correct answer, and the decoy options.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenge
&lt;/h3&gt;

&lt;p&gt;Generating a multiple-choice question can be challenging especially when generating the decoy options. The decoy option should appear as plausible as possible to present a more challenging question. At present, the decoy sometimes seems too obvious. This could present an opportunity for research, specifically in the area of generating decoys for multiple-choice questions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Future Works
&lt;/h3&gt;

&lt;p&gt;Currently the article for the question generation is taken from 1 source. There are some options that I want to try, (1) give an additional feature that allows users to input their own article URL and generate questions from that source, or (2) scrapping a random Wikipedia page and ask the LLM model to summarize and create the fully generated article. Well, let's hear it from you!&lt;/p&gt;

</description>
      <category>cloudflarechallenge</category>
      <category>devchallenge</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
