0% found this document useful (0 votes)
37 views9 pages

TCC en Official Paper

This study investigates the integration of artificial intelligence, specifically fine-tuning, to enhance the training of educational robotics teams, addressing challenges such as resource inequality. It emphasizes the importance of AI in promoting STEM education and proposes a method for disseminating knowledge among teams to foster community growth. The document outlines the theoretical framework, tools, and practical applications of fine-tuning in developing AI models tailored for educational robotics.

Uploaded by

fduartem8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views9 pages

TCC en Official Paper

This study investigates the integration of artificial intelligence, specifically fine-tuning, to enhance the training of educational robotics teams, addressing challenges such as resource inequality. It emphasizes the importance of AI in promoting STEM education and proposes a method for disseminating knowledge among teams to foster community growth. The document outlines the theoretical framework, tools, and practical applications of fine-tuning in developing AI models tailored for educational robotics.

Uploaded by

fduartem8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Study on the Application of Fine-tuning to

Create an AI Model Capable of Assisting in the


Training of Robotics Teams
João Victor de Oliveira Gomes Ribeiro

Given this scenario, a more in-depth approach is proposed,


Abstract— This study explores the convergence between Arti- using artificial intelligence, especially fine-tuning, to effi-
ficial Intelligence and educational robotics, proposing the use of ciently collect, filter, and organize information from robotics
fine-tuning as a response to the challenges faced by teams. From teams. This approach not only overcomes obstacles, but also
its conception to current advances, AI has played a fundamental drives team growth, raising the standards for competition, and
role in society. Educational robotics, centered on STEM, adopts
strengthening the community.
innovative practices to educate students, but faces obstacles such
This assignment aims to study the application of fine-tuning
as a lack of resources and inequality in competitions, which can
be overcome through the application of AI. The purpose of this in the creation of an artificial intelligence model to assist in the
assignment is to study a way to apply fine-tuning to spread knowl- training of educational robotics teams. Throughout this article,
edge equally among teams, aiming to overcome obstacles, boost the theoretical basis, the tools and methods used, the applica-
development and strengthen the community. tion of the proposal in practice, the tests performed and the re-
Index Terms— Artificial Intelligence, Education, Fine-Tuning, sults obtained will be explored, leading to conclusions about the
Robotics, STEM. study carried out.

I. I NTRODUCTION II. THEORETICAL BASIS


This study is based on an interdisciplinary set of concepts,
The purpose of this assignment is to explore the intersection
technologies and theories that cover crucial areas for Educa-
between artificial intelligence (AI) and educational robotics,
tional Robotics and the effectiveness of its practices through the
with the aim of enhancing the effectiveness of teaching and re-
introduction of artificial intelligence into its environment.
search in this dynamic field of engineering. In line with one
This section explores the convergence of Educational
of the 14 great challenges of the twenty-first century for engi-
Robotics with artificial intelligence and the application of fine-
neering, which seeks to promote personalized learning, it fo-
tuning for the creation of personalized models, highlighting
cuses on finding ways to improve the practice of educational
how these technologies can enhance education by helping de-
robotics, which is fundamental in the promotion of STEM and
velop their activities.
in the training of students, of all ages, in various areas of knowl-
Furthermore, the role of information exchange, collection,
edge.
storage and sharing of data is examined, emphasizing the impor-
The practical application of educational robotics involves the
tance of data validation and processing. Aspects of the guide-
creation and use of robotics kits, intuitive programming soft-
lines of the General Data Protection Law (LGPD) and the inte-
ware, and learning environments that allow students to explore
gration of educational robotics with the National Common Cur-
concepts in a practical, engaging, and collaborative way, while
riculum Base (BNCC) are also addressed.
encouraging teamwork.
Artificial intelligence, in turn, since its first days with Alan A. Educational Robotics
Turing in the 1950s, and even going through periods of crisis, This is a pedagogical approach that uses robotics as a teach-
has been transforming the technological landscape, shaping the ing tool to provide learning experiences through the construc-
future of various sectors and being a driving force behind inno- tion, programming, and operation of robots, as well as scientific
vations in product and business development. research and teamwork, promoting the development of essential
However, significant challenges persist in both areas, such as skills for the twenty-first century. [1]
the lack of accessibility to resources needed for research and de- It is estimated that there are currently more than 670,000 [2]
velopment, especially for the formation of independent teams, students in more than 190 countries [3] involved in educational
which generates inequality at the global level, harming the com- robotics, according to FIRST data. Within this context there are
munity as a whole. several aspects, the main ones of which are highlighted below.
a.1. Organizations and institutions
Final Paper presented to the National Institute of Telecommunications, as part
of the requirements for obtaining the Bachelor’s Degree in Software Engineer-
Several institutions support educational robotics around the
ing. Advisor: Prof. MSc. Wanderson Eleuterio Saldanha. Final Paper accepted world by providing material and intellectual resources, conduct-
on 11/29/2023. ing training, and promoting competitions, as is the case with

