AUTHOR
Pavel Stambrecht

Incorporating Generative AI Into Applications: Our Journey From Inspiration To Implementation

Like many other mobile developers, we from Etnetera Flow visited this year's mDevCamp in Prague. And one of the topics we were most interested in was incorporating generative AI into apps. In an internal PoC called Floutek, we then verified for ourselves that incorporating AI into apps can be quite easy and beneficial. All you need is the right idea and a bit of experience. We hope to move our Floutek from the PoC phase to a full-fledged implementation that will simplify our daily workflow using AI.

Inspiration from mDevCamp

After a long break, the whole mDevCamp was offline again, which gave it a great atmosphere and allowed for face-to-face meetings with other technology enthusiasts. The presentations were not only informative but also inspiring. Our team at mDevCamp was most impressed by these presentations:

  • Building a Secure Fintech App by Petr Dvorak from Wultra, which discussed in detail the aspects of security in fintech applications.
  • Kamil Borzym from Allegro also gave a great presentation Hacking iOS Mobile App, which showed why it is better to use SFSafariViewController instead of WKWebView for OAuth.
  • However, we were most inspired by the presentation on incorporating Gemini AI into mobile apps Hey Google! Help me make my open source app more fun with Gemini and Generative AI by Ahmed Tikiwa. And it was thanks to her that we decided to try out the technology ourselves.

Floutek: Our innovative playground

At Etnetera Flow, we enjoy technology and are constantly looking for ways to make our work easier. One such example is the automatic detection and entry of home office, which we solve with Floutek.

Floutek is our internal Java Virtual Machine (JVM) application that determines whether a colleague is in or out of the office by detecting available IP addresses. If he is out of the office, a home office event is created in the HR tool. In addition, Floutek sends summary information to a specific channel in Slack.

Floutek is also a great place to experiment with new technologies. That's where the idea for a proof of concept (PoC) for using AI to automatically detect leave from the text of Slack messages came from.

Our PoC solution: How it works

Our PoC solution includes the following steps:

  1. A user posts a vacation message to a specific Slack channel.
  2. Slack forwards the message to our API, which uses AI to evaluate whether there is vacation information in the text.
  3. If the service detects a vacation, it sends the user a response in the form of a Slack message with the option to send the event to the HR tool. 

