<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Kwame for Science: An AI Teaching Assistant Based on Sentence-BERT for Science Education in West Africa</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>George Boateng</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Samuel John</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrew Glago</string-name>
          <email>andrew.glago@suacode.ai</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Samuel Boateng</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Victor Kumbol</string-name>
          <email>victor@suacode.ai</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Charite Berlin</institution>
          ,
          <country country="DE">Germany</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>ETH Zurich</institution>
          ,
          <country country="CH">Switzerland</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>SuaCode.ai, Inc., U.S</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Africa has a high student-to-teacher ratio which limits students' access to teachers. Consequently, students struggle to get answers to their questions. In this work, we extended Kwame, our previous AI teaching assistant, adapted it for science education, and deployed it as a web app. Kwame for Science answers questions of students based on the Integrated Science subject of the West African Senior Secondary Certificate Examination (WASSCE). Kwame for Science is a SentenceBERT-based question-answering web app that displays 3 paragraphs as answers along with a confidence score in response to science questions. Additionally, it displays the top 5 related past exam questions and their answers in addition to the 3 paragraphs. Our preliminary evaluation of the Kwame for Science with a 2.5-week real-world deployment showed a top 3 accuracy of 87.5% (n=56) with 190 users across 11 countries. Kwame for Science will enable the delivery of scalable, cost-efective, and quality remote education to millions of people across Africa. 4</p>
      </abstract>
      <kwd-group>
        <kwd>Virtual Teaching Assistant</kwd>
        <kwd>Educational Question Answering</kwd>
        <kwd>Science Education</kwd>
        <kwd>NLP</kwd>
        <kwd>BERT</kwd>
        <kwd>SBERT</kwd>
        <kwd>West Africa</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        The COVID-19 pandemic has exacerbated the already poor educational