1
FIRST (For Inspiration and Recognition of Science and Tech- a.5. Difficulties
nology), for example, a global non-profit organization that pre- In general, the implementation and dissemination of educa-
pares young people for the future through STEM.[1]. tional robotics seems advanced, but in Brazil, little is said about
it. The National Common Curriculum Base (BNCC) was con-
a.2. Teams, Formats and Modalities
sulted as a reference for this study, as well as the Law of Guide-
The teaching of robotics usually begins in schools or private lines and Bases of Education (LDB).
institutions that have courses focused on the area, usually ac- According to Law No. 13,415/2017, the single model of
quired through a representative of an organization. the High School curriculum is replaced by a more diversified
After, or even during training, students are encouraged to and flexible workforce, composed of the BNCC and training
join teams, which compete in championships and have organi- itineraries, which must be organized through the offer of vari-
zational models that vary according to the team’s guidelines and ous curricular arrangements, taking into account the relevance
the format of the competition, as each one proposes its specific to the local context and the viability of the education systems.
challenges and consequently the teams organize themselves to [8]
obtain the best result using the tools focused on the respective Analyzing the document in depth, it is possible to identify
task. [4, 1] that robotics is mentioned only once in the entire text, in the
epic “mathematics and its technologies”, on page 477.
a.3. Competitions
This fact shows, therefore, the need for other methods for its
All learning must be put into practice and for this there practice and promotion throughout the national territory. Thus,
are several competitions - of different categories - all over the it can be stated that the implementation of full time educational
world, which require excellence and competence from the par- robotics in Brazilian education, although very necessary, may
ticipants to succeed in the proposed challenges, such as the still face several challenges, such as the lack of resources (fi-
FIRST LEGO League (FLL) [1], the FIRST Robotics Compe- nancial and/or intellectual), teacher training and adequate in-
tition (FRC) [1], the World Robot Olympiad (WRO) [5], the frastructure in schools. In addition, there is also resistance to
RoboCup [6] nd the FIRST Global Challenge (FGC) [3]. change and a lack of understanding of its benefits.
For this assignment, the focus will be exclusively directed to
the FIRST LEGO League teams, due to the fact that this chal- B. Artificial Intelligence
lenge has a greater reach, being present in more than 100 coun- On the other hand, despite also receiving a certain strength,
tries, as can be seen on the map in Figure 1, in addition to being artificial intelligence has been gaining more and more space in
one of the gateways to the universe of robotics. the educational environment. Therefore, studying ways to apply
it to promote robotics and STEM is a path to be taken in order
to reach new horizons within this context.
Artificial intelligence currently covers several fields of tech-
nology and is based on two main pillars, namely: machine
learning and deep learning.
The main factors on the subject were analyzed in order to find
the best tools and technologies for the development of a solution
and the results of this analysis will be described in the following
topics.
b.1. Machine learning and deep learning
Machine learning and deep learning Machine learning is a
field of artificial intelligence that uses algorithms and data to
Fig. 1. FIRST LEGO League in the world [2] develop computational models capable of learning and making
This approach aims to delimit the scope of work to ensure predictions or classifications. There are three main types: [9,
assertiveness to the model to be trained. It is important to 10, 11, p. 26-32]
emphasize that the study has a specific orientation for Brazil,
but can be applied, later, in other nations. This choice can be • Supervised: models are trained with labeled data. Each
explained by the proximity, contact and relationship with lo- training example has a correct label or answer. The goal is
cal teams, in addition to the promising scenario of the national to learn how to map inputs to correct outputs;
Robotics, which, however, still lacks visibility and support. • Unsupervised: Data not labeled to identify patterns or
a.4. Benefits groupings. There are no correct answers forced during
training, and the goal is to learn structures or relationships
With so many opportunities, there are several benefits pro- hidden in the data;
vided by the practice of educational robotics, such as the devel-
opment of problem-solving skills, critical thinking, teamwork, • Reinforcement: Agents who learn to make decisions
creativity and technological competence, in addition to direct- through attempts and errors and receive rewards or penal-
ing talents to STEM areas and preparing students for careers in ties based on their actions. The goal is to learn how to take
technology and engineering. [7] actions that maximize the reward.

2
Common algorithms include:

• Neural networks: Commonly used in tasks involving com-


puter vision, natural language processing, and pattern
recognition; [9, 11]

• Linear regression: Often applied to forecasting tasks; [9,


11]

• Decision trees: Based on conditional rules, they are not


used in classification and regression and are easily inter-
pretable. [9, 11]

Deep learning is a subset of machine learning that involves


