Exploring Open Information Extraction for Portuguese Using Large Language Models
Paper · 2024 · Bruno Cabral, Daniela Claro and Marlo Souza
Summary
A sentence can express several facts even when its grammar gives no obvious instruction for separating them. Open Information Extraction addresses that problem by turning sentences into structured records. Each record in this study has a first argument, a relation, and a second argument. The relation is expressed in the words of the sentence, so the extractor can handle different kinds of statements without working through a pre-defined list of relations. Cabral and colleagues ask whether general-purpose generative systems can do this for Portuguese, a language for which the paper describes a smaller body of extraction research than for English.
The authors test commercial and locally runnable systems with Portuguese prompts that demonstrate what an extraction should look like. They also develop PortOIE-Llama by adapting Llama 2-Chat with annotated examples of Portuguese sentences and their extractions. The benchmark is PUD 100, which contains 100 sentences and 136 reference extractions drawn from news and Wikipedia material. The authors use two scoring rules. Perfect matching requires the output to agree with a reference after punctuation is removed. Lexical matching tolerates some differences in wording and partial agreement between the fields of a triple.
PortOIE-Llama leads the generative systems under both scoring rules, reaching an F1 of 0.1271 for perfect matching and 0.2372 for lexical matching on PUD 100. GPT-4 is its closest generative competitor, with its best scores of 0.1065 and 0.2366, respectively, both using a prompt with three examples. The established Portuguese extractor PortNOIE leads the broader lexical comparison with an F1 of 0.2905. It also has the highest precision and the lowest reported cost and average prediction time. GPT-4 has the highest recall in that comparison, so the choice of metric changes which system comes first.
The study also finds that supplying more examples can help or hurt, depending on the system and the scoring rule. A close reading of one example shows several ways an extraction can go wrong, including assigning text to the wrong field, adding fields outside the requested format, and returning conversational prose in place of a triple. The paper releases PortOIE-Llama, its data, and its code. Its results establish a comparison on a compact Portuguese benchmark and show what task-specific adaptation can accomplish within that setup.
Deep dive: Exploring Open Information Extraction for Portuguese Using Large Language Models
Portuguese Open Information Extraction experiments compare few-shot prompting and task-specific fine-tuning with established triple extractors. · about 32 minutes to read
The problem and its context
Turning a sentence into records
A collection of articles contains information in a form that people can read one sentence at a time. An extraction system has a different job. It must identify the parts of a sentence that express a relation and put those parts into a record whose fields have consistent roles. If a sentence says Maria teaches a subject, the first argument identifies Maria, the relation expresses the teaching, and the second argument identifies the subject. Another sentence about Maria could use a wholly different relation and still produce the same kind of record.
The word open concerns the relation vocabulary. A system built to find a predetermined relation can look for that relation and assign the sentence to a category defined in advance. An open extractor has to find a phrase that expresses a relation in the sentence itself. The output can therefore preserve distinctions such as whether someone did something or merely could do it. That flexibility also leaves a decision for the extractor. It has to choose the boundaries of the relation phrase and those of the phrases it connects.
The paper approaches this as a sentence-level task. A sentence can yield several records, each describing a relation and its arguments. A phrase that belongs with one relation may play a different role in another. A long stretch of text can contain the right words while failing to isolate the assertion that the benchmark expects. This is why returning an intelligible response about the sentence and producing a usable extraction are distinct achievements. The extractor has to locate the information and assign it to the specified fields.
There is also a distinction between organizing what a sentence says and establishing whether it is true. The reference for the extraction comes from the sentence and its annotation. A report of a possibility can support an extraction about a possibility. An output that turns it into a definite occurrence would change the information being represented. The challenge in this study is to recover and structure the relation as expressed, including the wording that determines how to read it.
How earlier systems found relations
The authors describe earlier work in terms of several ways to represent the extraction task. One treats a sentence as a sequence of tokens and assigns labels to positions in that sequence. Labels can indicate that a token belongs to an argument or to a relation. The comparison the paper makes is with named entity recognition, where a system also marks stretches of a sentence according to their roles. For extraction, a complete record depends on identifying the relation and linking it to the appropriate arguments.
Another line of work produces a sequence of extractions as output. The encoder-decoder approach discussed by Cabral and colleagues takes a representation of the sentence and uses it to generate the extractions. Earlier researchers trained systems with high-confidence tuples that an existing extractor had helped assemble. This made prior extraction systems a source of examples for subsequent ones and let the new system learn how argument phrases and relation phrases fit together in the output. The paper cites Neural Open Information Extraction as an example of this approach.
The move to generation brought a particular concern into view. A system can generate several records that repeat substantially the same information. The paper describes OpenIE6 and IMoJIE as English-language work addressing redundancy and discusses their use of BERT-based encoding with an LSTM decoder. An input representation can help a system identify relationships in the sentence, while the output procedure still has to decide what to emit and when another extraction contributes distinct information. The earlier work draws on BERT.
The authors also cite multilingual work that divides generation into stages. The first identifies relations, and the second builds the extraction for each identified relation. Identifying relation phrases upfront gives the system an explicit point around which to assemble the arguments. In the strategy Cabral and colleagues study, a prompt asks for the completed records directly. A reader can therefore understand the experiment as a comparison involving another way to specify the task, alongside research that structures the decisions inside the extraction architecture. The multilingual work used BERT and mT5.
Why Portuguese calls for its own comparison
In the authors’ account, a large share of earlier extraction research focused on English. Methods that learn from annotated examples depend on having sentences and trustworthy labels for both the relations and their arguments. A successful English extractor therefore leaves an open empirical question about Portuguese, even if the abstract definition of a triple stays the same. The surface forms through which a relation is expressed and the resources used to identify its boundaries can differ across languages.
The Portuguese work that precedes this study already offers several approaches. Some systems use linguistic patterns. Others look for relations by traversing the grammatical structure of a sentence through dependency parsing. A dependency tree represents grammatical links between words, so an extractor can follow connections such as those between a verb and its dependents. PortNOIE and the multilingual Multi2OIE represent the more recent use of supervised neural methods in the paper’s account.
These systems give the experiment an important point of comparison. The question is whether a system built for a wide range of text-generation tasks can compete with one whose design is directed at extraction. A general-purpose system can be given the definition and examples in a prompt. It can also be adapted in advance using annotated data. A Portuguese extractor provides a benchmark for both approaches, because the ability to follow a prompt only matters here insofar as it results in usable Portuguese triples.
The authors situate the study alongside experiments in related tasks. Earlier researchers had tried demonstrations for relation extraction, asked questions over a body of text, or cast information extraction as a series of questions and answers. These uses suggest ways to give a text generator a more specific job. They leave room for the particular test here, in which the system receives Portuguese sentences and has to discover and express their relations in a fixed record format. The paper describes that test as a gap in the authors’ survey of Portuguese OpenIE.
The method, step by step
What goes into a triple
The method begins with a sentence and asks which relations in it can be stated in a record with two arguments. The authors use three field names in their prompts and training examples. ARG0 is the first argument, V is the expression of the relation, and ARG1 is the second argument. These names specify the expected structure of the output. The field called V can contain a phrase, including words needed to express the relation between the arguments.
An example from the training material concerns organisms in marine biomes and their need to be adapted to salt in the water. One annotated relation comes from the phrase describing where the organisms live. The organisms form the first argument, living in is the relation, and marine biomes form the second argument. The extraction draws a complete record from one grammatical part of a longer sentence. That example also shows why putting the full sentence into one field would miss the purpose of the task. Each field is intended to isolate the stretch of text that performs a particular role.
The authors define the input using token notation.
X = {x₁, x₂, …, xₙ}
X is the input sentence represented through its tokens. Each x with a subscript denotes the token at that position, and n is the number of tokens in the sentence. The subscripts begin at ₁, proceed through ₂ and the intermediate positions represented by …, and end at ₙ. The equals sign defines X in terms of the collection shown by the braces, and the commas separate its elements.
An extractor maps this input to a set of records.
Y = {y₁, y₂, …, yⱼ}
Y is the output set for X. Each y with a subscript denotes one extracted record, and j is the number of records in that set. The subscripts identify the first and subsequent records through yⱼ, with the ellipsis representing the intervening entries. The braces mark the set of extractions, the commas separate its members, and the equals sign defines Y.
The indexed description of an individual record is as follows.
yᵢ = {relᵢ, arg1ᵢ, arg2ᵢ}
yᵢ is the extraction indexed by i. relᵢ is its relation descriptor, and arg1ᵢ and arg2ᵢ are its first and second argument, respectively. The same index on each field indicates that all the fields belong to the same record. The braces enclose its components, the commas separate them, and the equals sign introduces the definition of the record.
The ordered format used throughout the task is then given as follows.
y = (arg₁, rel, arg₂)
y denotes an extraction, arg₁ is its first argument, rel expresses the relationship, and arg₂ is its second argument. The parentheses mark the ordered triple, the commas separate the positions, and the equals sign specifies the form of y. The arguments are noun phrases assembled from tokens in X. The ARG0 and ARG1 labels in the text output correspond to arg₁ and arg₂ in this notation. V corresponds to rel.
The task permits several binary extractions from a sentence, with a pair of arguments per record. That restriction matters for the design of both the prompt and the evaluation. An extractor can return another record when it finds another relation. An additional argument field within the same record falls outside the specified format. The distinction becomes visible in the paper’s qualitative example, where some of the systems express extra material by changing the structure of the record.
From a Portuguese sentence to scored extractions
The steps in order.
Which systems were selected
The authors use the Chatbot Arena leaderboard as a starting point for choosing systems in October 2023. The leaderboard guides selection before the extraction tests. The benchmark in this paper provides the evidence about Portuguese OpenIE. The authors include commercial systems reached through APIs and open alternatives that they can run locally. This allows the experiment to compare outputs and to examine the practical costs of the tested routes. The selection resource is described in Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena.
The commercial group contains GPT-4, Claude-v1, and GPT-3.5-turbo. The paper discusses instruction training and human feedback as possible contributors to the behavior of systems such as GPT-4. A system may have learned to respond to an instruction, which makes a prompt a plausible way to specify the task. Extraction still requires decisions about Portuguese syntax, the scope of a relation, and which text belongs in each field. The benchmark gives those decisions a separate test. The earlier work cited here includes the GPT-4 Technical Report and training with human feedback.
For local execution, the authors select a Falcon system with 40B parameters and a LLaMA system with 65B parameters. Both are versions tuned with OpenAssistant Conversations. The authors choose that resource because it was manually annotated, includes Portuguese instructions, and comes with a permissive license. Its 161,443 messages are part of an assistant conversation corpus. They provide background for why the selected systems may respond to Portuguese instructions. The extraction examples used to build PortOIE-Llama come from separate sources. The prior work describes OpenAssistant Conversations and the original LLaMA.
The local selection also includes Llama 2-Chat at 7B and 70B parameters. These versions were already tuned to follow instructions by their developers. The authors test both with prompts, and use the 7B version as the starting point for PortOIE-Llama. As a result, the experiment contains a direct comparison of the starting checkpoint with its task-adapted descendant, although their test prompts differ. The two unadapted chat versions also give the authors a comparison within the Llama 2 family at different parameter counts.
Teaching the task through the prompt
The prompt-based route uses few-shot learning. In this setup, demonstrations appear in the request accompanying a test sentence. Each demonstration pairs a sentence with a completed extraction, so the system sees which information to select and how to arrange it. Changing the prompt changes the instruction and examples available during generation. The underlying system stays fixed while the authors try those configurations.
The authors develop the prompt by working through the first five sentences in PUD 200. They revise the instruction and examine whether the responses to those sentences give the desired extractions. They reserve those sentences for this development exercise, keeping them out of the evaluation and out of the demonstrations inserted into the prompt. This gives the five sentences a particular role. They serve as cases on which the authors can observe prompt failures and try revisions before running the benchmark.
The early request simply asks for an extraction. The authors find the responses unsatisfactory and add a worked example. An example conveys details that a short instruction leaves implicit. It can show the expected grammatical span of an argument, the appearance of a multiword relation, and the division of the response into named fields. A sentence about Maria being a database teacher serves that purpose in the final prompt. It shows a person in the first field, a linking verb in the relation field, and a profession in the final field.
The authors also add a description of the role the system should play. In the final Portuguese prompt, the role identifies the system as an extractor and asks it to carry out the task accurately. The authors report that this helped during development, including with a single example. They also try a fuller description based on the Wikipedia definition of OpenIE and report unsatisfactory responses. The two choices illustrate different things a prompt can provide. A task definition tells the system what extraction means, while a sample record shows the precise kind of answer the pipeline expects.
In the final version, the demonstrations present field names and their values on separate lines. The prompt ends by asking for the extraction of a new sentence and inserting that sentence into the last slot. The authors find that the line-by-line layout reduces conversational lead-ins and produces text that is easier to parse. Because the pipeline passes generated text to a program for reading, this is an operational part of the method. A system may have to express the right content and use the expected serialization for that content to reach the scorer as a triple.
The paper also mentions trials with chain-of-thought prompting. The authors retain the demonstration-based prompt because it repeatedly yielded the kind of response they were seeking. Their reported benchmark varies the number of examples in that format. The development discussion explains how the authors reached it, while the benchmark answers a narrower quantitative question about the resulting prompt configurations.
Teaching the task through annotated data
The second route applies fine-tuning to Llama 2-Chat with 7B parameters. The authors give the system Portuguese training records in which a sentence is paired with its desired extraction text. The examples become evidence used to adjust the system before evaluation. At test time, PortOIE-Llama receives the same kind of task instruction and input layout as during training. It uses that format in place of the few-shot prompt applied to the other generative systems.
The training material comes from three annotated resources. Pragmatic brings news material and contains 400 sentences with 485 extractions. Gamalho contains 103 sentences and 346 extractions. Its candidate relations came from five OpenIE systems and were validated by human experts. PUD 200 contributes 200 sentences and 337 extractions from material that includes news and Wikipedia, with sentences from Portuguese Parallel Universal Dependencies. Each resource provides examples of which parts of a sentence count as an extraction and how to assign them to the triple. The connection to the underlying treebank collection is described in Universal Dependencies.
The authors convert those resources into the Alpaca instruction format. A training record contains an instruction, an input, and an output. The instruction requests an extraction with the designated fields. The input presents the sentence, and the output expresses the annotated relation through labeled values. For a sentence with more than one extraction, the numbered record format gives the output a way to present the entries separately. This conversion places examples from the different resources in a consistent format for training.
The training procedure uses Low-Rank Adaptation, or LoRA. The paper describes it as a way to express weight updates using smaller factors. Training those factors limits the number of quantities that have to be adjusted compared with updating the full set of weights. The extraction data can therefore change the system’s behavior with a smaller computational job. LoRA supplies the mechanism for adaptation, while the annotated examples determine the task that the adaptation teaches.
Training runs for two epochs, meaning two passes through the training material. The starting learning rate is 0.0002, and a cosine schedule reduces it during training. The learning rate controls the size of the training steps. The LoRA rank, which determines the size of the factorization, is 32. The LoRA scaling setting, alpha, is 16, and the dropout setting is 0.05. Dropout is a training setting that temporarily suppresses part of the computation. The authors report a cloud cost of USD 0.65 for this fine-tuning run.
Generating and reading the answers
The implementation uses Python 3.10. The calls to commercial systems use the OpenAI and Anthropic libraries, and the local route uses Llama.cpp to load the selected systems and generate responses. For every sentence in PUD 100, the pipeline supplies the sentence and the appropriate prompt, with the systems operating on tokens. It then parses the output text into records whose fields can be compared with the annotations.
The paper reports a temperature of 0.2 and a setting of 1000 for max_tokens, the output length cap. Temperature is a setting that influences the distribution used when generating the next token. The reported values for top_p, frequency_penalty, and presence_penalty are all 0. The authors describe this setup as applying no penalty for recurrence in the output. Recurring words can be legitimate in sentence extraction because different relations may share an argument.
The local runs use a cloud server with an AMD EPYC 7003 processor, 30 vCPU, an NVIDIA A100 with 40GB of graphics memory, and 200GB of RAM. The listed server price is $1.10/hr. The same cloud server is used for fine-tuning. That price describes rented infrastructure, while the results give a separate cost measure for prediction. The paper makes PortOIE-Llama available through Hugging Face and names the FORMAS openie_generative repository as the home of the data and code.
Experiments and results
The test sentences and the baselines
PUD 100 is the main evaluation set. It contains 100 sentences and 136 annotated extractions. The sentences come from news and Wikipedia in the Portuguese portion of Parallel Universal Dependencies. The authors describe the set as a later iteration of the process used to create PUD 200. Academic annotators with OpenIE expertise prepared the reference extractions, and the authors regard them as higher quality than the annotations in the earlier resource. The paper emphasizes the diversity and complexity of the material while recognizing that the set is small.
The unit supplied to each system is an individual sentence. The reference for scoring consists of its annotated triples. Because a sentence can carry several relations, a system may recover one expected triple and overlook another. The benchmark can register that outcome through recall. Conversely, a system can return several plausible-looking triples, only some of which meet the benchmark’s match rule. Precision captures the resulting difference in the share of returned triples that count as matches.
The study includes two established Portuguese baselines. DptOIE searches a dependency tree in depth-first order, following one branch before returning to explore alternatives. It uses relationships in the grammatical structure as a basis for identifying triples. PortNOIE is a neural system developed for Portuguese open extraction. The authors select it as a strong prior system on F1. Together the baselines place the generative results beside existing methods that approach the same extraction task through different mechanisms.
What counts as a match
The authors report precision, recall, and F1. Precision concerns how much of the returned extraction set matches the references. Recall concerns how much of the reference set the system recovers. F1 combines precision and recall so that a system benefits from doing well on both. All of these measures depend on how a predicted triple is judged to match an annotated one. The paper adapts evaluation code from earlier supervised OpenIE work and uses two different rules.
Under perfect matching, the comparison checks for identical strings after punctuation has been removed. The criterion rewards a system that chooses the same wording and field boundaries as the annotation. A relation can remain recognizable to a reader when an argument is shortened or when part of a verb phrase moves into the neighboring field. Such a change can still prevent a perfect match. The strict score therefore tests agreement with the particular form of the annotated record as well as recovery of its content.
The lexical rule relaxes that comparison. The paper describes word overlap of at least 50% with order ignored and says that its relaxed strategy accepts a triple when at least two components agree with their reference counterparts. A lexical match is consequently a broader category of success. It can include a case where a substantial part of the intended record has been found. The scoring rule also makes it possible for an error in one field to coexist with a credited match. That is important when the returned records are going to be used as data, because a user may need the specific field that received the wrong value.
Agreement under perfect matching
The prompting experiment tests 1-shot, 3-shot, and 5-shot versions of the prompt on PUD 100. PortOIE-Llama has a single result because it uses the instruction format from training. Its perfect-match F1 is 0.1271. GPT-4 records 0.1013 with 1-shot, 0.1065 with 3-shot, and 0.0978 with 5-shot. GPT-3.5 reaches 0.1007 with 3-shot, its best perfect-match configuration. Claude-1 also has its best perfect-match result with 3-shot, at 0.0972.
Best tested generative settings on PUD 100 by perfect-match F1
The system adapted on Portuguese extraction examples leads the generative comparison.
The numbers
| System or setting | F1 |
|---|---|
| Llama 2-Chat 7B, 1-shot | 0.0255 |
| Llama 2-Chat 70B, 5-shot | 0.0655 |
| Claude-1, 3-shot | 0.0972 |
| GPT-3.5, 3-shot | 0.1007 |
| GPT-4, 3-shot | 0.1065 |
| PortOIE-Llama, training-format prompt (this paper) | 0.1271 |
Within the Llama 2-Chat family, the unadapted 7B checkpoint achieves its best strict score, 0.0255, with 1-shot. The 70B checkpoint improves across the tested prompt sizes under perfect matching and reaches 0.0655 with 5-shot. The fine-tuned 7B system leads both. The comparison identifies how the tested configurations behave on PUD 100. It also shows why a result for a checkpoint has to be read together with the way the authors instructed it.
Among the other local systems, LLaMA obtains a perfect-match F1 of 0.0603 with 5-shot. Falcon’s best strict result is 0.0344 with 3-shot, and its 5-shot strict result is 0.0. This last figure belongs to the perfect-match criterion. Falcon still receives lexical credit under the same demonstration count, so the strict result and the lexical result describe different aspects of its output.
The perfect-match table compares the generative systems. The detailed comparison that includes both Portuguese baselines uses lexical matching. PortOIE-Llama’s lead at 0.1271 therefore applies to the systems included in the strict experiment. The broad conclusion about PortNOIE comes from the lexical results, where the baseline scores are available alongside the generative ones.
Agreement under lexical matching
The detailed lexical comparison uses the best tested prompt configuration for each prompted system. For GPT-4 and Claude-1 this is 3-shot, while GPT-3.5 and both sizes of unadapted Llama 2-Chat reach their best reported lexical results with 5-shot. PortOIE-Llama enters the comparison with its training-format instruction. The table thus compares the best reported settings using a common matching criterion on the same set of sentences.
Reported lexical-match F1 on PUD 100 at the selected settings
PortNOIE leads overall, and PortOIE-Llama and GPT-4 are the closest generative competitors.
The numbers
| System or setting | F1 |
|---|---|
| DptOIE | 0.0757 |
| Falcon, 3-shot | 0.0862 |
| Llama 2-Chat 7B, 5-shot | 0.1106 |
| LLaMA, 5-shot | 0.1433 |
| Llama 2-Chat 70B, 5-shot | 0.1770 |
| Claude-1, 3-shot | 0.2127 |
| GPT-3.5, 5-shot | 0.2132 |
| GPT-4, 3-shot | 0.2366 |
| PortOIE-Llama, training-format prompt (this paper) | 0.2372 |
| PortNOIE | 0.2905 |
PortNOIE reaches a lexical precision of 0.3269, a recall of 0.2615, and a lexical F1 of 0.2905. Its precision and F1 are the highest reported in the detailed comparison. GPT-4 has the highest recall, 0.2941, and its precision is 0.1980. PortOIE-Llama has a precision of 0.28 and a recall of 0.2058. The near tie between PortOIE-Llama and GPT-4 in lexical F1 therefore includes a clear difference in the pattern of their results. GPT-4 recovers a greater share of the references under this rule, and a larger share of PortOIE-Llama’s returned extractions is credited.
The detailed comparison gives GPT-3.5 the same reported value of 0.2132 for precision, recall, and F1 at 5-shot. Claude-1 has a lexical precision of 0.1813 and recall of 0.2573 at 3-shot, with F1 of 0.2127. These configurations end up close on F1 while differing in their balance between precision and recall. A single score is useful for ordering the entries under an agreed criterion, while the component measures describe different kinds of benchmark behavior.
There is a small reporting discrepancy for the original LLaMA system. Its 5-shot lexical F1 appears as 0.1434 in the prompting table and 0.1433 in the detailed comparison. The chart follows the detailed comparison, which supplies the values for all the systems shown. The paper also introduces one part of the reporting as a 3-shot analysis, while the detailed table explicitly labels several rows as 5-shot. The row labels identify the settings for the results discussed here.
Prediction cost and time
Cost and average prediction time accompany the detailed lexical results. PortNOIE has the lowest cost for 1k predictions, $0.15, and the shortest average prediction time, 0.5 seconds. PortOIE-Llama is listed at $0.45 for 1k predictions and 1.5 seconds on average. Those are also the reported prediction figures for the unadapted Llama 2-Chat 7B entry. The adaptation cost of USD 0.65 belongs to the separate training run.
Reported average prediction time for selected PUD 100 systems
PortNOIE has the shortest average prediction time, followed among these entries by PortOIE-Llama and the unadapted checkpoint.
The numbers
| System or setting | seconds |
|---|---|
| DptOIE | 5.3 |
| GPT-4, 3-shot | 4.2 |
| Claude-1, 3-shot | 3.5 |
| GPT-3.5, 5-shot | 2.7 |
| Llama 2-Chat 7B, 5-shot | 1.5 |
| PortOIE-Llama, training-format prompt (this paper) | 1.5 |
| PortNOIE | 0.5 |
GPT-4 at 3-shot is listed at $36.80 for 1k predictions and 4.2 seconds on average. The GPT-3.5 configuration costs $1.20 for 1k predictions, and Claude-1 costs $3.20. The figures make the cost comparison consequential even where lexical F1 scores are close. Under the reported setup, PortOIE-Llama approaches GPT-4’s F1 with a different cost and latency profile, while PortNOIE leads on lexical F1 and both of the practical measures.
These numbers also clarify the kind of claim the experiment supports. PortNOIE offers the strongest combination of reported lexical F1, prediction cost, and prediction time on this benchmark, whereas GPT-4 offers the strongest reported recall. PortOIE-Llama is the leading generative configuration on F1 under the two matching rules the authors apply to that group. Each statement identifies a comparison set and a measurement. The distinctions matter because the cost of processing sentences and the consequences of missing a relation can matter differently in a practical use of extraction.
What the ablations show
What changing the prompt size changes
The paper offers controlled comparisons of prompt size, starting and adapted systems, and the two Llama 2-Chat sizes, together with qualitative examples. It gives no formal component ablation of PortOIE-Llama’s training recipe. The clearest repeated intervention is changing how many examples a prompted system sees. The resulting scores show that the effect depends on the system and on what the evaluator counts as a successful extraction.
For GPT-4, 3-shot gives the highest perfect-match and lexical F1. Its lexical F1 is 0.2094 with 1-shot, 0.2366 with 3-shot, and 0.2262 with 5-shot. The perfect-match result also peaks at 3-shot. Claude-1 follows that pattern in both metrics. For these systems, the 5-shot version leaves the result below the best tested setting. The experiment therefore provides a direct example of a prompt whose increase in demonstrations fails to improve the benchmark result.
GPT-3.5 illustrates the importance of following the scoring rule as well. Its perfect-match F1 is 0.1007 with 3-shot and 0.0955 with 5-shot. Its lexical F1 goes from 0.1870 to 0.2132 across those settings. On the benchmark, the additional examples accompany more success under the relaxed criterion and less under the strict one. That pattern is compatible with a change in which parts of the reference triples the system recovers. The aggregate scores alone leave open whether it changes extraction coverage, the chosen field boundaries, the formatting of the output, or some combination.
There are similarly different patterns within the local systems. With Falcon, strict F1 falls to 0.0 in the 5-shot configuration, while lexical F1 there is 0.0703. LLaMA’s strict F1 rises through the tested sizes and peaks with 5-shot, while the prompting table reports lexical values of 0.1428, 0.1419, and 0.1434. For the unadapted Llama 2-Chat 7B system, the best perfect-match result comes from 1-shot and the best lexical result from 5-shot. These comparisons help explain why the authors permit the selected prompting configuration to vary across systems in the detailed lexical table.
The prompt-development observations complement these scores. The authors report that an extraction example helped, that a role description helped during their trials, and that line-separated fields produced more readily parsed responses. The longer definition gave unsatisfactory results in that process. These are observations from iterative development, with each change assessed in the context of the prompt being developed. The benchmark table supplies numbers for demonstration count. A separate quantitative contribution for each change in wording or formatting remains undetermined.
Adaptation and parameter count
Comparing PortOIE-Llama with the unadapted Llama 2-Chat 7B checkpoint starts from the same base size. The adapted configuration gives an F1 of 0.1271 for perfect matching and 0.2372 for lexical matching. The unadapted checkpoint’s best respective scores are 0.0255 and 0.1106. The differences favor the complete adapted approach, which combines supervised training on Portuguese extraction records with the instruction format used in that training.
This pairing is informative because it sets aside a difference in base parameter count. It leaves the adaptation and the inference instruction coupled. The adapted system had seen supervised target records during training, and the unadapted system receives demonstrations in its test prompt. The experiment gives a practical comparison of these two ways to make the same starting system perform the task. It does not isolate how much of the improvement to assign separately to the training examples, LoRA, or the simpler inference format.
The unadapted Llama 2-Chat pair provides a different comparison. The 70B version obtains higher F1 than the 7B version across the reported shot settings under both matching criteria. In the 5-shot lexical configuration, for instance, the reported F1 values are 0.1770 for 70B and 0.1106 for 7B. This supports the authors’ observation that size was associated with stronger extraction in the tested family. The adapted 7B result shows that task supervision can also matter enough to change the ordering within that family on PUD 100.
Each comparison answers a slightly different experimental question. The shot comparison holds the named system fixed and changes its prompt configuration. The comparison of the unadapted Llama 2-Chat versions changes the size of the instruction-tuned starting system. The comparison involving PortOIE-Llama adds extraction training and uses the instruction under which that training was conducted. Together they give evidence about the tested routes to better extraction, with different degrees of control over the changes involved.
What one sentence reveals
The qualitative case is a Portuguese sentence about a couple who could open Tesco accounts and earn a return. It includes a modal expression, two coordinated actions, and monetary information. The expected triple places the couple in the first field, the possibility of opening in the relation field, and the Tesco accounts in the second field. The example makes the boundaries of a successful extraction concrete. The opening phrase expresses possibility and the account phrase names what would be opened.
LLaMA and PortOIE-Llama return the expected three fields in the example. GPT-4 includes the expected material but continues by adding fields for the other action and its financial details. A reader can see that GPT-4 recovered the central relationship. The additional fields still matter for this experiment because the required unit has two arguments. Extending the record resembles an attempt to represent more of the sentence, but it changes the structure that the parser and benchmark are meant to receive.
Llama 2-Chat 70B returns separate extractions for the two parts of the sentence. In the first, it isolates the modal as the relation and puts the act of opening the accounts into the second argument. The expected annotation keeps opening with the modal as part of the relation. For the second action, the output assigns the earnings expression and the monetary details to fields in a way that differs from the benchmark’s expected record. The paper recognizes relevant material in these outputs. At the field level, their choices still differ from the annotated target.
Falcon uses a broad span for the first field and promotes a preposition from the financial phrase to the relation. Claude-1 instead allocates the opening adverb to the first argument and the couple to the relation field. They illustrate errors in deciding which spans play which roles. The distinction is visible even though both responses use the requested labels. A valid-looking layout gives a parser fields to read, while their contents can still fail to express the relation.
GPT-3.5 suggests other extraction tools in the example, and the unadapted Llama 2-Chat 7B system asks for more input. These responses illustrate a different failure mode. A follow-up question or an offer of tools can be coherent conversation, but it contains no triple for that sentence. GPT-3.5’s benchmark results show that it also produces creditable extractions elsewhere. The case is evidence that a system can fall back to dialogue on a particular input, with no basis for estimating the frequency of that behavior from the example alone.
The example thus gives meaning to the aggregate measurements. Perfect matching can penalize a difference such as separating the modal from the verb. Lexical matching may still recognize substantial overlap in a record whose field boundaries differ. A conversational answer leaves the parser with no extraction to score. The paper’s close reading identifies these ways the pipeline can lose credit, while the benchmark results measure their combined consequences with other errors across the test sentences.
Limitations
Limits the authors identify
The authors first emphasize the size of PUD 100. It contains 100 sentences and 136 reference extractions. They describe it as diverse and linguistically demanding, which gives the systems a variety of cases to process. A compact benchmark still gives a limited basis for generalizing to other collections of Portuguese text. The results are specific to the annotated news and Wikipedia sentences in the resource, and the authors call for testing on larger and more diverse material.
The authors also identify sensitivity to prompt construction. Their development process changes the instruction, examples, role framing, and layout. The reported trials show that the number of demonstrations can move the scores in different directions. Each result therefore belongs to a particular pairing of a system and a prompt. Future exploration could test other ways to formulate the task, as the authors propose, while keeping track of how individual prompt choices affect the outputs.
The binary format is another stated limitation. Some sentences express relations with more than a pair of arguments, while the study evaluates records with two arguments per relation. Several binary records can preserve distinct relations from a sentence, though they may leave part of a wider relationship implicit. The reference annotations share the binary restriction. The experiment measures how systems fit that task and offers no direct test of their ability to produce richer records under a different annotation scheme.
The authors raise potential biases inherited from the systems’ training data. They identify these as a concern for the quality and fairness of extraction. The experiment reports overall scores and a qualitative example. It supplies no separate measurements broken down by groups or by language varieties, so the fairness concern remains open. In particular, an improvement in aggregate F1 leaves unanswered how the improvement is distributed across the people, topics, or constructions represented in the sentences.
The training constraints are also explicit. PortOIE-Llama was adapted with limited Portuguese extraction data. According to the authors, its starting system was trained predominantly on English material and had no optimization specifically for Portuguese. LoRA adjusts a small part of the original system through its factorized updates. The authors propose more extraction data and a larger system better suited to Portuguese as potential avenues for improvement. The results in this paper concern the adaptation that was actually built and tested.
Limits visible in the evaluation design
The paper reports aggregate scores, without uncertainty intervals or a significance test for the comparison between PortOIE-Llama and GPT-4. Their lexical F1 scores are 0.2372 and 0.2366 on PUD 100. Those values establish the order in the reported run. A claim that the order would persist across new samples, example selections, or repeated runs would require additional evidence. The precision and recall scores provide a firmer description of how the two configurations differ within the observed comparison.
The detailed lexical table selects the best reported shot count per system on PUD 100. This makes the table useful for seeing how well each system performed among the configurations the authors tried. It leaves open how well a prompt size chosen independently of those results would fare on new data. The paper distinguishes the five prompt-development sentences from the evaluation. It also describes PUD 100 as a later iteration of the method behind PUD 200. A sentence-level account of the relationship between the two resources and a procedure for selecting the final shot count on separate data would make the independence of these decisions easier to assess.
The benchmark scores the final parsed records. The prompt design itself was partly motivated by the need to produce easily parsed text. Accordingly, the scores characterize the whole route from instruction to scorable output. They combine decisions about language and decisions about format. The qualitative example shows both kinds of difficulty, but the paper gives no aggregate breakdown of records lost because of formatting, missing arguments, inaccurate relation phrases, or failures to return any extraction. Two systems can end up close in F1 with different mixtures of those errors.
The matching rules also answer narrower questions than a full judgment of meaning. Exact wording after punctuation removal can disagree with a reference even when a reader finds the same proposition in the result. Under lexical matching, agreement on reported word-overlap and field criteria can earn credit in spite of an inaccurate component. Neither score directly establishes that every credited record preserves the intended meaning. A reader assessing how the records might be used needs to keep the kind of credited agreement in view.
A displayed PUD 100 example presents an additional difficulty for interpreting the annotation procedure. The source sentence concerns doctors being armed with an exception, while the extraction displayed with it concerns a dress being contemporary. The pair therefore cannot illustrate how the benchmark handles the exception in the sentence. The paper gives enough information to describe the dataset and the scoring setup, but this particular example supplies no interpretable evidence about that annotation decision.
Likewise, the qualitative discussion uses one sentence to compare failure modes. Its coordinated actions and financial phrase make it a helpful case for understanding field boundaries. It leaves the frequency of those errors unresolved and cannot establish that the same systems will rank the same way on other examples of coordination. A broader category-by-category evaluation would be needed to support claims about how reliably each system handles particular Portuguese constructions.
The comparisons also leave the mechanisms behind improvement partly unresolved. The adaptation experiment changes both the training and the inference format. The prompt-size experiment tests the configurations the authors assembled without presenting a separate analysis of example identities or order. The two unadapted sizes give a controlled comparison within a family, while the commercial and open systems differ across several aspects of their development. Their results can be compared as complete extraction systems. Claims that a single design or training factor caused a difference require a narrower intervention than the paper reports.
Finally, the reported costs and times belong to the implementation and execution conditions of the experiment. The local price reflects rented hardware, and the commercial entries use API access. Those figures support a practical comparison under the study’s conditions. They provide no measurement of a different provider, deployment pattern, or workload. Similarly, the wider benchmark including PortNOIE is reported under the lexical rule. A broad claim about comparative performance under a strict scoring rule would require the corresponding baseline measurements.
What came after
Pinto’s later study cites Cabral and colleagues and brings Portuguese extraction into a scientific setting. Its title identifies the aim as evaluation of generative systems for extracting information from Portuguese scientific material. Cabral and colleagues measure sentence-level open extraction using news and Wikipedia. The later title therefore identifies a different domain for the broader question of how to evaluate generative extraction in Portuguese. The citation establishes a connection between the studies. The scope named by the title leaves open whether the study reuses the binary triple format, PortOIE-Llama, or PUD 100. Evaluating Generative Large Language Models for Portuguese Scientific Information Extraction
Silva’s later paper also cites the study, with benchmarking Portuguese OpenIE as its stated subject. That subject continues the comparison problem Cabral and colleagues faced when placing general-purpose systems beside extractors developed for Portuguese. In the earlier study, the matching rule changes what counts as success, and the prompt configuration affects the ordering of some systems. A later work concerned with benchmarking addresses the same area of evaluation. Its title and citation leave its dataset, matching protocol, and findings unspecified. Benchmarking Portuguese Open Information Extraction
The two citations put the earlier experiment in distinct research contexts. One names a scientific domain for Portuguese information extraction, and the other names Portuguese open extraction itself as a benchmarking problem. Cabral and colleagues contribute a concrete point of comparison for those contexts through their account of the output format, prompt variants, scoring rules, and task adaptation. The recorded connections establish that the paper enters both discussions. A claim about which parts of its method either later study adopted would require a description of that study’s experiments.
Cite
Cite as Bruno Cabral, Daniela Claro and Marlo Souza. 2024. Exploring Open Information Extraction for Portuguese Using Large Language Models. Proceedings of the 16th International Conference on Computational Processing of Portuguese - Vol. 1.
@inproceedings{cabral2024exploring,
title = {{Exploring Open Information Extraction for Portuguese Using Large Language Models}},
author = {Bruno Cabral, Daniela Claro and Marlo Souza},
booktitle = {Proceedings of the 16th International Conference on Computational Processing of Portuguese - Vol. 1},
year = {2024},
url = {https://aclanthology.org/2024.propor-1.13/}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/cabral-2024-exploring-open-information-extraction-portuguese/