experiences of millions of students in Africa who were grappling with educational
challenges like poor access to computers, the internet, and teachers. In 2018, the
average student-teacher ratio in Sub-Saharan Africa was 35:1 which is higher
compared to 14:1 in Europe [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. In this context, students struggle to get
answers to their questions. Hence, ofering quick and accurate answers, outside of
the classroom, could improve their overall learning experience. However, it is
dificult to scale this support with human teachers.
4 Copyright © 2022 for this paper by its authors. Use permitted under Creative
      </p>
      <p>Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>
        In 2020, we developed Kwame [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], a bilingual AI teaching assistant that
provides answers to students’ coding questions in English and French for SuaCode,
a smartphone-based online coding course [
        <xref ref-type="bibr" rid="ref4 ref5">5,4</xref>
        ]. Kwame is a deep learning-based
question answering system that finds the paragraph most semantically similar
to the question via cosine similarity with a Sentence-BERT model. We extended
Kwame to work for science education and deployed it as a web app.
Specifically, Kwame for Science 5 answers questions of students based on the
Integrated Science subject of the West African Senior Secondary Certificate
Examination (WASSCE). This is a core subject that covers various aspects of science
such as biology, chemistry, physics, earth science, and agricultural science. It is
mandatory for senior high school students in the West African Education
Council (WAEC) member countries (Ghana, Nigeria, Sierra Leone, Liberia, and The
Gambia).
      </p>
      <p>
        There are virtual teaching assistants (TA) such as Jill Watson [
        <xref ref-type="bibr" rid="ref6 ref7">7,6</xref>
        ], Rexy
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], and a physics course TA [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] and Curio SmartChat (for K-12 science) [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
(see [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for a detailed description of related work). These works are focused
on answering logistical questions, except Curio SmartChat. In comparison to
Curio SmartChat which is the closest work to ours, our work uses a
state-ofthe-art language model (Sentence-BERT) relative to theirs (Universal Sentence
Encoder). Also, our work is the first to be developed and deployed in the context
of high school science education in West Africa.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Kwame for Science System Architecture</title>
      <p>Kwame for Science is a Sentence-BERT-based question-answering web app that
displays 3 paragraphs as answers along with a confidence score which represents
the similarity score in response to science questions (Figure 1). Additionally, it
displays the top 5 related past exam questions and their answers in addition
to the 3 paragraphs. We used a Sentence-BERT (SBERT) model that was
pretrained on a large and diverse set of question-answer pairs. We used the SBERT
model as it was, with plans for fine-tuning after real-world data collection
especially since exploratory evaluation for our science use case showed it had decent
performance.</p>
      <p>When a user types a question in the web app, our system computes an
embedding of the question using the SBERT model. Next, it computes cosine similarity
scores with a bank of answers (which are paragraphs from our knowledge source),
retrieves, and returns the top 3 answers along with a confidence score and any
ifgures or images referenced in that paragraph to the web app. Additionally, it
computes cosine similarity scores with a bank of past exam questions, retrieves,
and returns the top 5 related questions and their answers, along with confidence
scores. The web app then displays the answers and the related past exam
questions that are above a preset similarity score threshold. If no answer is above
the threshold, a message is shown saying the question could not be answered
using the knowledge source of that subject. We precomputed embeddings for fast
5 http://kwame.ai/
real-time retrieval and saved them as indices in ElasticSearch which we hosted
on Google Cloud Platform.</p>
    </sec>
    <sec id="sec-3">
      <title>Dataset Curation and Preprocessing</title>
      <p>
        Given that our goal was for Kwame to provide answers based on the Integrated
Science subject of the WASSCE exam, our training data and knowledge source
had to cover the topics in the WASSCE Integrated Science curriculum. We sought
to use one of the approved textbooks in Ghana. Unfortunately, their copyrights
did not permit such use and the publishers were unwilling to partner with us.
Consequently, we searched for free and open-source books and datasets that
fulfilled our needs. We came across a middle school science dataset — Textbook
Questions Answering (TQA) [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] which was curated from the free and
opensource textbook, CK-12. Our exploration of the dataset revealed that though
it covered several of the WASSCE Integrated Science topics, it lacked others,
particularly those related to agricultural science. Consequently, we additionally
used a dataset based on Simple Wikipedia to cover those gaps. We used Simple
Wikipedia since its explanations were simple and better suited for middle school
and high school students compared to regular Wikipedia.
      </p>
      <p>We parsed the JSON lfies of the dataset into paragraphs. We also extracted
ifgures that were referenced in the paragraphs so they could be returned to
students along with the answers. We then split the paragraphs into groups of
3 sentences, computed embeddings, and indexed them using ElasticSearch to
enable fast retrieval and run time. These constituted the answers returned for
questions. Furthermore, we augmented our question-answering with
curriculumspecific content. In particular, we created question-answer pairs using WASSCE
questions that cover exams from 2000 to 2020. The exam has three parts,
objectives (multiple-choice), theory, and practicals. Similar to the paragraphs, we
computed embeddings of the questions and indexed them using ElasticSearch.
These constituted the related past questions (with answers) returned when a
question is asked.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Preliminary Evaluation and Results</title>
      <p>We launched the web app in beta on 10th June 2022. Users could provide
feedback by upvoting or downvoting answers in response to the question “Was this
helpful?.” To evaluate Kwame for Science, we used the metrics top 1 and top
3 accuracies. Top 1 accuracy quantifies performance assuming only one answer
was returned and voted on. Top 3 accuracy refers to the performance where for
each question that received a vote, at least one answer was rated as helpful out
of the 3 answers that were returned. The statistics for the deployment between
10th June 2022 and 27th June 2022 (2.5 weeks) are 190 users across 11 countries
(6 in Africa), 433 questions with the metrics 71.8% top 1 accuracy (n=117
answers), and 87.5% top 3 accuracy (n=56 questions). The top 3 accuracy result
is good, showing that Kwame for Science has a high chance of giving at least
one useful answer among the 3. Some challenging cases occurred when there
were typos in the spelling of scientific words and the questions were related to
topics outside the scope of the knowledge source. Also, some unhelpful answers
were cases where the returned paragraph was incomplete due to issues with the
dataset.
5</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>In this work, we developed and evaluated Kwame for Science which provides
instant answers to the Science questions of students across West Africa. Our
future work will fine-tune the SBERT model using the real-world votes on
answers to improve its accuracy. Also, we will make Kwame for Science available
in local languages across Africa, and available via ofline channels such as SMS,
USSD, and toll-free calling. Kwame for Science will enable the delivery of
scalable, cost-efective, and quality remote education to millions of people across
Africa.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgement</title>
      <p>This work was supported with grants from ETH for Development (ETH4D) and
the MTEC Foundation, both at ETH Zurich.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Benedetto</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cremonesi</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Rexy, a configurable application for building virtual teaching assistants</article-title>
          .
          <source>In: IFIP Conference on Human-Computer Interaction</source>
          . pp.
          <fpage>233</fpage>
          -
          <lpage>241</lpage>
          . Springer (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Boateng</surname>
          </string-name>
          , G.:
          <article-title>Kwame: A bilingual ai teaching assistant for online suacode courses</article-title>
          . arXiv preprint arXiv:
          <year>2010</year>
          .
          <volume>11387</volume>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Boateng</surname>
          </string-name>
          , G.:
          <article-title>Kwame: a bilingual ai teaching assistant for online suacode courses</article-title>
          .
          <source>In: International Conference on Artificial Intelligence in Education</source>
          . pp.
          <fpage>93</fpage>
          -
          <lpage>97</lpage>
          . Springer (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Boateng</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Annor</surname>
            ,
            <given-names>P.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumbol</surname>
            ,
            <given-names>V.W.A.</given-names>
          </string-name>
          :
          <article-title>Suacode africa: Teaching coding online to africans using smartphones</article-title>
          .
          <source>In: Proceedings of the 10th Computer Science Education Research Conference</source>
          . pp.
          <fpage>14</fpage>
          -
          <lpage>20</lpage>
          (
          <year>2021</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Boateng</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumbol</surname>
            ,
            <given-names>V.W.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Annor</surname>
            ,
            <given-names>P.S.:</given-names>
          </string-name>
          <article-title>Keep calm and code on your phone: A pilot of suacode, an online smartphone-based coding course</article-title>
          .
          <source>In: Proceedings of the 8th Computer Science Education Research Conference</source>
          . pp.
          <fpage>9</fpage>
          -
          <lpage>14</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Goel</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Ai-powered learning: Making education accessible, afordable, and achievable</article-title>
          . arXiv preprint arXiv:
          <year>2006</year>
          .
          <year>01908</year>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Goel</surname>
            ,
            <given-names>A.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Polepeddi</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Jill watson: A virtual teaching assistant for online education</article-title>
          .
          <source>Tech. rep., Georgia Institute of Technology</source>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Kembhavi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Seo</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schwenk</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Choi</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Farhadi</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hajishirzi</surname>
          </string-name>
          , H.:
          <article-title>Are you smarter than a sixth grader? textbook question answering for multimodal machine comprehension</article-title>
          .
          <source>In: Proceedings of the IEEE Conference on Computer Vision</source>
          and Pattern recognition. pp.
          <fpage>4999</fpage>
          -
          <lpage>5007</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Raamadhurai</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baker</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Poduval</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Curio smartchat: a system for natural language question answering for self-paced k-12 learning</article-title>
          .
          <source>In: Proceedings of the Fourteenth Workshop on Innovative Use of NLP for Building Educational Applications</source>
          . pp.
          <fpage>336</fpage>
          -
          <lpage>342</lpage>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Unesco</surname>
          </string-name>
          .
          <article-title>pupil-teacher ratio sub-saharan africa</article-title>
          . https://data.worldbank.org/indicator/SE.PRM.ENRL.TC.ZS?locations=ZG (Feb
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Zylich</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Viola</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Toggerson</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Al-Hariri</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Exploring automated question answering methods for teaching assistance</article-title>
          .
          <source>In: International Conference on Articfiial Intelligence in Education</source>
          . pp.
          <fpage>610</fpage>
          -
          <lpage>622</lpage>
          . Springer (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>