using neural networks with three or more layers to perform anal-
ysis and automation tasks based on large volumes of data. [9,
p. 8-11]
The main difference to traditional machine learning is that Fig. 2. PEFT - adapted [12]
deep learning can deal directly with unstructured data, such as
text and images, eliminating the need for manual preprocessing. on general-purpose devices. In addition, the allocation and im-
In addition, it also automates the extraction of characteristics plementation of autonomously adjusted models for each sub-
from the data. [9, p. 4-11] sequent task becomes excessively expensive, since the adapted
Deep neural networks are composed of several intercon- models maintain the same size as the original pre-trained model.
nected layers, which refine and optimize the prediction or cat- [12]
egorization. Direct and retroactive propagation is used to train As a result, Parameter-Efficient Fine-tuning (PEFT) [12],
the model, adjusting weights and biases to minimize errors over emerged, a more efficient approach in which, instead of thawing
time. [9, p. 8-11] all the layers of the pre-trained model, as is done in the standard
There are different types of deep neural networks, each way, only a limited subset of parameters is adjusted, as shown
adapted to specific types of data and tasks, such as: in Figure 2. This technique is especially useful when the data
available for fine-tuning is scarce, as it allows a more specific
• Convolutional neural networks (CNNs): These are specif- adaptation.
ically designed to extract two-dimensional data character- In summary, the main difference lies in the extent of the ad-
istics and patterns, using convolutions and pooling layers, justment made during the process. While the standard adjusts a
and are ideal for object detection, facial recognition, and greater number of parameters in several layers, the Parameter-
image classification; [9, p. 119] Efficient Fine-Tuning optimizes efficiency by adjusting only a
limited subset of parameters, aiming at a more effective adapta-
• Recurrent neural networks (RNNs): Suitable for tasks re-
tion in limited data scenarios. [12]
lated to natural language and temporary series, in which
The application of PEFT is of utmost importance for the con-
the order of the data is fundamental. Its differentiation is
struction of a model that effectively performs a specific func-
in its ability to maintain internal states, allowing the mod-
tion, such as assisting in the assembly of an FLL robot, for
eling of temporal dependencies on sequential data, making
example. This technique is essential to optimize an OpenAI
them ideal for applications that include machine transla-
language model [13], which applies the PEFT technique in the
tion, sentiment analysis in text, text generation, and time
process, allowing smaller amounts of data to be sent to training
series prediction. [9, p. 178]
without restricting the new model.
b.2. Fine-Tuning b.3. Main tools
In deep learning, fine-tuning is an approach to transfer learn- Currently, there are numerous AI tools and platforms that al-
ing, in which the weights of a pre-trained model are trained on low the use of these resources, such as: WatsonX (IBM) [14],
new data. In other words, it is the creation of a new model based Vertex (Google) [15] and OpenAI [16].
on an existing one, whose main objective is to solve a specific Based on the characteristics of each one, it was possible to
problem [9]. identify the points that made the most sense for the execution of
This functionality is used to train increasingly specific mod- the work, which are documentation, integration with APIs (Ap-
els with a relatively small amount of data, focusing only on pro- plication Programming Interface) and scalability. It was then
viding the information of the niche in question, which eases decided that the tool to be used would be OpenAI’s fine-tuning
training and minimizes the time spent on this step, allowing ap- [17].
plications to be developed quickly within a unique context with
quality and efficiency. [9] b.4. Adversities
However, as models grow in complexity, the application of Although AI, as long as it is used responsibly, brings numer-
integral fine-tuning (standard) becomes impractical for training ous benefits wherever it is applied, there is still some resistance

3
to adhering to it. Some concerns such as copyright issues, loss keep the code clean and effective, within the guidelines of the
of cognitive stimulation of users (in this case students), infor- adopted standards.
mation leakage and security breaches, are important points to The Table I shows the main technologies applied throughout
be discussed, but there are already ways to get around it, such development. The design and tools were strategically thought
as: application to the Security Pillars (authentication, autho- out to ease both the construction and the use of the application
rization, confidentiality), actions within the General Data Pro-
tection Law (LGPD) or equivalent (such as the GDPR, in the TABLE I
T ECHNOLOGIES AND ITS VERSIONS
European Union, for example) and the fact that students do not
have access to “how to do it”, but rather “what they can do with Technology Version
it”, without compromising their cognitive capacity. [18, 19] Python 3.10
React 18.2.0
C. General Data Protection Law TypeScript 5.2.2
Axios 1.5.0
The LGPD [19] is a Brazilian legislation that regulates the Auth0 2.2.3
protection of personal data, establishing rights and responsibil- [Link] 18.17.1
Fastify 4.23.0
ities for its processing, similar to the General Data Protection
Prisma ORM 5.2.0
Regulation (GDPR) in the European Union. The LGPD estab- TailwindCSS 3.3.3
lishes requirements for the collection, storage, processing, and
sharing of personal data and sets penalties for non-compliance.
In addition to the highlighted technologies, essential devel-
The law specifies that the processing of data is at the level of an
opment tools were also used, such as the Visual Studio Code
individual or legal entity, according to article 5, I, which defines
IDE, the resources of OpenAI, and version control and docu-
personal data as “information related to an identified or iden-
mentation of Git and GitHub.
tifiable natural person”. Article 7 can be related to Article 11,
This technical approach, combined with the tools used in its
which focuses on sensitive data, allowing its use only with the
development, seeks excellence and practicality in the construc-
specific and detached consent of the holder. [19]
tion of a solid, pleasant, modular and reliable software, and its
In view of the above, and considering the educational bias of
development is executed in an iterative and incremental way,
this assignment, personal or sensitive data should not be con-
following agile methods practices, with planning based on pri-
sumed, guaranteeing the privacy of the individuals involved,
ority functionalities, allowing the continuous delivery of incre-
and it is not possible to identify the natural person behind the
ments and giving sustainability to the code life cycle. Such
scenes of a team, ensuring that there is no violation of the law.
characteristics reflect the search for an efficient, robust and scal-
D. Existing solutions able application.

