Skip to content

Commit

Permalink
adding more prompts and example text to improve results (#116)
Browse files Browse the repository at this point in the history
Improvements for biotic_interaction template.
Added a few more bits of text (about lions) and a few more prompts
  • Loading branch information
caufieldjh authored Sep 14, 2023
2 parents 1d17905 + 39c2b1e commit 24b52ce
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,5 @@ training/
preserved/
random
LOG

.DS_Store
2 changes: 1 addition & 1 deletion src/ontogpt/templates/biotic_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Container(ConfiguredBaseModel):
class BioticInteraction(ConfiguredBaseModel):

source_taxon: Optional[str] = Field(None, description="""the taxon that is the subject of the interaction""")
target_taxon: Optional[str] = Field(None, description="""the taxon that is the object of the ineteraction""")
target_taxon: Optional[str] = Field(None, description="""the taxon that is the object of the interaction""")
interaction_type: Optional[str] = Field(None, description="""the type of interaction""")


Expand Down
14 changes: 7 additions & 7 deletions src/ontogpt/templates/biotic_interaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ classes:
description: the taxon that is the subject of the interaction
range: Taxon
target_taxon:
description: the taxon that is the object of the ineteraction
description: the taxon that is the object of the interaction
range: Taxon
interaction_type:
description: the type of interaction
Expand All @@ -47,18 +47,18 @@ classes:
is_a: NamedEntity
id_prefixes:
- NCBITaxon
- COL
- ITIS
- GBIF
- SNOMEDCT
annotations:
annotators: sqlite:obo:ncbitaxon
prompt.example: shark, Carcharodon carcharias, elephant seal, Pandarus sinuatus, orca
annotators: sqlite:obo:ncbitaxon, bioportal:SNOMEDCT
#prompt.example: shark, Carcharodon carcharias, elephant seal, Pandarus sinuatus, orca, Panthera leo, lion, ungulates

InteractionType:
is_a: NamedEntity
id_prefixes:
- RO
- MESH
- ECOCORE
- NCIT
annotations:
annotators: sqlite:obo:go, sqlite:obo:ro, sqlite:obo:bero
prompt.example: eats, competes with, parasitizes
#prompt.example: eat, competes with, parasitizes, subsist on a diet, kill, compete, prey consists, hunting, killed by, compete for, dominate, competitors
11 changes: 11 additions & 0 deletions tests/input/cases/biotic_interaction-009.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Lions are predatory carnivores. They usually hunt in groups, but the actual killing is done by an individual lion. They frequently bring down prey much bigger than they are themselves. Showy males have more difficulty hunting than females because of their conspicuousness, therefore females in a pride do the majority of hunting. Males are still more aggressive during feeding than are females, even though they are less likely to have killed the prey.

African lions eat the most common large ungulates in the area (Thompson's gazelles Eudorcas thomsonii, zebras Equus burchellii, impalas Aepyceros melampus, and wildebeests Connochaetes taurinus). Individual prides tend to have their own eating preferences. Some prides tend to target large prey such as cape buffalo Syncerus caffer and giraffe Giraffa camelopardalis. Lions that are not able to capture large prey will eat birds, rodents, fish, ostrich eggs, amphibians and reptiles. Lions also actively scavenge, taking cues from hyenas and vultures.

In Tanzania's Serengeti National Park, local lions subsist on a diet comprized mainly of 7 species: zebras Equus burchellii, wildebeests Connochaetes taurinus, Thompson's gazelles Eudorcas thomsonii, buffalos Syncerus caffer, warthogs Phacochoerus aethiopicus, hartebeests Alcelaphus buselaphus, and topis Damaliscus lunatus provide 90% of their diet.

Hunting effectiveness is increased by hunting in groups. Serengeti research has shown that individual lions succeed in their hunting 17% of the time, whereas group hunts succeed 30% of the time.

Animal Foods: birds; mammals; amphibians; reptiles; fish; eggs; carrion

Primary Diet: carnivore (Eats terrestrial vertebrates)
10 changes: 10 additions & 0 deletions tests/input/cases/biotic_interaction-010.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Adult lions have no natural predators, excepting persecution by humans. Lions often kill and/or compete with other predators (leopards Panthera pardus and cheetahs Acinonyx jubatus). Spotted hyenas Crocuta crocuta defend kills or scavenged food from immature and female lions, but typically leave the food to a big male lion. Hyenas are known to kill lion cubs, juveniles, or weak and sick adult lions.

Lion cubs, if left alone, can be vulnerable to other large predators. However, infanticide is the primary threat to cubs.

Human poaching is a problem for lions. These animals are poached with wire snares, rifles, and arrows. Since lions are scavengers, they are particularly vulnerable to intentionally poisoned carcasses. There are still poachers that operate within some national parks in Africa. It has been estimated that in the 1960's, poachers were responsible for approximately 20,000 lion deaths per year in Serengeti National Park. Trophy hunting is allowed in 6 African countries.

Known Predators:

spotted hyenas (Crocuta crocuta)
humans (Homo sapiens)
9 changes: 9 additions & 0 deletions tests/input/cases/biotic_interaction-011.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
The lion is a generalist hypercarnivore and is considered to be both an apex and keystone predator due to its wide prey spectrum.[100][101] Its prey consists mainly of mammals, particularly ungulates weighing 190–550 kg (420–1,210 lb) with a preference for blue wildebeest, plains zebra, African buffalo, gemsbok and giraffe. Lions also hunt common warthog depending on availability, although the species is below the preferred weight range.[102] In India, sambar deer and chital are the most commonly recorded wild prey,[46][102][103] while domestic livestock may contribute significantly to their diet.[103] They usually avoid fully grown adult elephants, rhinoceroses and hippopotamus and small prey like dik-dik, hyrax, hare and monkey.[102][104] Unusual prey include porcupines and small reptiles. Lions kill other predators such as leopard, cheetah and spotted hyena but seldom consume them.[105]

Young lions first display stalking behaviour at around three months of age, although they do not participate in hunting until they are almost a year old and begin to hunt effectively when nearing the age of two.[106] Single lions are capable of bringing down zebra and wildebeest, while larger prey like buffalo and giraffe are riskier.[90] In Chobe National Park, large prides have been observed hunting African bush elephants up to around 15 years old in exceptional cases, with the victims being calves, juveniles, and even subadults.[107][108] In typical hunts, each lioness has a favoured position in the group, either stalking prey on the "wing", then attacking, or moving a smaller distance in the centre of the group and capturing prey fleeing from other lionesses. Males attached to prides do not usually participate in group hunting.[109] Some evidence suggests, however, that males are just as successful as females; they are typically solo hunters who ambush prey in small bushland.[110]

Lions are not particularly known for their stamina; for instance, a lioness' heart comprises only 0.57% of her body weight and a male's is about 0.45% of his body weight, whereas a hyena's heart comprises almost 1% of its body weight.[111] Thus, lions run quickly only in short bursts at about 48–59 km/h (30–37 mph) and need to be close to their prey before starting the attack.[112] One study in 2018 recorded a lion running at a top speed of 74.1 km/h (46.0 mph).[113] They take advantage of factors that reduce visibility; many kills take place near some form of cover or at night.[114] The lion's attack is short and powerful; they attempt to catch prey with a fast rush and final leap. They usually pull it down by the rump and kill by a strangling bite to the throat. They also kill prey by enclosing its muzzle in their jaws.[115]

Lions typically consume prey at the location of the hunt but sometimes drag large prey into cover.[116] They tend to squabble over kills, particularly the males. Cubs suffer most when food is scarce but otherwise all pride members eat their fill, including old and crippled lions, which can live on leftovers.[90] Large kills are shared more widely among pride members.[117] An adult lioness requires an average of about 5 kg (11 lb) of meat per day while males require about 7 kg (15 lb).[118] Lions gorge themselves and eat up to 30 kg (66 lb) in one session;[80] if it is unable to consume all of the kill, it rests for a few hours before continuing to eat. On hot days, the pride retreats to shade with one or two males standing guard.[116] Lions defend their kills from scavengers such as vultures and hyenas.[90]

Lions scavenge on carrion when the opportunity arises; they scavenge animals dead from natural causes such as disease or those that were killed by other predators. Scavenging lions keep a constant lookout for circling vultures, which indicate the death or distress of an animal.[119] Most carrion on which both hyenas and lions feed upon are killed by hyenas rather than lions.[56] Carrion is thought to provide a large part of lion diet.[120]
7 changes: 7 additions & 0 deletions tests/input/cases/biotic_interaction-012.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Lions and spotted hyenas occupy a similar ecological niche and where they coexist they compete for prey and carrion; a review of data across several studies indicates a dietary overlap of 58.6%.[121] Lions typically ignore spotted hyenas unless the lions are on a kill or are being harassed by the hyenas, while the latter tend to visibly react to the presence of lions, with or without the presence of food. Lions seize the kills of spotted hyenas; in the Ngorongoro crater it is common for lions to subsist largely on kills stolen from hyenas, causing the hyenas to increase their kill rate.[122] In Botswana's Chobe National Park, the situation is reversed; hyenas frequently challenge lions and steal their kills, obtaining food from 63% of all lion kills.[123] When confronted on a kill by lions, spotted hyenas may either leave or wait patiently at a distance of 30–100 m (100–330 ft) until the lions have finished.[124]

Hyenas are bold enough to feed alongside lions and to force the lions off a kill. The two species attack one another even when there is no food involved for no apparent reason.[125][126] Lion predation can account for up to 71% of hyena deaths in Etosha National Park. Spotted hyenas have adapted by frequently mobbing lions that enter their territories.[127] When the lion population in Kenya's Masai Mara National Reserve declined, the spotted hyena population increased rapidly.[128] Experiments on captive spotted hyenas show that specimens without prior experience with lions act indifferently to the sight of them, but will react fearfully to lion scent.[122]

Lions tend to dominate cheetahs and leopards, steal their kills and kill their cubs and even adults when given the chance.[129] Cheetahs in particular often lose their kills to lions or other predators.[130] A study in the Serengeti ecosystem revealed that lions killed at least 17 of 125 cheetah cubs born between 1987 and 1990.[131] Cheetahs avoid their competitors by using different temporal and habitat niches.[132] Leopards are able to take refuge in trees; lionesses, however, occasionally attempt to climb up and retrieve leopard kills from that height.[133]

Lions similarly dominate African wild dogs, taking their kills and preying on young and rarely adult dogs. Population densities of wild dogs are low in areas where lions are more abundant.[134] However, there are a few reported cases of old and wounded lions falling prey to wild dogs.[135][136] Lions also charge at Nile crocodiles; depending on the size of the crocodile and the lion, either animal can lose their kills to the other. Lions have been observed killing crocodiles that ventured onto land.[137] Crocodiles may also kill and eat lions, evidenced by the occasional lion claw found in crocodile stomachs.[138]

0 comments on commit 24b52ce

Please sign in to comment.