(Note: We don't cover the actual sending of the event to the HR tool in PoC right now. We only prepare the required button in the response.)

Following the example of the mDevCamp presentation mentioned above, we have chosen Gemini as the AI, which we access via Firebase. Since our solution also uses Firebase Functions and Firestore, using Firebase to access Gemini was a logical choice.

Technical implementation of AI in the application

Our solution uses the following components:

  • Floutek Slack application as an interface between Slack and our API.
  • Google Apps Script for Floutek logic.
  • Firebase Functions as an API to communicate with Gemini AI and store request history in the Firebase Firestore.

A key aspect of generative AI is getting the prompts right, i.e., the way we query the AI. After several iterations, we found a prompt structure that includes:

  • A description of the current state, i.e., a definition of the current day and date, which are dynamically injected.
  • An explicit description of the desired output with examples where we require valid JSON containing individual dates with holiday information.
  • An additional "sugar" description for modifying the non-valid output.
  • Explicit statement of what the AI should do.

Our prompt currently looks like this:

Example response:

The new Gemini 1.5 Pro Preview version also supports JSON format as output, which allows us to simplify the prompt significantly. However, we intentionally kept the structure for backwards compatibility with Gemini 1.0 Pro.

Results and next steps

It's fascinating what can be done with AI today. Using a short prompt, we were able to solve tasks that would have been time-consuming and complex using other methods. Another big advantage is the support of the Czech language, which, for example, Google Assistant never got.

 

You can review the results of PoC in this short video.

A few comments on the current state of PoC:

  • Outputs are not always completely correct
  • While the outputs are not always deterministic and sometimes not entirely true, we see significant steps forward with newer models like Gemini 1.5 Pro Preview.
  • We have confirmed that it makes sense to utilize AI not only during development, but also within the mobile apps themselves.
Generative Artificial Intelligence (Generative AI) is a rapidly growing field that enables the creation of new and original content such as text, images, music and videos using advanced algorithms such as deep neural networks. Unlike traditional AI systems that recognize patterns and perform specific tasks, generative AI generates answers and content based on input data. Well-known examples include OpenAI's GPT, which produces fluent text from simple prompts, and Google's Gemini, which supports creative collaboration and assists content creators.

Read more

29
.
5
.
2024
|
#
Mobile Applications
Incorporating Generative AI Into Applications: Our Journey From Inspiration To Implementation
Read article
15
.
5
.
2024
|
#
CSR
"We support the Save Lunch initiative because we share the passion and energy for a good cause," says Etnetera Flow CEO
Read article
16
.
4
.
2024
|
#
Android
#
Automotive
Development for Android Automotive OS? We are ready
Read article
27
.
9
.
2023
|
#
UX/UI
#
Education
Figma Insight: The Future (Not Only) for Designers
Read article
5
.
9
.
2023
|
#
Android
#
Mobile Applications
Migrating an XML Project to Jetpack Compose
Read article
17
.
8
.
2023
|
#
Android
Google Play Beta Program in the Development of Mobile Applications
Read article
13
.
3
.
2023
|
#
Android
5+1 Sources of Information, That Will Make You a Better Android Developer
Read article
31
.
1
.
2023
|
#
Etnetera Mobile Academy
From a Mobile Academy Graduate to Its Mentor: I was surprised by the freedom and trust, says Patrik Mokriš
Read article
11
.
1
.
2023
|
#
Project Management
#
Agile
How to Improve Team Collaboration With Just One Workshop
Read article
22
.
12
.
2022
|
#
Etnetera Mobile Academy
Mobile Academy: From Colours to Architecture in Six Weeks? Possible, but Not Easy…
Read article
25
.
5
.
2022
|
#
Project Management
#
Agile
Unleash Your Team’s Superpowers: A Step-By-Step Guide to Creating a Superhero Team With Retrospective Events
Read article
8
.
12
.
2021
|
#
Mobile Applications
Direct and Etnetera: Defining the Insurance Market via Mobile App
Read article
30
.
11
.
2021
|
#
Android
#
Education
Android Team Hit the Road for Jetpack Compose and Pokémon
Read article
19
.
8
.
2021
|
#
Etnetera Mobile Academy
Bára, Michael, Jarda and Patrik: Talents of the Mobile Academy
Read article
10
.
5
.
2021
|
#
Mobile Applications
Stars Rule: How to improve feedback and increase app ratings
Read article
31
.
3
.
2021
|
#
Etnetera Mobile Academy
#
Education
Etnetera Mobile Academy: Online format has its advantages. However rules are necessary, says mentor Petr Urban
Read article
25
.
3
.
2021
|
#
Etnetera Mobile Academy
#
Education
Etnetera Mobile Academy: It is more about transferring experience than learning, says mentor Radek Bien
Read article
24
.
3
.
2021
|
#
Mobile Applications
Voice More Important Than Vision: We keep this, too, in mind when developing mobile apps
Read article
17
.
8
.
2020
|
#
Automotive
#
Mobile Applications
Connecting Your Car to Your Phone Just Got a Little More Stylish
Read article
28
.
7
.
2020
|
#
CSR
Helping to Help with ROSSMANN
Read article
29
.
5
.
2020
|
#
Automotive
#
Mobile Applications
One Step Closer to the Customer: Customisable Offer Application
Read article
17
.
12
.
2019
|
#
Automotive
#
Mobile Applications
The Future of Automotive Available Today
Read article
22
.
7
.
2019
|
#
Etnetera Mobile Academy
#
Education
Etnetera Mobile Academy: What Are Our Graduates Doing Today
Read article
17
.
7
.
2018
|
#
Etnetera Mobile Academy
#
Education
Etnetera Mobile Academy: How We Learned to Teach
Read article
16
.
9
.
2016
|
#
Mobile Applications
Fortuna Mobile App
Read article
1
.
2
.
2016
|
#
Mobile Applications
#
Education
Mdevtalk #1: From an Idea to 250 Participants
Read article
7
.
12
.
2015
|
#
Mobile Applications
Mobile Marketing 2015 Conference: Follow Trends, Be a Dreamer
Read article