Currently, chat tools - such as chatGPT itself [20], among IV. P RACTICAL APPLICATION
others - are trivially used by teams, but their effectiveness is of- The application basically consists of a web interface that al-
ten limited, and they can operate out of context, being generalist lows interaction between users and the trained model, which is
or providing random answers. This assertiveness highlights the accessed through OpenAI’s API. In addition, there is also the
need for a more sophisticated solution. collection of information from the team and the display of the
Within the context of the application of artificial intelligence answers to the requested prompt. There is also a part dedicated
in educational robotics today, there is no solution that combines to the storage, processing, structuring of the data and training of
intuitive interfaces (for prompt insertion and display of per- the model.
sonalized information) with comprehensive automatic analysis To build the application, basic and essential requirements
tools. While there are platforms and environments that offer vi- were raised and followed, namely: simplicity of the interface,
sual programming and robot simulations for practical learning, low response time, scalability, customization and assertiveness.
the effective integration of AI for analysis and improvement of Based on the requirements, the architecture of the application
the teaching/learning process is still a gap to be filled. [18] was then elaborated, presented in Figure 3, which was divided
A solution that combines these elements could revolutionize into three groups, front-end, back-end and fine-tuning, in order
the way students learn STEM concepts, providing a more in- to ease the development and eventual maintenance, which also
teractive and feedback-driven learning environment, as well as helps in the organization and, later, in the deployment and scal-
promoting the development of critical skills for the future. ability of the project.
III. T OOLS AND METHODS
For the development of the work, the engineering method
was applied, which consists of defining the problem, elaborat-
ing possible solutions, testing them in practice and weighing
the results. Therefore, the technologies were chosen through
tests and research considering the factors of documentation, ef-
ficiency and practicality in implementation. In addition, auto-
mated tests are applied, providing the quality layer necessary to
Fig. 3. Block diagram of the solution [Prepared by the author]

