DEEPAGÉ: Answering Questions in Portuguese about the Brazilian Environment

Flávio Nakasato Cação, Marcos Menon José, André Seidel Oliveira, Stefano Spindola, Anna Helena Reali Costa, Fábio Gagliardi Cozman · DOI

Abstract

DEEPAGÉ is the first open-domain Question Answering (QA) system specifically designed to handle queries about the Brazilian environment in Portuguese. By combining a PTT5 language model with a BM25 retrieval module and a novel dataset of 14,000 domain-specific QA pairs, the researchers achieved a top F1-score of 36.2. This system provides a vital resource for environmental education and awareness in Brazil, bridging the gap between large-scale English-centric NLP tools and the specific needs of the Portuguese-speaking environmental community.

Introduction

Brazil stewards some of the world’s most critical biomes, yet it faces massive challenges including illegal deforestation and forest fires. While extensive textual databases on these topics exist, a significant "language gap" persists: most state-of-the-art Natural Language Processing (NLP) tools and datasets are built for English.

The authors of DEEPAGÉ identify a lack of automated systems capable of answering complex environmental questions in Portuguese. To bridge this, they address two main hurdles: the absence of a large-scale, domain-specific QA dataset in Portuguese and the need for an architecture that can accurately retrieve and synthesize information from diverse sources like Wikipedia and mainstream news.

Methodology

The researchers implemented a "Retriever-Reader" architecture, which functions in two distinct stages to provide grounded answers to user queries.

The Retriever-Reader architecture of DEEPAGÉ.
  1. The Retriever (BM25): When a user submits a question ($q_j$), this module searches a massive Knowledge Base (KB) to find the $k$ most relevant text passages ($p_1, ..., p_k$). It utilizes the BM25 algorithm, a sparse retrieval technique that ranks documents based on keyword frequency and document length.
  2. The Reader (PTT5): This component serves as the system's core generative engine. It uses PTT5, a version of the T5 (Text-to-Text Transfer Transformer) model specifically pre-trained on a massive corpus of Brazilian Portuguese. The Reader processes the original question concatenated with the retrieved passages ($q'_j$) to generate a natural language answer ($a_j$).

The study compared a "Reader-only" model (relying on internal parameters) against the "Retriever+Reader" model (using external facts) and explored the impact of domain-specific fine-tuning.

Data Construction

The system's effectiveness relies on a robust Knowledge Base and a specialized training set. The construction process involved aggregating data from Wikipedia and major Brazilian news outlets.

Pipeline for Knowledge Base construction and QA pair generation.

Knowledge Base (KB)

  • Wiki: 17,000 Portuguese Wikipedia articles related to the "Environment of Brazil."
  • News: 29,000 news articles scraped from major Brazilian outlets (Folha de S.Paulo, Estadão, O Globo) spanning 2018 to 2021.

QA Pairs (Training Data)

To create a high-quality training set without the prohibitive cost of manual annotation, the authors performed a "needle in a haystack" search on the PAQ (Probably Asked Questions) dataset—a massive English collection of 65 million pairs. Using regex and keyword filtering, they isolated 14,386 environment-related pairs and translated them into Portuguese using the Google Translate API. Human validation confirmed that 70% of these pairs were domain-adherent and 80% contained correct answers.

Key Insights and Results

The experimental results highlighted several critical factors for open-domain QA in specialized domains:

  • The Power of Fine-tuning: Fine-tuning on the 14k environmental QA pairs provided the most significant performance boost. Remarkably, a fine-tuned model without a retriever performed 11 times better than a non-fine-tuned model with a retriever.
  • Wikipedia Superiority: Models utilizing the Wikipedia KB consistently outperformed those using the News KB. This suggests a "generational bias," where the model finds it easier to process information structured similarly to the Wikipedia-based PAQ dataset used for training.
  • The "Distractor" Dilemma: While retrievers generally improve accuracy, they can occasionally introduce "distractors." For instance, a retriever might pull a passage about the Tocantins river being the largest entirely in Brazil, leading the model to incorrectly name it the largest in the Amazon basin, whereas the Reader-only model correctly identifies the Amazon River based on internal knowledge.

Performance Metrics

The top-performing configuration utilized the Wiki KB with 10 retrieved passages ($k=10$), achieving an F1-score of 36.2 and an Exact Match (EM) score of 28.2. The system is also highly efficient, with an average inference time of approximately 0.006 seconds per question.

Conclusion and Future Work

While DEEPAGÉ represents a significant step forward, it faces typical transformer limitations, such as occasional "hallucinations" when a retriever is absent and a tendency toward short, factual responses due to the nature of the PAQ training data.

Future work aims to implement a "filtering module" to discard nonsensical answers and to integrate the system into social chatbots. Such integration could significantly increase public engagement with environmental issues in Brazil by providing accessible, automated expertise.

Summary updated

BibTeX
@inproceedings{cacao2021deepage,
  author = {Flávio Nakasato Cação and Marcos Menon José and André Seidel Oliveira and Stefano Spindola and Anna Helena Reali Costa and Fábio Gagliardi Cozman},
  title = {{DEEPAGÉ: Answering Questions in Portuguese about the Brazilian Environment}},
  booktitle = {BRACIS},
  year = {2021},
  doi = {10.1007/978-3-030-91699-2\_29},
}
Figure