PANGEA: Conversational AI for travelers
La Paz. Deep Learning. 2021 There are various services for travelers, from hotel pages to tourist offers just a few clicks away, however, humans have obtained their information for centuries and...
A learning project shared by the community. The article documents its team, methods and results; it does not establish that the prototype is ready for real-world use.

This archive includes automatic translations. Audio, video and text inside images remain in their original language.
La Paz. Deep Learning. 2021
There are various services for travelers, from hotel pages to tourist offers just a few clicks away, however, human beings have obtained their information for centuries and centuries through questions and knowledge bases, so it is more natural for them to make queries in that way, this is how it arises. Pangea, as a conversational Artificial Intelligence web service with which the traveler can interact and get the answers to their most pressing questions.
A traveler plans a trip more confidently with the most relevant information about his destination. In his head there are questions that in the first instance question his safety, so he investigates about it and manages to resolve his doubts in probably many minutes. In the same way, if he has already ventured to travel and needs to know some custom, typical dish, music or places to visit, there are so many questions and a lot of time spent answering them, in this way travelers lose such an important resource.
Therefore, when using texts as data to analyze in the question answering task, the use of Natural Language Processing (NLP) or in Spanish known as natural language processing, understood as the branch of Artificial intelligence (AI) which trains a computer to understand, process and generate (conversational) language.
Problem description
Specifically, the problem is the tedious and late access to immediate answers to doubts and queries about a tourist destination, such as: food, lodging, tourist activities, transportation, health centers, culture, music, political conflicts, among others.
Objective
Develop, using Artificial Intelligence, a conversational question-answer web service for travelers applying NLP through the application of a deep learning model.
Techniques implemented
The techniques complementary to the resolution of the problem are presented, as any Deep Learning model requires data to be fed.
Data search
Conversational Artificial Intelligence Pangea It focuses on answering questions and it would not be possible without enormous amounts of information with which to interact and use them as a source of knowledge (context), in that sense, a search was carried out for web pages that contain the most matching answers according to the traveling user's question; Doing it manually would represent too much work, so it was decided to use the Python library, Google Search, which employs Google search engine as a source of information to provide the URLs of the required websites.
Data capture
Once the URLs of the websites that contain the required information were obtained, the technique of Web Scraping to obtain the literal content of said sites, that is, the different paragraphs and texts present on the site. Web Scraping is a technique whose objective is to collect information from the web through code. In this case the library was used Beautiful Soup disponible en pypi.
Model selection and evaluation
Bert model: It is a bidirectional transformer encoder, which learns to interpret the language.
When additional layers are added to the Bert model and it is trained with a specialized purpose or task, a Bert model is obtained that solves a specific task.
In the project, adjusted models were already applied for the question and answer task, which were previously adjusted using the Stanford question answering data sets (SQuAD) dataset.
Both models were obtained and reused from the hugging Face Transformers library. These models receive a question and a context to process and analyze it in order to return the answers that best fit the question.
The choice of the best model was given based on the results:
- BERT in English: bert-large-uncased-whole-word-masking-finetuned-squad
- Bert in Spanish (Beto): distill-bert-base-spanish-wwm-cased-Finetuned-spa-squad2-es
Table 1. Model Evaluation
A specific case was selected and graphed to demonstrate how both models behave to the same question and what are the textual answers that each one gives in their respective language, figure 1.


Figure 1. Bar graph — Representation of Bert and Beto Model responses to the same question.
System Workflow
The system consists of different procedures to solve a certain question, so the traveling user must start by asking a question, subsequently the system performs a search with Google Search in relation to said question and returns a few URLs (maximum 5) with which the web scraper performs the task of extracting all the text (paragraphs) of the site hosted in the URL to pass it as context to the model, the model uses the context, the question and issues an answer, the response and the url are captured,Both are represented in chat message format, figure 2.

Figure 2. Own elaboration
Analysis of results (Bert vs Beto)
Pangea It returns the answers and the URLs from which such answers have been obtained. Depending on the number of tests, it can be seen that the use of Beto is more appropriate depending on the percentage of correct answers. And in the graphs it is visualized as the model Beto gives more precise answers to the same question asked in both languages according to the model.
Conclusion and recommendations
The conclusions obtained after the development and resolution of the general objective are:
- 64.7% correct answers were obtained from a total of 17 questions by the BERT model in Spanish in relation to 30% of the BERT model in English, in that sense, the pre-trained BERT model with the greatest precision in its answers is Spanish, since the questions had Bolivia as the main context and it is reasonable since not many sites in English have updated and specific information about Bolivia.
- The Web Scraping technique correctly provided the necessary web content so that the BERT model could answer the questions adequately.
- Since the service (Pangea) was deployed for a moment, the use of 2.5 GB of RAM was recorded with a delay of approximately 30 seconds while the model answers the question.
- The Web Service that was offered for a few moments managed to capture the curiosity and amazement of users due to its minimalist design and interesting way of interacting.
On the other hand, the recommendations in this regard are:
- The BERT model used was fine-tuned with the SQUAD dataset, which has a partially general domain question-answer format, so there are greater expectations with a specific tuning for the tourism area.
- The information collected by the service comes from Google, which is a search engine, the system would work much better and would have a higher quality in its responses if the search engine and the data that reside in it were collected cautiously and selectively.
- As Pangea focuses on service for travelers and tourists, it is advisable to increase different BERT models in various languages.

Project authors
- Ana Paola Céspedes Sejas
- Mauricio Serginho Matias Conde
«ElementAxiom Team»
References
Google search, https://pypi.org/project/googlesearch-python/
Beautifulsoup, https://pypi.org/project/beautifulsoup4/
Bert model in Spanish, https://huggingface.co/mrm8488/distill-bert-base-spanish-wwm-cased-finetuned-spa-squad2-es
Bert model in English, https://huggingface.co/bert-large-uncased-whole-word-masking-finetuned-squadSaturdays.AI
Saturdays.AIFollow
WRITTEN BY
Ana Paola Cespedes Sejas
Project presentation: DemoDay
¡More Artificial Intelligence!
The mission of Saturdays.ai is to make artificial intelligence more accessible (#ai4all) through intensive courses and programs where projects for good are carried out (#ai4good).
Explore our AI master’s programme at https://saturdays.ai/master-ia-online/
If you want to learn more about artificial intelligence join our community at community.saturdays.ai or visit us on our website www.saturdays.ai Join us!
Saturdays.AI
Saturdays.AI is an impact-focused organization on a mission to empower diverse individuals to learn Artificial Intelligence in a collaborative and project-based way, beyond the conventional path of traditional education.
A history of the Saturdays.AI community. Originally published on Jan 2, 2022.
← More community stories