4
A. Front-end organized according to OpenAI guidelines, allowing for
The functionalities and styling present in the front-end, built smooth onboarding during the training phase.
using React and TailwindCSS, ensure the user’s interaction with • Validation: the data set (JSON) is analyzed and some
the system, maintaining the quality of the interface and optimiz- statistics are generated, such as the number of samples, dis-
ing their experience during use. tribution of messages per sample and checking for format-
• Authentication: login and user registration are the respon- ting errors. A script is executed that performs these checks
sibility of the auth0 which, through its API, allows the user automatically for each sample, token, and error type, and
to create his account and log in with other services, such as then displays the results in the terminal. This is useful for
Google and Facebook, for example, safely and practically. debugging and ensuring that the dataset is ready for the
This functionality allows the verification and validation of next steps.
the teams’ data, essential for the full release of the use of
b.2. Database and Object-relational Mapping
the system.
Prisma [21] is used for data storage, which allows the ab-
• Sending information: the user is presented with a screen straction of the database, due to its integration with TypeScript
where it is possible to interact with the model through and [Link]. The data is saved and available to be consumed
prompts and other inputs such as temperature and key- through a client that is instantiated directly in the backend,
words. This operation is performed by react and its hooks, where all communication takes place.
which allow you to check the states of the components in
question and send their values as parameters of the request b.3. Validation of Participation and Insertion of Information
that will be made to OpenAI’s API. It is also on this screen Validation of participation and insertion of information in-
that information will be requested from the team so that volves the verification and authentication of entities wishing to
full access to the platform can be released. Such informa- use the system, to ensure that only authorized teams are allowed
tion is sent to the back-end where it will be processed and to access resources at any time. This process includes steps such
stored. as identity verification, login authentication, and integrity veri-
fication of entered data.
• Results display: The answers provided are displayed in
real time on the screen in a user-friendly manner. The com-
munication is done through axios, which sends an http re-
quest containing the submitted information to the OpenAI
API, which returns the model’s response.
B. Back-end
Responsible for processing requests, interacting with the
database, and performing logical operations to meet the needs
of the application.
b.1. Data for fine-tuning
• Collection: Python scripts capture information about the
teams, such as participation in the appellant’s edit, official
rating (if it participated), the robot’s development process,
among others.
• Data Augmentation: Application of modifiers in the code
to increase the variation of training data, expose the model
to a wider range of scenarios, and improve its general-
izability. In the context of fine-tuning, modifiers include
variations in prompts, different forms of data presentation, Fig. 4. Information validation flow [Prepared by the author]
and other techniques to diversify the training set and re-
duce overfitting1 . As shown in Figure 4, once logged in, the participation in-
formation of the teams will be checked and, if it appears that a
• Structuring: After the stages of experimentation, collec- team participated in a competition but did not send its data to
tion, and data augmentation, the training data is synthe- the system, that team will be banned from accessing it until it
sized and structured in the JSON (JavaScript Object No- enters the data correctly.
tation) format specified by OpenAI’s documentation [17], There is also the possibility that a team that has never par-
also using Python scripts. Each prompt and response is ticipated wants to use the system, if it occurs, this team will be
able to count on the benefit of not having to send information,
1 being proven through the official competition channels that it
when a model fits very well with the previously observed data set, but proves
ineffective in predicting new outcomes. It is common for the sample to present does not yet have, in fact, any participation. This way, the team
deviations/mismatches caused by measurement errors or random factors [9]. will be able to access the resources normally, for example, when

5
their first participation is confirmed, they must enter their data and compare the operation of the solution. The following are
to continue using the service. the processes and iterations that resulted in the final version of
There will be a script to perform the participation check and the assignment.
validate the information, these combined steps will be respon-
A. Data
sible for managing the status of each team within the platform
and, if any information is pending, another script will be re- The data used for training and testing was generated from the
sponsible for notifying the team. design rubric [23] of the robot of the last season of FLL, with
the help of ChatGPT itself to simulate different situations in this
C. Fine-tuning context. After collection and treatment, the data were divided
• Upload: The new model training process involves upload- into 70% training and 30% test, in order to diversify the input
ing the synthesized training data and submitting a request and verify the performance of the model. This cyclical process
to the OpenAI API [22], containing the specific instruc- is the basis for all new intelligence development, and is applied
tions to start training [17] the model based on the data pro- to each iteration in which a new model is generated, Figure 5
vided. During this process, OpenAI uses machine learning illustrates the flow of data for fine-tuning.
algorithms to adjust the model’s parameters according to
the patterns present in the training data.
• Performing the fine-tuning process on the existing model
on the OpenAI platform [13], to optimize its performance
in specific scenarios, in this case, educational robotics
competitions and their derivatives. However, to ensure that
the training is as effective as possible, the focus is directed
to a more specific portion of this universe, the FLL robot Fig. 5. Cycle of creation of new models [Prepared by the author]
project. The following are the training and tests performed throughout
• Continuous Monitoring and Evaluation: after submitting the development of this study.
the request, it is important to track the progress of the train- B. Tests with the standard model
ing and check the performance metrics. Continuous evalu- Before performing the fine-tuning, experiments were con-
ation is essential to ensure that the model is merging into a ducted using prompts in the standard tool, the “gpt-3.5-turbo”,
desired state, able to perform the specific tasks established the model recommended by the owner, as it is the best prepared
in the design of the project. and optimized model. Such experiments had the purpose of
D. Integration serving as a basis for comparison to evaluate the performance
of the new trained model, in order to understand the response
In order to take advantage of the advanced natural language of the pattern and improve the formulation of the training data
processing and artificial intelligence capabilities that OpenAI’s for the new one. Table III shows the comparison between the
platform offers, the use of the model trained within the appli- responses of each model to a specific prompt taken from the test
cation domain is done through its API that is integrated into data.
the back-end and, from the routes created with fastify, you can
consume the responses on the front-end through HTTP requests C. First tests with the new model
with the React “ai” library. After the training, carried out on OpenAI’s servers, the new
The data for model training is structured and sent through model, named Woodie - in honor of Professor Dr. Woodie Flow-
the back-end also through OpenAI’s API, but through a specific ers2 - showed positive results, which can be seen in line 2 of
route to do so. After sending, training takes place and a new Table III. However, in line 3, it is also notable that, for temper-
model is generated, which is saved in the platform so that it can atures over 1.1, o Woodie started hallucinating.
be used as described in the previous paragraph. Moreover, the model was not yet performing as intended, as
The back-end, on the other hand, works as a server and, in the answers were vague. Therefore, new data collection and
addition to sending the information to OpenAI, receives it from new training were carried out in order to reach a deeper level of
the front-end through http routes, using axios. All the data in- optimization and obtain more cohesive responses.
volved in the process is stored by prisma, whose integration is
done directly in the back-end through the library itself. c.1. Métricas dos novos modelos
From the efficiency and modularity of the front-end to the The metrics presented below indicate the quality, which is
intelligent management of data in the back-end and interaction still lower than the first model, comparing to the last one.
with artificial intelligence, generated by fine-tuning, the appli- The graph in Figure 7 shows the losses (y-axis) in training,
cation proves to be a solid bridge for the first steps towards the and great variation can be observed along the “steps” (x-axis).
integration of AI into the universe of educational robotics.
2 Great
V. T ESTS AND RESULTS enthusiast of educational robotics. Professor of Mechanical Engineering
at the Massachusetts Institute of Technology (MIT), he was co-chair of the Ex-
After the model generated and the application created, which ecutive Advisory Board of FIRST, where he was also a Distinguished Advisor.
can be seen in Figure 6, tests were conducted in order to verify [23]

6
The final result close to 1, coming from an increase and starting A more specific and centered thinking can be observed on
a decline, shows that it is still possible to significantly reduce the part of the model that sticks to the theme taught. There was
losses and approach the ideal value (0), which can be perceived also a significant reduction in hallucinations with temperature
in the red line, which indicates the last training. variation, as indicated by lines 6 and 7 of Table III.
The values in Table III show important information from the These improvements are due to the fact that the new dataset
training of the first and last model. What we can notice is that submitted contains twice as many samples as the previous one
the total number of tokens3 trained and the “epochs” increase and the number of trained epochs (10) is more than triple. These
from one to another, as it was noticed that with only 3 epochs values were estimated by varying them during the experiments
(standard indicated by OpenAI) there was a lot of loss in train- and observing the result of the generated model. After a few
ing and the responses were not optimal (see graph in Figure 7). iterations, it was possible to arrive at a number of epochs and
samples that would allow the creation of an efficient and co-
TABLE II
hesive model, with the lowest possible expense ($2.61). In the
C OMPARING N EW TRAINED M ODELS
graph of Figure 7, there is the loss in training, well around 0,
First Model Latest for 235,190 tokens trained.
Trained Tokens 70.557 235.190
Epochs 3 10 F. Final model
Finally, the definite model (Woodie2) demonstrated more ap-
titude and performance in the answers, being successfully in-
c.2. Integration of the new model in the web application tegrated into the application, in addition to being well received
After being generated in the OpenAI environment, the model and praised by teams and professionals in the area. Figure 6
was tested directly in the interface of the developed web appli- then shows a prompt made by a team (which is indicated in the
cation (which can be seen in Figure 6), through its API. line 8 of Table III) that had the opportunity to test the applica-
Through this test, it was possible to perceive that, for temper- tion.
atures4 below 0.8, the model also suffered some type of hallu- In this way, from the moment the deployment is done and
cination5 , as can be seen in line 4 of Table III. the teams start using the application frequently, submitting their
information, more data will be collected and the model can be
D. New training constantly refined, further improving its performance, ensuring
The training and tests that followed were based on the re- the sustainability of the proposal and the maintenance of the
sponses of each predecessor, for example: the first model gener- system.
ated (Woodie), answered vaguely or hallucinated, such answers
VI. C ONCLUSION
were used as a basis to “teach” the subsequent model (Woodie2)
not to make the same mistakes. The application of artificial intelligence (AI) in educational
Thus, several more experiments were conducted, varying the robotics offers significant potential to enhance project develop-
data samples and the times, following the same development ment for teams. This study highlights how AI can streamline
pattern presented in Figure 5. The resolutions of these trainings information collection and accelerate students’ workflows. A
are available in section E.. key contribution is the proposal of a personalized AI model
using fine-tuning to cater to the specific needs of robotics
E. Results teams, ensuring efficient training with limited data focused on
After the training and testing sections, a suitable model was competition-relevant aspects.
reached, Woodie2, which was trained from its predecessor While this research centers on FLL robot design to develop
(Woodie), unlike the others, which were generated based on a minimum viable product, the approach is scalable across var-
gpt-3.5-turbo and were not successful. This approach ensured ious competitions and scenarios. The use of open-source tech-
the best use of the data, since the previous model already has nologies enables teams with varying resources to benefit, sup-
some knowledge and can contribute directly to the creation of ported by a GitHub repository [27] containing code and docu-
the new one in an effective way. mentation for further customization and collaboration.
Afterwards, the functionalities and metrics of the Woodie2 Challenges include limited relevant data, which could be ad-
are highlighted, which, if compared to those of its base model dressed by developing a forum for teams to share resources. Fu-
(Woodie), are superior, and it is possible to say that this is its ture work could explore advanced language models like GPTs
best version to the conclusion of this assigment. Lines 5 to 8 of and image generation tools like DALL-E to assist in robot visu-
Table III provide examples of the final behavior. alization and strategy planning.
Expanding the project to other languages could also democ-
ratize access globally. In summary, this study showcases the
3 Common strings of characters found in a text set. Models learn to understand potential of AI to support educational robotics, with future pro-
the static relationships between these tokens. A token usually matches ap-
proximately 4 characters of text (for regular English text). This translates to posals aimed at enhancing the approach and fostering commu-
approximately ¾ of a word (so 100 tokens =˜ 75 words).[24] nity growth.
4 In terms of generative AI, it indicates the creativity and consistency of the

model’s responses. [25]


5 In the field of artificial intelligence, the term refers to a model response that

does not appear to have an adequate justification based on training data. [26]

7
Fig. 6. Application interface with example of a prompt created by a team [Prepared by the author]
TABLE III
COMPARISON BETWEEN MODELS

Prompt Model Temp. Response


gpt-3.5-turbo 1 To accurately navigate a table, you can consider some methods and sensors. Here are some sug-
gestions. 1. Distance Sensors: Use sensors such as ultrasonic, infrared, or laser to measure the
distance between the robot and the obstacles on the table. This data can be used to adjust move-
ment and avoid collisions. 2. Computer Vision: Implement a camera in your robot to capture
images of the table and identify reference points on the table for accurate navigation. 3. Encoders:
Equipping your robot’s wheels with encoders helps you measure [...]
Woodie 1 Use motion and line sensors, program detection and correction algorithms, and adjust speed and
direction according to the data collected to ensure accuracy in navigation.
Woodie 1.2 The basic level of luck made me take pleasure in the few initial victories, although using simple
motions it ended up making it travel an oblique path in relation to the lines. The basic premise for
navigating existed from the decision between moving forward, always peeking at the details of the
carpet ensuring an accurate update, complying with tools in order to obtain escalators with side
promotion. “Boteco de Lobos” is one of the magical adoptions for infectious times. Searching for
multi-touch padlings would result in both disappearing in screams [...]
What is the best way to Woodie 0.7 1. Route planning: Before starting navigation, it is crucial to plan the route based on maps, land-
make the robot navigate marks, and relevant information. This helps to establish a clear strategy and minimize the chance
the game field precisely? of getting lost. 2. Use of compass: The compass is a valuable tool for orientation, especially in
areas without visible reference points. It provides consistent direction and can be used in conjunc-
tion with maps for more accurate navigation. 3. Map reading: The ability to interpret maps is
fundamental. This includes identifying symbols, scales, coordinates, and geographic features. The
more skilled someone is at reading maps, the more effective they will be at navigation.
Woodie2 1 It is important to evaluate different aspects, such as speed, control algorithm, weight distribution,
and traction. Adjusting these elements can improve the robot’s ability to perform accurate and
efficient navigation.
Woodie2 1.22 1. Adjust the speed: Reduce speed when approaching a turn to maintain control and accuracy. 2.
Calculate the appropriate turning angle: Determine the required angle for the turn and adjust the
robot’s movements accordingly. 3. Keep a smooth ride: Divide the curve into smaller segments
and adjust the direction gradually to avoid sudden movements. 4. Check the weight distribution:
Make sure that the objects in the robot are balanced, providing stability during turns. 5. Choose
the appropriate wheels: Consider the type of wheel that provides a good combination of grip and
smooth handling.
Woodie2 0.5 1. Initial and Final Alignment: Before starting the journey, align the robot with a reference close
to the initial position and repeat the process as you approach the destination. 2. Line Alignment
During Performance: Use color or light sensors to detect lines in the path and adjust the trajectory
accordingly. 3. Alignment with Walls or Elements of the Scenario: Depending on the environment,
aligning with walls or other elements can be an effective strategy. 4. Mission Alignment: Use
specific marks or features of the mission areas to align the robot accurately. 5. Alignment with
Specific Scenarios: Each challenge can feature unique elements, such as ramps or bridges that can
be leveraged to align the robot.
How can I adjust my Woodie 2 1 Adjusting the robot’s curves involves modifying the motion parameters to ensure smooth and pre-
robot’s curves? (designed cise trajectory. This can be achieved by adjusting the speed and steering angle during cornering,
within the application by a taking into account the specific characteristics of the robot and the environment.
team)

8
Fig. 7. Training loss of the first model x final model [Generated by OpenAI - adapted]

R EFERENCES [19] JusBrasil. Art. 5 of Law 13709/18/gdpr in all documents. URL: https:
[1] For Inspiration, Recognition of Science, and Technology (FIRST). A //[Link]/busca?q=art.+5+da+lei+
GLOBAL ROBOTICS COMMUNITY PREPARING YOUNG PEOPLE 13709%2F18/GDPR (visited on 10/15/2023).
FOR THE FUTURE. URL: https : / / www . firstinspires . [20] OpenAI. Creating safe AGI that benefits all of humanity. URL: https:
org/ (visited on 10/09/2023). //[Link]/ (visited on 10/16/2023).
[2] FIRST. Use the Map Below to Find FIRST® Near You. URL: https: [21] Prisma. Next-generation [Link] and TypeScript ORM. URL: https:
/ / www . firstlegoleague . org / find - first (visited on //[Link]/ (visited on 10/22/2023).
09/12/2023).
[22] OpenAI. Text generation models. URL: https : / / platform .
[3] FIRST GLOBAL. HOW CAN WE CHANGE THE WORLD? ONE [Link]/docs/guides/gpt/chat-completions-api
CHILD, ONE ROBOT KIT, AND ONE NATION AT A TIME. URL: (visited on 10/07/2023).
https : / / first . global / pt / impact / #testimonials/
[23] FIRST. Dr. Woodie Flowers. URL: https : / / www .
(visited on 09/15/2023).
firstinspires . org / about / leadership / dr - woodie -
[4] SESI - Serviço Social da Indústria. Torneio SESI de Robótica. URL: flowers (visited on 11/03/2023).
https : / / www . portaldaindustria . com . br / sesi /
[24] OpenAI. Tokenizer. URL: https : / / platform . openai . com /
canais/torneio-de-robotica/ (visited on 10/10/2023).
tokenizer (visited on 10/26/2023).
[5] World Robot Olympiad Association. A TRULY GLOBAL ROBOTICS
[25] OpenAI. How should I set the temperature parameter? URL: https:
COMPETITION DEDICATED TO SCIENCE, TECHNOLOGY AND
/ / platform . openai . com / docs / guides / text -
EDUCATION. URL: [Link] (visited
generation / how - should - i - set - the - temperature -
on 10/11/2023).
parameter (visited on 06/23/2024).
[6] RoboCup Federation. Welcome to RoboCup. URL: https : / / www .
[26] IBM. What are AI hallucinations? URL: [Link]
[Link]/ (visited on 10/12/2023).
topics/ai-hallucinations (visited on 11/23/2023).
[7] Brazilian Robotics Tournament. Learn a little more about the
[27] João Victor de O. G. Ribeiro. Study on the Application of Fine-
fastest growing Tournament in Brazil. URL: https : / / www .
Tuning in Educational Robotics. URL: https : / / github . com /
torneiobrasilderobotica . com . br / about . php (visited
jvoliveirag/TCC (visited on 11/10/2023).
on 10/12/2023).
[8] National Common Curricular Base. 2018. URL: http : / / AUTHOR
[Link]/abase.
[9] F. Chollet. Deep Learning with Python. First. Shelter Island, NY, United
States: Manning Publications Co., 2017.
[10] Simon S. Haykin. Neural networks and learning machines. Third. Upper João Victor de Oliveira Gomes Ribeiro is a
Saddle River, NJ, United States: Pearson Education, 2009. Software Engineer (class of 2023 at Inatel - Na-
tional Institute of Telecommunications). Tech-
[11] R. Júnior. Concepts about Machine Learning. Santa Rita do Sapucaı́, nician in Electronics with emphasis on Indus-
MG, Brasil, 2020. trial Automation (2018) at the Francisco Mor-
eira Technical School of Electronics - ETE
[12] C. Morais. Foundation Models - Finetuning Deep Dive. Santa Rita do ”FMC”. He is interested in the areas of Arti-
Sapucaı́, MG, Brasil, 2023. ficial Intelligence, Robotics and Education.
[13] OpenAI. Models. URL: https : / / platform . openai . com /
docs/models/overview (visited on 10/07/2023).
[14] IBM. [Link]. URL: https : / / www . ibm . com / products /
watsonx-ai (visited on 10/02/2023).
[15] Google Cloud. Vertex AI. URL: [Link]
vertex-ai?hl=pt-br (visited on 10/02/2023).
[16] OpenAI. Welcome to the OpenAI developer platform. URL: https :
//[Link]/overview (visited on 10/02/2023).
[17] OpenAI. Fine-Tuning. URL: [Link]
docs/guides/fine-tuning (visited on 10/07/2023).
[18] R. Chris. Expanding The FIRST Toolbox With Artificial Intelligence.
URL: https : / / community . firstinspires . org /
expanding - the - first - toolbox - with - artificial -
intelligence (visited on 11/01/2023).

You might also like