In [36]:
## Handle secrets either from env vars or streamlit manager
import streamlit as st
import os
api_key = os.getenv("LITELLM_KEY")
if api_key is None:
    api_key = st.secrets["LITELLM_KEY"]
cirrus_key = os.getenv("CIRRUS_KEY")
if cirrus_key is None:
    cirrus_key = st.secrets["CIRRUS_KEY"]        
In [37]:
import os
import requests
import zipfile

def download_and_unzip(url, output_dir):
    response = requests.get(url)
    zip_file_path = os.path.basename(url)
    with open(zip_file_path, 'wb') as f:
        f.write(response.content)
    with zipfile.ZipFile(zip_file_path, 'r') as zip_ref:
        zip_ref.extractall(output_dir)
    os.remove(zip_file_path)

download_and_unzip("https://minio.carlboettiger.info/public-data/hwc.zip", "hwc")
In [38]:
import pathlib
from langchain_community.document_loaders import PyPDFLoader

def pdf_loader(path):
    all_documents = []
    docs_dir = pathlib.Path(path)
    for file in docs_dir.iterdir():
        loader = PyPDFLoader(file)
        documents = loader.load()
        all_documents.extend(documents)
    return all_documents

docs = pdf_loader('hwc/')
In [39]:
# NRP embedding model tends to throw errors
# embedding = OpenAIEmbeddings(model = "embed-mistral", api_key = api_key, base_url = "https://llm.nrp-nautilus.io")
In [40]:
## Use the model on Cirrus instead:

from langchain_openai import OpenAIEmbeddings
embedding = OpenAIEmbeddings(
                 model = "cirrus",
                 api_key =  cirrus_key, 
                 base_url = "https://llm.cirrus.carlboettiger.info/v1",
)
In [41]:
# Build a retrival agent
from langchain_text_splitters import RecursiveCharacterTextSplitter
text_splitter = RecursiveCharacterTextSplitter(chunk_size=5000, chunk_overlap=500)
splits = text_splitter.split_documents(docs)
In [42]:
# slow part here, runs on remote GPU
from langchain_core.vectorstores import InMemoryVectorStore
vectorstore = InMemoryVectorStore.from_documents(documents = splits, embedding = embedding)
retriever = vectorstore.as_retriever()
In [43]:
# Choose any of the models listed by their short-name:
# see `curl -H "Authorization: Bearer $OPENAI_API_KEY" https://llm.nrp-nautilus.io/v1/models`
"""
models = {"llama3": "llama3-sdsc", 
          "deepseek-small": "DeepSeek-R1-Distill-Qwen-32B",
          "deepseek": "deepseek-r1-qwen-qualcomm",
          "gemma3": "gemma3",
          "phi3": "phi3",
          "olmo": "olmo"
         }
"""
from langchain_openai import ChatOpenAI
#llm = ChatOpenAI(model = models['gemma3'],
                 #api_key = api_key, 
                 #base_url = "https://llm.nrp-nautilus.io",  
                 #temperature=0)


from langchain.chains import create_retrieval_chain
from langchain.chains.combine_documents import create_stuff_documents_chain
from langchain_core.prompts import ChatPromptTemplate

system_prompt = (
    "You are an assistant for question-answering tasks. "
    "Use the following scientific articles as the retrieved context to answer "
    "the question. Appropriately cite the articles from the context on which your answer is based using (Author, Year) format. "
    "Do not attempt to cite articles that are not in the context."
    "If you don't know the answer, say that you don't know."
    "Use up to five sentences maximum and keep the answer concise.\n\n"
    "{context}"
)
"""
prompt = ChatPromptTemplate.from_messages(
    [
        ("system", system_prompt),
        ("human", "{input}"),
    ]
)
question_answer_chain = create_stuff_documents_chain(retriever, prompt)
rag_chain = create_retrieval_chain(retriever, question_answer_chain)
"""

def test_retriever_only(query: str, k: int = 5):
    retriever.search_kwargs["k"] = k  # restrict top-k results
    retrieved_docs = retriever.invoke(query)
    
    print(f"\n🔍 Query: {query}")
    print(f"\n📄 Top {k} Retrieved Documents:\n" + "-"*60)
    
    for i, doc in enumerate(retrieved_docs):
        print(f"\n--- Document #{i+1} ---")
        print(doc.page_content[:1000])  # preview first 1000 chars
        if hasattr(doc, "metadata") and doc.metadata:
            print("\n[Metadata]:", doc.metadata)
In [62]:
test_query = "I live in Tanzania and am having issues with lions breaking into my boma and preying on cattle. What are a few ways to help me prevent this from happening in the future? "
test_retriever_only(test_query, k=5)
test_retriever_only
🔍 Query: I live in Tanzania and am having issues with lions breaking into my boma and preying on cattle. What are a few ways to help me prevent this from happening in the future? 

📄 Top 5 Retrieved Documents:
------------------------------------------------------------

--- Document #1 ---
23. Carbone C, Teacher A, Rowcliffe JM. The costs of carnivor y. PLoS Biol. 2007; 5: 0363–0368. https://
doi.org/10.13 71/journal.p bio.0050022 PMID: 17227145
24. Grant J, Hopcraft C, Sinclair ARE, Packer C. Planning for success: Serenget i lions seek prey accessib il-
ity rather than abundance. J Anim Ecol. 2005; 74: 559–566. https://d oi.org/10.111 1/j.1365 -2656.2005.
00955.x
25. Tuqa. The Impact of Climate Variability on the Ecology of a Lion (Panthera leo Linnae us 1758) Popula-
tion and Lion-Lives tock Conflicts in the Amboseli Ecosyste m-Kenya . University of Leiden . 2015.
LED flashlight technique in reducing livestoc k depredation by Lions (Panthera leo)
PLOS ONE | https://doi.or g/10.137 1/journal.po ne.01908 98 January 31, 2018 17 / 18

[Metadata]: {'producer': 'PDFlib+PDI 8.0.2p1 (C++/Win64); modified using iTextSharp™ 5.5.3 ©2000-2014 iText Group NV (AGPL-version)', 'creator': 'Arbortext Advanced Print Publisher 11.0.2857/W Unicode-x64', 'creationdate': '2018-01-10T21:11:13+05:30', 'title': 'Effectiveness of a LED flashlight technique in reducing livestock depredation by lions (Panthera leo) around Nairobi National Park, Kenya', 'eps_processor': 'PStill version 1.76.22', 'moddate': '2018-01-10T21:12:24+05:30', 'author': "Francis Lesilau, Myrthe Fonck, Maria Gatta, Charles Musyoki, Maarten van 't Zelfde, Gerard A. Persoon, Kees C. J. M. Musters, Geert R. de Snoo, Hans H. de Iongh", 'source': 'hwc\\Lesilau et al. 2018.pdf', 'total_pages': 18, 'page': 16, 'page_label': '17'}

--- Document #2 ---
Bomas constructed with high wooden post supported by chain-link (χ
2
= 8.1131, df = 1, p-
value < 0.005) and barbed wire with post fence, were attacked less frequently than the other
categories (p <0.05, Fig 8). None of the other deterrence variables (scare crow, dogs, spotlight,
Table 1. GLMER showing the significance variables in relation to predation around the park using likeliho od ratio test.
Variables Df AIC LRT Pr(Chi) Significa nce
Flashlight 1 743.92 14.303 0.0001556
  
Years 1 742.83 13.220 0.0002770
  
Mean Rainfall 1 741.64 12.029 0.0005237
  
Park Distance 1 743.95 14.333 0.0001532
  
Significance codes: 0 ‘
  
’, 0.001 ‘
 
’, 0.01 ‘

’, 0.05’.’, 0.1 ’ ’, 1[
  
] represent s the reference variable.
Model 1: Attnight ~ Flashlight + Year + Mean Rainfall + Park Distance+ (1 | Code) + (1 | Years)
https://do i.org/10.1371/j ournal.pone .0190898.t001
Fig 6. Mean number of nocturnal and diurnal boma attacks around NNP between 2007 and 2016 at different dista

[Metadata]: {'producer': 'PDFlib+PDI 8.0.2p1 (C++/Win64); modified using iTextSharp™ 5.5.3 ©2000-2014 iText Group NV (AGPL-version)', 'creator': 'Arbortext Advanced Print Publisher 11.0.2857/W Unicode-x64', 'creationdate': '2018-01-10T21:11:13+05:30', 'title': 'Effectiveness of a LED flashlight technique in reducing livestock depredation by lions (Panthera leo) around Nairobi National Park, Kenya', 'eps_processor': 'PStill version 1.76.22', 'moddate': '2018-01-10T21:12:24+05:30', 'author': "Francis Lesilau, Myrthe Fonck, Maria Gatta, Charles Musyoki, Maarten van 't Zelfde, Gerard A. Persoon, Kees C. J. M. Musters, Geert R. de Snoo, Hans H. de Iongh", 'source': 'hwc\\Lesilau et al. 2018.pdf', 'total_pages': 18, 'page': 10, 'page_label': '11'}

--- Document #3 ---
attacks, due to economic losses[6,7]. In West and Central Africa, lion mortality due to retalia-
tory killing is a major concern as the few remaining lion populations have reached critically
low densities [4,8–10]. For conservationists working in these areas, conflict retaliation has
therefore become a main priority [4,7,10,11].
We explored a novel method for reducing human-lion conflict in Kenya. Kenya is a strong-
hold for lions, with an estimated population of 2,000 individuals in 2008 [12]. With an esti-
mated population of 35 lions including cubs, Nairobi National Park (NNP) in Kenya the lions
are surviving despite its relative confinement inside the park surrounded by a densely populated
urban area. Although the park is largely fenced [13], an unfenced connection between the
southern border of the park and the Athi-Kapiti Plains [14] provides a wildlife migratory corri-
dor and a possibility for lions to roam into surrounding communities. The intensified human
demand for space ar

[Metadata]: {'producer': 'PDFlib+PDI 8.0.2p1 (C++/Win64); modified using iTextSharp™ 5.5.3 ©2000-2014 iText Group NV (AGPL-version)', 'creator': 'Arbortext Advanced Print Publisher 11.0.2857/W Unicode-x64', 'creationdate': '2018-01-10T21:11:13+05:30', 'title': 'Effectiveness of a LED flashlight technique in reducing livestock depredation by lions (Panthera leo) around Nairobi National Park, Kenya', 'eps_processor': 'PStill version 1.76.22', 'moddate': '2018-01-10T21:12:24+05:30', 'author': "Francis Lesilau, Myrthe Fonck, Maria Gatta, Charles Musyoki, Maarten van 't Zelfde, Gerard A. Persoon, Kees C. J. M. Musters, Geert R. de Snoo, Hans H. de Iongh", 'source': 'hwc\\Lesilau et al. 2018.pdf', 'total_pages': 18, 'page': 1, 'page_label': '2'}

--- Document #4 ---
Similar to results from other studies [4,22,35], our findings show that increased rainfall is
related to higher livestock depredation frequencies. This is a common phenomenon which is
associated with a greater dispersal by both lions and their natural wild prey species during the
wet season due to an increased and more widespread availability of both water and pasture
after the rains [19]. Rainfall in the study area was highest during the 2011–2012 season, which
was also the peak for livestock depredation.
Despite the great variation in reports on the importance of boma characteristics and con-
struction materials [20,27,35] in the prevention of attacks onlivestock by large carnivores, it is
generally agreed that improved enclosures as well as both night and day time vigilance reduces
the rate of livestock depredation [7,8,10,20]. The improved fencing techniques used in studies
such as “Living walls bomas” [35,36] and “predator-proof bomas” [29] demonstrated success
rates which were si

[Metadata]: {'producer': 'PDFlib+PDI 8.0.2p1 (C++/Win64); modified using iTextSharp™ 5.5.3 ©2000-2014 iText Group NV (AGPL-version)', 'creator': 'Arbortext Advanced Print Publisher 11.0.2857/W Unicode-x64', 'creationdate': '2018-01-10T21:11:13+05:30', 'title': 'Effectiveness of a LED flashlight technique in reducing livestock depredation by lions (Panthera leo) around Nairobi National Park, Kenya', 'eps_processor': 'PStill version 1.76.22', 'moddate': '2018-01-10T21:12:24+05:30', 'author': "Francis Lesilau, Myrthe Fonck, Maria Gatta, Charles Musyoki, Maarten van 't Zelfde, Gerard A. Persoon, Kees C. J. M. Musters, Geert R. de Snoo, Hans H. de Iongh", 'source': 'hwc\\Lesilau et al. 2018.pdf', 'total_pages': 18, 'page': 13, 'page_label': '14'}

--- Document #5 ---
radio, fire and noise) were significant in predation prevention (see S1 Table).Herd size did not
affect nocturnal predation of shoats (Kruskal test, χ
2
= 21.76, p-value = 0.7) and cattle (χ
2
25,
p-value = 0.6) (see S1 Table).
When respondents were asked an open question on what they believed should be done to
resolve human-lion conflicts around NNP, (Appendix I, question 13), most respondents
(92%) had one or more suggestions (S3 Table): “flashlight installation” and “some form of
compensation” were by far the most mentioned suggestions, followed by measures that would
prevent lions from roaming outside the park boundaries. Although “fencing the park” was
sometimes mentioned, 62% of the respondents did not believe that complete fencing of the
park would resolve the human-lion conflict. Suggestions further included measures that could
rapidly detect and relocate freely roaming lions back to the park, which according to some will
become even more important when the announced plans for 

[Metadata]: {'producer': 'PDFlib+PDI 8.0.2p1 (C++/Win64); modified using iTextSharp™ 5.5.3 ©2000-2014 iText Group NV (AGPL-version)', 'creator': 'Arbortext Advanced Print Publisher 11.0.2857/W Unicode-x64', 'creationdate': '2018-01-10T21:11:13+05:30', 'title': 'Effectiveness of a LED flashlight technique in reducing livestock depredation by lions (Panthera leo) around Nairobi National Park, Kenya', 'eps_processor': 'PStill version 1.76.22', 'moddate': '2018-01-10T21:12:24+05:30', 'author': "Francis Lesilau, Myrthe Fonck, Maria Gatta, Charles Musyoki, Maarten van 't Zelfde, Gerard A. Persoon, Kees C. J. M. Musters, Geert R. de Snoo, Hans H. de Iongh", 'source': 'hwc\\Lesilau et al. 2018.pdf', 'total_pages': 18, 'page': 11, 'page_label': '12'}
Out[62]:
<function __main__.test_retriever_only(query: str, k: int = 5)>
In [64]:
test_query = "What should I do if elephants are destroying my crops? And what are the most cost-effective prevention methods, if there are any you know of?"
test_retriever_only(test_query, k=5)
test_retriever_only
🔍 Query: What should I do if elephants are destroying my crops? And what are the most cost-effective prevention methods, if there are any you know of?

📄 Top 5 Retrieved Documents:
------------------------------------------------------------

--- Document #1 ---
242 Conflict Intervention Priorities
helps foster more effective collaboration (Game et al.
2013; Lute et al. 2018). Third, both the survey results
and feedback were consistent with recent scholarship
(Redpath et al. 2017) that highlights participatory and
stakeholder-first conflict interventions as best practice
and advocates multipronged (Hazzah et al. 2014) and
adaptive management strategies (Bunnefeld et al. 2017).
Education and awareness programs were often cited in
feedback as being necessary additions to any interven-
tions. However, given the failures of many awareness-
based conservation programs (Schultz 2011), a further
exploration into why and where conservation decision
makers deem them most appropriate is important. Ap-
proaches that are specifically aimed at a particular au-
dience, such as social marketing (Salazar et al. 2018),
may be more effective than simple information provision
or—often-problematic—enforcement (Duffy et al. 2019).
However, how different interventio

[Metadata]: {'producer': 'Acrobat Distiller 10.1.10 (Windows); modified using iText 4.2.0 by 1T3XT', 'creator': 'LaTeX with hyperref package', 'creationdate': '2020-01-16T12:33:42+05:30', 'keywords': '', 'moddate': '2025-05-27T12:12:25-07:00', 'subject': 'Conservation Biology 2020.34:232-243', 'wps-proclevel': '3', 'wps-journaldoi': '10.1111/(ISSN)1523-1739', 'author': '', 'title': 'Predicting intervention priorities for wildlife conflicts', 'wps-articledoi': '10.1111/cobi.13372', 'source': 'hwc\\Baynham-Herd et al. 2019.pdf', 'total_pages': 12, 'page': 10, 'page_label': '242'}

--- Document #2 ---
3
Vol.:(0123456789)Scientific RepoRtS  |        (2020) 10:15341  | https://doi.org/10.1038/s41598-020-72343-6
www.nature.com/scientificreports/
numbers increase and more bears need more  food26,43,44. Hence, the effectiveness of anti-bear interventions can 
be lower than expected when hungry bears become persistent and more aggressive in damaging behaviour. As 
high density may lead to more bears involved in conflicts, it also could increase the demand for bear  removal45 
and affect the effectiveness of removal techniques such as translocation and lethal control.
In this paper, we compiled a global database of intervention effectiveness against bears and studied how it 
is related to bear species and densities, duration of intervention application, and intervention techniques. We 
attempted to find and describe the most effective and the least effective interventions against bears. Further, we 
tested several hypotheses: (1) lethal control and invasive management are less effective th

[Metadata]: {'producer': 'Adobe PDF Library 15.0; modified using iText® 5.3.5 ©2000-2012 1T3XT BVBA (SPRINGER SBM; licensed version)', 'creator': 'Springer', 'creationdate': '2020-09-14T15:09:33+05:30', 'crossmarkdomains[1]': 'springer.com', 'moddate': '2020-09-14T15:58:07+02:00', 'crossmarkmajorversiondate': '2010-04-23', 'subject': 'Scientific Reports, https://doi.org/10.1038/s41598-020-72343-6', 'author': 'Igor Khorozyan', 'title': 'Variation and conservation implications of the effectiveness of anti-bear interventions', 'crossmarkdomainexclusive': 'true', 'robots': 'noindex', 'doi': '10.1038/s41598-020-72343-6', 'crossmarkdomains[2]': 'springerlink.com', 'source': 'hwc\\Khorozyan and Waltert 2020.pdf', 'total_pages': 9, 'page': 2, 'page_label': '3'}

--- Document #3 ---
L~J;~...'
¿- ~1i
~ø~~/
,'~ '~J-'::~;"~' ~-~
'-
a
c
b
..--~
1-
~~-
, :~';~'?'".
-1~~~~f~':".o.,".~.~) ~
ç J)';i-ir,i.();::u-::::;v'
~d/idlj¡ti# - ""... .. . '. ý.o:.. .1l)"',y'A 'jt:)
.: .' ~:-~J.~,,:::;:,'."'h _ .. " i.-/ J. l1?~"P~.o~'::~ ....( I:? ~'J.J.I
'-~:~.éiiA~~t~'?:,)J -~
e
¡=j'~0'Ó .~
! r- ..'7~l)S,
. '~RfÖ'~~j£'"J;').,;.... i
/!Æ,?-:''~, j
q~ f\ .;- .J')~~:' -' i
(1"
Fig. /8. a. A leg-hold trap is first laid on the ground to detemiine best location of hole. b. The hole should be about II cm deep and shape to
accommodate the trap. c. If a stake is used. it is driven into the boHom of the hole. If a drag is used, it is placed in the hole. The chain is then put
into the hole and covered with soil unlIlthe hole is about 3 cm deep and packed to provide a firm foundation. d. TIie front jaw is raised and the pan
cover is placed over the pan so soil cannot get under the pan. e. The trap is covered with finely sifted soil to a depth of 0.6-1.2 cm. A siick or whisk
broom is used to to

[Metadata]: {'producer': 'Canon iR C5800', 'creator': 'Canon iR C5800', 'creationdate': '2009-03-09T08:39:40-05:00', 'subject': 'Image', 'source': 'hwc\\Dolbeer et al. 1994.pdf', 'total_pages': 34, 'page': 27, 'page_label': '28'}

--- Document #4 ---
gered and 'protected by state and federal laws. Control
operators unfamiliar with bat identification are urged to
sek professional help from wildlife agencies or univer-
sities (Frantz 1986).
The presence of bats in a building usually is evidenced
by noise (squeaking, scratching) and by the presence and
distinctive, pungent odor of the accumulated fecal drop-
pings and urine. Bat feces are readily identified from those
of rodents by odor, insect content, and the ease with which
they are crushed (Greenhall 1982).
Many people are feanul of bats and panic in their pres-
ence. Bats occasionally contract rabics, and, although few
human deaths have resulted from bat-transmitted rabies
(Green hall i 982), contact with a rabid bat or a bite by a
bat that escapes requires pòstexposurc trcatmcnt of people
and pets without current vaccinations (Frantz 1986).
Where bat colonies are allowed to pcrsist so that guano
deposits accumulate, the fungus that causcs histoplasmosis
can develop. Bats roostin

[Metadata]: {'producer': 'Canon iR C5800', 'creator': 'Canon iR C5800', 'creationdate': '2009-03-09T08:39:40-05:00', 'subject': 'Image', 'source': 'hwc\\Dolbeer et al. 1994.pdf', 'total_pages': 34, 'page': 10, 'page_label': '11'}

--- Document #5 ---
Fig 1. The effects of AC programs on three metrics of black bear wariness, Whistler BC, 2007–2008. A and B show
the average observed percent change in overt reaction distance and displace ment distance among bears in the AC
Group and the Control Group. Error bars represent standard error. C shows the predicted effect of the number of AC
events conduc ted during the previous 30 days on the likeliho od that a bear will flee from research ers prior to their
beginning AC treatm ent.
https://d oi.org/10.1371/j ournal.pon e.0295989.g0 01
PLOS ONE
Aversive condition ing of conflict black bears
PLOS ONE | https://doi.or g/10.137 1/journal.po ne.02959 89 January 2, 2024 8 / 19

[Metadata]: {'producer': 'PDFlib+PDI 9.3.1p2 (C++/Win64)', 'creator': 'PTC Arbortext Layout Developer 12.1.6180/W-x64', 'creationdate': '2023-12-25T16:46:13+05:30', 'title': 'Aversive conditioning increases short-term wariness but does not change habitat use in black bears associated with conflict', 'epsprocessor': 'PStill version 1.84.42', 'author': 'Lori Homstol, Sage Raymond, Claire Edwards, Anthony N. Hamilton, Colleen Cassady St. Clair', 'moddate': '2023-12-25T16:46:13+05:30', 'source': 'hwc\\Homstol et al. 2024.pdf', 'total_pages': 19, 'page': 7, 'page_label': '8'}
Out[64]:
<function __main__.test_retriever_only(query: str, k: int = 5)>
In [66]:
test_query = "I know jaguars can prey on goats and cattle, which I have; what measures can I take to save them from getting harmed? Can you check these pdfs to see which ones might help?"
test_retriever_only(test_query, k=5)
test_retriever_only
🔍 Query: I know jaguars can prey on goats and cattle, which I have; what measures can I take to save them from getting harmed? Can you check these pdfs to see which ones might help?

📄 Top 5 Retrieved Documents:
------------------------------------------------------------

--- Document #1 ---
hypothesis was that index of pre- and post-ban use
was the same for both types of feeding sites.
We calculated the average annual number of
observed bears during pre- and post-ban periods
for each feeding site. We then used these averages
instead of raw data from individual counts. We
calculated an annual index of feeding site use by
pooling data from all feeding sites (average number
of bears counted at feeding sites in post-ban period
divided by average number of bears counted in pre-
ban period). Subsequently, we used bootstrapping
with 1,000 simulations to test for differences between
SUPPLEMENTAL FEEDING AND BEAR DEPREDATIONS N Kavcˇicˇ et al. 113
Ursus 24(2):111–119 (2013)

[Metadata]: {'producer': 'GPL Ghostscript 9.26', 'creator': '', 'creationdate': '2022-06-06T23:09:49-07:00', 'moddate': '2022-06-06T23:09:49-07:00', 'title': '', 'author': '', 'subject': '', 'keywords': '', 'source': 'hwc\\Kavcic et al. 2013.pdf', 'total_pages': 9, 'page': 2, 'page_label': '3'}

--- Document #2 ---
1
Vol.:(0123456789)Scientific RepoRtS  |        (2020) 10:15341  | https://doi.org/10.1038/s41598-020-72343-6
www.nature.com/scientificreports
Variation and conservation 
implications of the effectiveness 
of anti‑bear interventions
igor Khorozyan* & Matthias Waltert
Human-bear conflicts triggered by nuisance behaviour in public places and damage to livestock, crops, 
beehives and trees are among the main threats to bear populations globally. The effectiveness of 
interventions used to minimize bear-caused damage is insufficiently known and comparative reviews 
are lacking. We conducted a meta-analysis of 77 cases from 48 publications and used the relative 
risk of damage to compare the effectiveness of non-invasive interventions, invasive management 
(translocations) and lethal control (shooting) against bears. We show that the most effective 
interventions are electric fences (95% confidence interval  = 79.2–100% reduction in damage), calving 
control (100%) and livestock replacement

[Metadata]: {'producer': 'Adobe PDF Library 15.0; modified using iText® 5.3.5 ©2000-2012 1T3XT BVBA (SPRINGER SBM; licensed version)', 'creator': 'Springer', 'creationdate': '2020-09-14T15:09:33+05:30', 'crossmarkdomains[1]': 'springer.com', 'moddate': '2020-09-14T15:58:07+02:00', 'crossmarkmajorversiondate': '2010-04-23', 'subject': 'Scientific Reports, https://doi.org/10.1038/s41598-020-72343-6', 'author': 'Igor Khorozyan', 'title': 'Variation and conservation implications of the effectiveness of anti-bear interventions', 'crossmarkdomainexclusive': 'true', 'robots': 'noindex', 'doi': '10.1038/s41598-020-72343-6', 'crossmarkdomains[2]': 'springerlink.com', 'source': 'hwc\\Khorozyan and Waltert 2020.pdf', 'total_pages': 9, 'page': 0, 'page_label': '1'}

--- Document #3 ---
L~J;~...'
¿- ~1i
~ø~~/
,'~ '~J-'::~;"~' ~-~
'-
a
c
b
..--~
1-
~~-
, :~';~'?'".
-1~~~~f~':".o.,".~.~) ~
ç J)';i-ir,i.();::u-::::;v'
~d/idlj¡ti# - ""... .. . '. ý.o:.. .1l)"',y'A 'jt:)
.: .' ~:-~J.~,,:::;:,'."'h _ .. " i.-/ J. l1?~"P~.o~'::~ ....( I:? ~'J.J.I
'-~:~.éiiA~~t~'?:,)J -~
e
¡=j'~0'Ó .~
! r- ..'7~l)S,
. '~RfÖ'~~j£'"J;').,;.... i
/!Æ,?-:''~, j
q~ f\ .;- .J')~~:' -' i
(1"
Fig. /8. a. A leg-hold trap is first laid on the ground to detemiine best location of hole. b. The hole should be about II cm deep and shape to
accommodate the trap. c. If a stake is used. it is driven into the boHom of the hole. If a drag is used, it is placed in the hole. The chain is then put
into the hole and covered with soil unlIlthe hole is about 3 cm deep and packed to provide a firm foundation. d. TIie front jaw is raised and the pan
cover is placed over the pan so soil cannot get under the pan. e. The trap is covered with finely sifted soil to a depth of 0.6-1.2 cm. A siick or whisk
broom is used to to

[Metadata]: {'producer': 'Canon iR C5800', 'creator': 'Canon iR C5800', 'creationdate': '2009-03-09T08:39:40-05:00', 'subject': 'Image', 'source': 'hwc\\Dolbeer et al. 1994.pdf', 'total_pages': 34, 'page': 27, 'page_label': '28'}

--- Document #4 ---
Damage often is undetected until a tree shows above-
ground signs of stress; by then damage is frequently lethal
(Cummings and Marsh 1978). Pocket gophers also may
damage plastic irrigation lines on agncultural lands as
well as underground pipes and cables in other situations.
On rangeland, soil disturbance and mound building by
pocket gophers rcsult in increased plant diversity and a
rcplacement of perennial by annual grasses (McDonough
1974, Foster and Stubbendieck i 980, Marsh 1985a). They
can greatly rcduce the carring capacity of rangeland for
livestock. Gophcrs can be a serious pest in alfalfa by feed-
ing on the leaves, stems, and roots (Marsh 1985a). Gopher
mounds can cause equipment breakage and increascd
weanng ratc of haying machinery. Gopher tunnels result
in water loss in irrigated areas (Case and Jasch 1993).
Pockct gophers are a major impedimcnt to reforcstation
in the westcrn U.S. (Crouch 1986). During winter thcy
often forage above ground by tunneling in the snow. Co-


[Metadata]: {'producer': 'Canon iR C5800', 'creator': 'Canon iR C5800', 'creationdate': '2009-03-09T08:39:40-05:00', 'subject': 'Image', 'source': 'hwc\\Dolbeer et al. 1994.pdf', 'total_pages': 34, 'page': 13, 'page_label': '14'}

--- Document #5 ---
242 Conflict Intervention Priorities
helps foster more effective collaboration (Game et al.
2013; Lute et al. 2018). Third, both the survey results
and feedback were consistent with recent scholarship
(Redpath et al. 2017) that highlights participatory and
stakeholder-first conflict interventions as best practice
and advocates multipronged (Hazzah et al. 2014) and
adaptive management strategies (Bunnefeld et al. 2017).
Education and awareness programs were often cited in
feedback as being necessary additions to any interven-
tions. However, given the failures of many awareness-
based conservation programs (Schultz 2011), a further
exploration into why and where conservation decision
makers deem them most appropriate is important. Ap-
proaches that are specifically aimed at a particular au-
dience, such as social marketing (Salazar et al. 2018),
may be more effective than simple information provision
or—often-problematic—enforcement (Duffy et al. 2019).
However, how different interventio

[Metadata]: {'producer': 'Acrobat Distiller 10.1.10 (Windows); modified using iText 4.2.0 by 1T3XT', 'creator': 'LaTeX with hyperref package', 'creationdate': '2020-01-16T12:33:42+05:30', 'keywords': '', 'moddate': '2025-05-27T12:12:25-07:00', 'subject': 'Conservation Biology 2020.34:232-243', 'wps-proclevel': '3', 'wps-journaldoi': '10.1111/(ISSN)1523-1739', 'author': '', 'title': 'Predicting intervention priorities for wildlife conflicts', 'wps-articledoi': '10.1111/cobi.13372', 'source': 'hwc\\Baynham-Herd et al. 2019.pdf', 'total_pages': 12, 'page': 10, 'page_label': '242'}
Out[66]:
<function __main__.test_retriever_only(query: str, k: int = 5)>
In [68]:
test_query = "I am trying to prevent coyotes from eating the calves of my free-range cattle. What may work best and incentivize them to stay away?"
test_retriever_only(test_query, k=5)
test_retriever_only
🔍 Query: I am trying to prevent coyotes from eating the calves of my free-range cattle. What may work best and incentivize them to stay away?

📄 Top 5 Retrieved Documents:
------------------------------------------------------------

--- Document #1 ---
hypothesis was that index of pre- and post-ban use
was the same for both types of feeding sites.
We calculated the average annual number of
observed bears during pre- and post-ban periods
for each feeding site. We then used these averages
instead of raw data from individual counts. We
calculated an annual index of feeding site use by
pooling data from all feeding sites (average number
of bears counted at feeding sites in post-ban period
divided by average number of bears counted in pre-
ban period). Subsequently, we used bootstrapping
with 1,000 simulations to test for differences between
SUPPLEMENTAL FEEDING AND BEAR DEPREDATIONS N Kavcˇicˇ et al. 113
Ursus 24(2):111–119 (2013)

[Metadata]: {'producer': 'GPL Ghostscript 9.26', 'creator': '', 'creationdate': '2022-06-06T23:09:49-07:00', 'moddate': '2022-06-06T23:09:49-07:00', 'title': '', 'author': '', 'subject': '', 'keywords': '', 'source': 'hwc\\Kavcic et al. 2013.pdf', 'total_pages': 9, 'page': 2, 'page_label': '3'}

--- Document #2 ---
depredation rates on domestic sheep (i.e. risk-taking behaviours)
increased when coyotes were energetically challenged during
whelping and provisioning of pups, and that removing pups from a
territorial, depredating breeding pair reduced predation rates on
sheep. In subsequent research, sterilized coyotes reduced predation
rates on domestic lambs six- to eight-fold without affecting social
behaviour and territory maintenance (Bromley & Gese, 2001a,
2001b). Thus, anticipating how carnivores might shift their
behaviour in response to available resources and in relation to the
relative costs associated with anthropogenic‘predatory stimuli’ is
critical for carnivoreeconflict mitigation.
Complementing management strategies intended to lessen the
energetic reward associated with risk-taking behaviours are efforts
designed to modify or interrupt a carnivore's predatory sequence
(i.e. killing livestock;Knowlton, Gese,& Jaeger, 1999; Shivik, 2006).
Here, we emphasize that the predatory sequence 

[Metadata]: {'producer': 'Acrobat Distiller 8.1.0 (Windows)', 'creator': 'Elsevier', 'creationdate': '2016-09-26T20:02:29+05:30', 'crossmarkdomains[2]': 'elsevier.com', 'crossmarkmajorversiondate': '2010-04-23', 'subject': 'Animal Behaviour, 120 (2016) 245-254. doi:10.1016/j.anbehav.2016.07.013', 'author': 'Bradley F. Blackwell', 'elsevierwebpdfspecifications': '6.5', 'crossmarkdomainexclusive': 'true', 'robots': 'noindex', 'moddate': '2016-09-26T20:03:01+05:30', 'doi': '10.1016/j.anbehav.2016.07.013', 'crossmarkdomains[1]': 'sciencedirect.com', 'title': 'No single solution: application of behavioural principles in mitigating human-wildlife conflict', 'source': 'hwc\\Blackwell et al. 2016.pdf', 'total_pages': 10, 'page': 5, 'page_label': '250'}

--- Document #3 ---
in each park. This model comprises a zero-inflated
submodel to assess the probability that coyotes were
reported on a certain park–week combination via a logis-
tic regression, and a conditional submodel that assessed
the abundance of coyote reports per park (or park area)
per week using a negative binomial regression. Potential
explanatory fixed-effect variables for this response vari-
able included coyote season, year, and the last aversive
conditioning treatment type prior to the reporting week if
aversive conditioning was conducted in the eight weeks
(56 days) prior to the week being evaluated. We also
investigated the role of the number of days since the last
aversive conditioning engagement, the number of aver-
sive conditioning engagements of coyotes by contractors
in the eight weeks prior to a reporting week (tallied sepa-
rately for each park or park area), and the number of
reports of coyote activity made to 311 in the eight weeks
prior to the reporting week (also tallied sep

[Metadata]: {'producer': 'Acrobat Distiller 22.0 (Windows); modified using iText 4.2.0 by 1T3XT', 'creator': 'Arbortext Advanced Print Publisher 9.1.520/W Unicode', 'creationdate': '2023-10-10T06:27:55+05:30', 'moddate': '2025-05-27T12:15:21-07:00', 'subject': 'Ecosphere 2023.14:e4676', 'wps-proclevel': '3', 'wps-journaldoi': '10.1002/(ISSN)2150-8925', 'title': 'Proactive use of intensive aversive conditioning increases probability of retreat by coyotes', 'wps-articledoi': '10.1002/ecs2.4676', 'source': 'hwc\\Lajeunesse et al. 2023.pdf', 'total_pages': 17, 'page': 6, 'page_label': '7'}

--- Document #4 ---
58 EV ALUATING BEAR EDUCATION
TABLE 2
Questions Grouped in Indices Based on a Factor Analysis (N = 153)
Initial Eigen
values∗
% of Component ∗
Total variance loadings
Index A: Attitude toward bear protection (Cronbach’sα = 0.63)
It is good to have the RECAY? (5-point scale) 2 .049 51 .235 0 .742
Do you believe the RECAY is needed for bear survival? (5-point scale) 0 .893 22 .329 0 .737
Do bears need to be protected? (yes = 1/no = 0) 0 .604 15 .103 0 .644
Are laws to protect bears needed? (yes = 1/no = 0) 0 .453 11 .333 0 .736
Index B: Attitude toward bear presence (Cronbach’sα = 0.53)
Name three animals that are detrimental to your livelihood
(bear is named = 0; not named = 1)
1.809 45 .224 0 .670
Name three animals that are beneficial to your livelihood
(bear is named = 0; not named = 1)
0.848 21 .190 0 .604
Are there currently more bears than in the past? (3-point scale) 0 .770 19 .262 0 .764
Would you prefer that there are more or less bears in the forest?
(5-point scale)
0.573 14 .3

[Metadata]: {'producer': 'Acrobat Distiller 6.0.1 (Windows)', 'creator': 'dvips(k) 5.95a Copyright 2005 Radical Eye Software', 'creationdate': '2011-11-09T13:01:02+05:30', 'moddate': '2011-11-09T13:01:23+05:30', 'title': 'Human-Wildlife Conflict and Environmental Education: Evaluating a Community Program to Protect the A', 'source': 'hwc\\Espinosa et al. 2011.pdf', 'total_pages': 12, 'page': 4, 'page_label': '58'}

--- Document #5 ---
460 SELECTIVE REMOVAL OF COYOTES * Blejwas et al. J. Wildl. Manage. 66(2):2002
 lambs killed substantially more sheep than coy-
 otes without access to lambs. One male whose 
 original territory did not overlap lambing pas- 
 tures was implicated in only 2 sheep kills over the 
 course of an entire year. After his mate died, he 
 merged his territory with that of a widowed 
 female in an adjacent lamb-access territory and 
 was subsequently implicated in 2 kills within a 
 month. Furthermore, at HREC, the same territo- 
 rial pairs that have access to small lambs during 
 the lambing season also have access to replace- 
 ment lambs during the summer and fall (Fig. 1). 
 Pairs in these territories killed sheep throughout 
 the year, a pattern that may have been encour- 
 aged by the continuing presence of replacement 
 lambs within the territory. 
 MANAGEMENT IMPLICATIONS 
 Previous studies have shown that breeding coy- 
 otes are responsible for most sheep depredations 
 (Till and Know

[Metadata]: {'producer': 'iText® 5.5.8 ©2000-2015 iText Group NV (AGPL-version); modified using iText® 7.1.3 ©2000-2018 iText Group NV (JSTOR Michigan; licensed version)', 'creator': 'page2pdf-2.1', 'creationdate': '2016-08-07T19:47:10+00:00', 'moddate': '2020-09-14T14:51:37+00:00', 'title': 'The Effectiveness of Selective Removal of Breeding Coyotes in Reducing Sheep Predation', 'source': 'hwc\\Blejwas et al. 2002.pdf', 'total_pages': 13, 'page': 10, 'page_label': '461'}
Out[68]:
<function __main__.test_retriever_only(query: str, k: int = 5)>
In [70]:
test_query = "Deers keep destroying and takiing over our large agricultural fields. Is there anything I can try to prevent this that won’t break the bank?"
test_retriever_only(test_query, k=5)
test_retriever_only
🔍 Query: Deers keep destroying and takiing over our large agricultural fields. Is there anything I can try to prevent this that won’t break the bank?

📄 Top 5 Retrieved Documents:
------------------------------------------------------------

--- Document #1 ---
and among lethal interventions, 48.6% investigated culling (N =1 7 ) ,
34.3% retaliatory killing (N = 12), and 17.1% trophy-hunting (N =6 ) .
Contrary to the whole body of literature, most of these case studies were
located in the Neartic (63.6%) followed by the Afrotropic (24.5%) and
Paleartic (7.7%) (Fig. 3). Nonetheless, the species included in the case studies
reflected the generalfindings, with most of the management experiments
being conducted on wolves (29.4%) followed by bears (23.8%) and leopards
(16.1%) (Fig. 2). Surprisingly, almost none of the experiments were con-
ducted on tigers, despite their strong presence in the whole literature and
their heavy impact, including attacks on humans (Dhungana et al., 2016).
Fig. 2.Species prevalence in literature (black bars,N = 525) and case studies (gray bars, N = 143).
Fig. 3.Geographic prevalence in literature (black bars, N = 525) and case studies (gray bars,N = 143), with species involved per geographic area. In circles, mean result

[Metadata]: {'producer': 'PyPDF', 'creator': 'Elsevier', 'creationdate': '2022-06-07T02:40:21+00:00', 'author': 'Charlotte Lorand', 'crossmarkdomains[1]': 'elsevier.com', 'crossmarkdomains[2]': 'sciencedirect.com', 'crossmarkdomainexclusive': 'true', 'crossmarkmajorversiondate': '2010-04-23', 'elsevierwebpdfspecifications': '7.0', 'keywords': 'Human-carnivore coexistence; Lethal control; Non-lethal management; Conservation interventions; Effectiveness; Evidence-based', 'moddate': '2022-06-07T02:40:21+00:00', 'subject': 'Science of the Total Environment, 838 (2022) 156195. doi:10.1016/j.scitotenv.2022.156195', 'title': "Effectiveness of interventions for managing human-large carnivore conflicts worldwide: Scare them off, don't remove them", 'doi': '10.1016/j.scitotenv.2022.156195', 'robots': 'noindex', 'source': 'hwc\\Lorand et al. 2022.pdf', 'total_pages': 11, 'page': 5, 'page_label': '6'}

--- Document #2 ---
hypothesis was that index of pre- and post-ban use
was the same for both types of feeding sites.
We calculated the average annual number of
observed bears during pre- and post-ban periods
for each feeding site. We then used these averages
instead of raw data from individual counts. We
calculated an annual index of feeding site use by
pooling data from all feeding sites (average number
of bears counted at feeding sites in post-ban period
divided by average number of bears counted in pre-
ban period). Subsequently, we used bootstrapping
with 1,000 simulations to test for differences between
SUPPLEMENTAL FEEDING AND BEAR DEPREDATIONS N Kavcˇicˇ et al. 113
Ursus 24(2):111–119 (2013)

[Metadata]: {'producer': 'GPL Ghostscript 9.26', 'creator': '', 'creationdate': '2022-06-06T23:09:49-07:00', 'moddate': '2022-06-06T23:09:49-07:00', 'title': '', 'author': '', 'subject': '', 'keywords': '', 'source': 'hwc\\Kavcic et al. 2013.pdf', 'total_pages': 9, 'page': 2, 'page_label': '3'}

--- Document #3 ---
in baboon space use patterns and foraging activity in year
one and year two at the troop and at the individual level
(males). To test for differences in space use, we used
troop GPS data, comparing troop home range size
between the 2 years and their composition (with respect
to habitat use). This allowed us to determine whether
baboons used the urban and farm habitats less (where
conflict occurs) following the recommended management
changes. To test for differences in behavior, we described
the location of baboons foraging events and compared
the overall proportion of time invested in foraging, rest-
ing, traveling, and grooming activities, using Wilcoxon
(troop) and Wilcoxon signed rank tests (males). Finally,
we compared the number of public complaints between
the 2 years relevant to this troop in this area in relation
with the other troops in the Cape Peninsula.
3 | RESULTS
3.1 | Year one findings and
recommendations
Full details of year one findings are presented in
Fehlmann et al.

[Metadata]: {'producer': 'Acrobat Distiller 11.0 (Windows); modified using iText 4.2.0 by 1T3XT', 'creator': 'Arbortext Advanced Print Publisher 9.1.520/W Unicode', 'creationdate': '2023-06-16T15:56:20+05:30', 'keywords': '', 'moddate': '2025-05-27T12:15:01-07:00', 'subject': 'Conservat Sci and Prac 2023.5:e12948', 'wps-proclevel': '3', 'wps-journaldoi': '10.1111/(ISSN)2578-4854', 'title': 'Using behavioral studies to adapt management decisions and reduce negative interactions between humans and baboons in Cape Town, South Africa', 'wps-articledoi': '10.1111/csp2.12948', 'source': 'hwc\\Fehlmann et al. 2022.pdf', 'total_pages': 16, 'page': 6, 'page_label': '7'}

--- Document #4 ---
likelihood ratio test that compared the modelfit with and without a group-
ing factor (here, the case study ID).
In addition to the scoring consistency of evaluators, we investigated
whether average Effectiveness, CoE, HC, and HP scores changed over the
time period covered by our study cases (1975–2021) or differed according
to the intervention considered (lethal and non-lethal interventions, translo-
cations). We modeled the scores for the four metrics as functions of the in-
tervention type and time (year of publication of the case study) based on the
mixed-effects linear regression models with the evaluator ID and case study
ID used as random factors and the intervention type and publication year
respectively incorporated as qualitative and quantitativefixed-effects ex-
planatory variables. Models were implemented using thelmer function of
the lme4 Rp a c k a g e(Bates et al., 2015).
3. Results
3.1. Features of human-large carnivore conflicts around the world
From our literature search

[Metadata]: {'producer': 'PyPDF', 'creator': 'Elsevier', 'creationdate': '2022-06-07T02:40:21+00:00', 'author': 'Charlotte Lorand', 'crossmarkdomains[1]': 'elsevier.com', 'crossmarkdomains[2]': 'sciencedirect.com', 'crossmarkdomainexclusive': 'true', 'crossmarkmajorversiondate': '2010-04-23', 'elsevierwebpdfspecifications': '7.0', 'keywords': 'Human-carnivore coexistence; Lethal control; Non-lethal management; Conservation interventions; Effectiveness; Evidence-based', 'moddate': '2022-06-07T02:40:21+00:00', 'subject': 'Science of the Total Environment, 838 (2022) 156195. doi:10.1016/j.scitotenv.2022.156195', 'title': "Effectiveness of interventions for managing human-large carnivore conflicts worldwide: Scare them off, don't remove them", 'doi': '10.1016/j.scitotenv.2022.156195', 'robots': 'noindex', 'source': 'hwc\\Lorand et al. 2022.pdf', 'total_pages': 11, 'page': 4, 'page_label': '5'}

--- Document #5 ---
Human–wildlife conflicts in a fragmented Amazonian forest
landscape: determinants of large felid depredation on
livestock
F. Michalski1,2, R. L. P. Boulhosa2,3, A. Faria4 & C. A. Peres1
1 Centre for Ecology, Evolution and Conservation, School of Environmental Sciences, University of East Anglia, Norwich, UK
2 Instituto Pr´o-Carn´ıvoros, Atibaia, SP, Brazil
3 CENAP/IBAMA, Atibaia, SP, Brazil
4 Faculdade de Cieˆncias Biol´ogicas, Universidade Estadual do Mato Grosso, Alta Floresta, MT, Brazil
Keywords
human–wildlife conflicts; large felids;
predation; Brazilian Amazonia.
Correspondence
Fernanda Michalski, Centre for Ecology,
Evolution and Conservation, School of
Environmental Sciences, University of East
Anglia, Norwich NR4 7TJ, UK.
Fax: +44 1603 591327
Email: F.Michalski@uea.ac.uk
Received 20 September 2005; accepted
5 December 2005
doi:10.1111/j.1469-1795.2006.00025.x
Abstract
Most large carnivore species are in global decline. Conflicts with people, particu-
larly over depredation on sm

[Metadata]: {'producer': 'PDFlib PLOP 3.0 (.NET/Win32)/Acrobat Distiller 6.0.1 (Windows); modified using iText 4.2.0 by 1T3XT', 'creator': '3B2 Total Publishing System 8.07f/W', 'creationdate': '2006-03-25T19:46:31+05:30', 'moddate': '2025-05-27T11:47:43-07:00', 'subject': 'Animal Conservation 2006.9:179-188', 'wps-proclevel': '2', 'title': 'Human–wildlife conflicts in a fragmented Amazonian forest landscape: determinants of large felid depredation on livestock', 'wps-articledoi': '10.1111/j.1469-1795.2006.00025.x', 'source': 'hwc\\Michalski et al. 2006.pdf', 'total_pages': 10, 'page': 0, 'page_label': '1'}
Out[70]:
<function __main__.test_retriever_only(query: str, k: int = 5)>
In [72]:
test_query = "We live in a suburb and bears sometimes come into our town to eat from our fruit trees and trash. What are the best ways for us to prevent this as a community without removing our fruit trees? Can you check these pdfs to see which ones might help? https://minio.carlboettiger.info/public-data/hwc.zip"
test_retriever_only(test_query, k=5)
test_retriever_only
🔍 Query: We live in a suburb and bears sometimes come into our town to eat from our fruit trees and trash. What are the best ways for us to prevent this as a community without removing our fruit trees? Can you check these pdfs to see which ones might help? https://minio.carlboettiger.info/public-data/hwc.zip

📄 Top 5 Retrieved Documents:
------------------------------------------------------------

--- Document #1 ---
242 Conflict Intervention Priorities
helps foster more effective collaboration (Game et al.
2013; Lute et al. 2018). Third, both the survey results
and feedback were consistent with recent scholarship
(Redpath et al. 2017) that highlights participatory and
stakeholder-first conflict interventions as best practice
and advocates multipronged (Hazzah et al. 2014) and
adaptive management strategies (Bunnefeld et al. 2017).
Education and awareness programs were often cited in
feedback as being necessary additions to any interven-
tions. However, given the failures of many awareness-
based conservation programs (Schultz 2011), a further
exploration into why and where conservation decision
makers deem them most appropriate is important. Ap-
proaches that are specifically aimed at a particular au-
dience, such as social marketing (Salazar et al. 2018),
may be more effective than simple information provision
or—often-problematic—enforcement (Duffy et al. 2019).
However, how different interventio

[Metadata]: {'producer': 'Acrobat Distiller 10.1.10 (Windows); modified using iText 4.2.0 by 1T3XT', 'creator': 'LaTeX with hyperref package', 'creationdate': '2020-01-16T12:33:42+05:30', 'keywords': '', 'moddate': '2025-05-27T12:12:25-07:00', 'subject': 'Conservation Biology 2020.34:232-243', 'wps-proclevel': '3', 'wps-journaldoi': '10.1111/(ISSN)1523-1739', 'author': '', 'title': 'Predicting intervention priorities for wildlife conflicts', 'wps-articledoi': '10.1111/cobi.13372', 'source': 'hwc\\Baynham-Herd et al. 2019.pdf', 'total_pages': 12, 'page': 10, 'page_label': '242'}

--- Document #2 ---
8 
 
 
 
 
 
Figure A5. Silhouette width plot of the k-medoid partitions with k = 2 to 10 used to estimate the best 
number of clusters to describe livestock husbandry systems within the wolf range in northern Portugal 
(see the main text for details). 
  
2 4 6 8 10 
0.20 0.22 0.24 0.26 0.28 0.30 0.32 
Number of clusters 
Silhouette Width

[Metadata]: {'producer': 'PDF Architect 3', 'creator': 'PDF Architect 3', 'creationdate': '2017-01-25T14:50:41+00:00', 'author': 'V. Pimenta', 'moddate': '2017-01-25T14:52:31+00:00', 'source': 'hwc\\Pimenta et al. 2017.pdf', 'total_pages': 20, 'page': 17, 'page_label': '18'}

--- Document #3 ---
51] and other carnivores, such as coyotes (Canis latrans) [69, 70], African lions (Panthera leo)
[71], and wolves (Canis lupus) [72]. The relative effectiveness of these AC programs for
increasing wariness could relate to several aspects of program implementation. Because we
subjected bears to aversive stimuli as they engaged in problematic behaviour [48, 50], we
increased the likelihood that bears associated the conditioning stimulus (conflict behaviour)
with the unconditioned stimulus (pain/ stress) [38, 52]. This principle of immediacy in aver-
sive conditioning [54] is not achieved when aversive conditioning occurs upon release of a
captured bear, sometimes hours later and kilometres distant from the capture location where
conflict occurred [32]. Repetition of treatments allowed bears to generalize among experiences
instead of associating the painful stimulus with a single location or human individual, which
has been identified as important to AC programs targeting bold coyotes [69

[Metadata]: {'producer': 'PDFlib+PDI 9.3.1p2 (C++/Win64)', 'creator': 'PTC Arbortext Layout Developer 12.1.6180/W-x64', 'creationdate': '2023-12-25T16:46:13+05:30', 'title': 'Aversive conditioning increases short-term wariness but does not change habitat use in black bears associated with conflict', 'epsprocessor': 'PStill version 1.84.42', 'author': 'Lori Homstol, Sage Raymond, Claire Edwards, Anthony N. Hamilton, Colleen Cassady St. Clair', 'moddate': '2023-12-25T16:46:13+05:30', 'source': 'hwc\\Homstol et al. 2024.pdf', 'total_pages': 19, 'page': 12, 'page_label': '13'}

--- Document #4 ---
Fig 1. The effects of AC programs on three metrics of black bear wariness, Whistler BC, 2007–2008. A and B show
the average observed percent change in overt reaction distance and displace ment distance among bears in the AC
Group and the Control Group. Error bars represent standard error. C shows the predicted effect of the number of AC
events conduc ted during the previous 30 days on the likeliho od that a bear will flee from research ers prior to their
beginning AC treatm ent.
https://d oi.org/10.1371/j ournal.pon e.0295989.g0 01
PLOS ONE
Aversive condition ing of conflict black bears
PLOS ONE | https://doi.or g/10.137 1/journal.po ne.02959 89 January 2, 2024 8 / 19

[Metadata]: {'producer': 'PDFlib+PDI 9.3.1p2 (C++/Win64)', 'creator': 'PTC Arbortext Layout Developer 12.1.6180/W-x64', 'creationdate': '2023-12-25T16:46:13+05:30', 'title': 'Aversive conditioning increases short-term wariness but does not change habitat use in black bears associated with conflict', 'epsprocessor': 'PStill version 1.84.42', 'author': 'Lori Homstol, Sage Raymond, Claire Edwards, Anthony N. Hamilton, Colleen Cassady St. Clair', 'moddate': '2023-12-25T16:46:13+05:30', 'source': 'hwc\\Homstol et al. 2024.pdf', 'total_pages': 19, 'page': 7, 'page_label': '8'}

--- Document #5 ---
* Correspondence: B. F. Blackwell, U.S. Department of Agriculture, Animal and
Plant Health Inspection Service, Wildlife Services, National Wildlife Research
Center, Ohio Field Station, Sandusky, OH, 44870, U.S.A.
E-mail address: bradley.f.blackwell@aphis.usda.gov (B. F. Blackwell).
Contents lists available atScienceDirect
Animal Behaviour
journal homepage: www.elsevier.com/locate/anbehav
http://dx.doi.org/10.1016/j.anbehav.2016.07.013
0003-3472/Published by Elsevier Ltd on behalf of The Association for the Study of Animal Behaviour.
Animal Behaviour 120 (2016) 245e254
SPECIAL ISSUE: CONSERVATION BEHAVIOUR

[Metadata]: {'producer': 'Acrobat Distiller 8.1.0 (Windows)', 'creator': 'Elsevier', 'creationdate': '2016-09-26T20:02:29+05:30', 'crossmarkdomains[2]': 'elsevier.com', 'crossmarkmajorversiondate': '2010-04-23', 'subject': 'Animal Behaviour, 120 (2016) 245-254. doi:10.1016/j.anbehav.2016.07.013', 'author': 'Bradley F. Blackwell', 'elsevierwebpdfspecifications': '6.5', 'crossmarkdomainexclusive': 'true', 'robots': 'noindex', 'moddate': '2016-09-26T20:03:01+05:30', 'doi': '10.1016/j.anbehav.2016.07.013', 'crossmarkdomains[1]': 'sciencedirect.com', 'title': 'No single solution: application of behavioural principles in mitigating human-wildlife conflict', 'source': 'hwc\\Blackwell et al. 2016.pdf', 'total_pages': 10, 'page': 0, 'page_label': '245'}
Out[72]:
<function __main__.test_retriever_only(query: str, k: int = 5)>
In [74]:
test_query = "If we live in an area with a lot of wolves, what cattle husbandry strategies should I employ to prevent any sort of wildlife-human conflict? Can you check these pdfs to see which ones might help? https://minio.carlboettiger.info/public-data/hwc.zip"
test_retriever_only(test_query, k=5)
test_retriever_only
🔍 Query: If we live in an area with a lot of wolves, what cattle husbandry strategies should I employ to prevent any sort of wildlife-human conflict? Can you check these pdfs to see which ones might help? https://minio.carlboettiger.info/public-data/hwc.zip

📄 Top 5 Retrieved Documents:
------------------------------------------------------------

--- Document #1 ---
242 Conflict Intervention Priorities
helps foster more effective collaboration (Game et al.
2013; Lute et al. 2018). Third, both the survey results
and feedback were consistent with recent scholarship
(Redpath et al. 2017) that highlights participatory and
stakeholder-first conflict interventions as best practice
and advocates multipronged (Hazzah et al. 2014) and
adaptive management strategies (Bunnefeld et al. 2017).
Education and awareness programs were often cited in
feedback as being necessary additions to any interven-
tions. However, given the failures of many awareness-
based conservation programs (Schultz 2011), a further
exploration into why and where conservation decision
makers deem them most appropriate is important. Ap-
proaches that are specifically aimed at a particular au-
dience, such as social marketing (Salazar et al. 2018),
may be more effective than simple information provision
or—often-problematic—enforcement (Duffy et al. 2019).
However, how different interventio

[Metadata]: {'producer': 'Acrobat Distiller 10.1.10 (Windows); modified using iText 4.2.0 by 1T3XT', 'creator': 'LaTeX with hyperref package', 'creationdate': '2020-01-16T12:33:42+05:30', 'keywords': '', 'moddate': '2025-05-27T12:12:25-07:00', 'subject': 'Conservation Biology 2020.34:232-243', 'wps-proclevel': '3', 'wps-journaldoi': '10.1111/(ISSN)1523-1739', 'author': '', 'title': 'Predicting intervention priorities for wildlife conflicts', 'wps-articledoi': '10.1111/cobi.13372', 'source': 'hwc\\Baynham-Herd et al. 2019.pdf', 'total_pages': 12, 'page': 10, 'page_label': '242'}

--- Document #2 ---
Fig 1. The effects of AC programs on three metrics of black bear wariness, Whistler BC, 2007–2008. A and B show
the average observed percent change in overt reaction distance and displace ment distance among bears in the AC
Group and the Control Group. Error bars represent standard error. C shows the predicted effect of the number of AC
events conduc ted during the previous 30 days on the likeliho od that a bear will flee from research ers prior to their
beginning AC treatm ent.
https://d oi.org/10.1371/j ournal.pon e.0295989.g0 01
PLOS ONE
Aversive condition ing of conflict black bears
PLOS ONE | https://doi.or g/10.137 1/journal.po ne.02959 89 January 2, 2024 8 / 19

[Metadata]: {'producer': 'PDFlib+PDI 9.3.1p2 (C++/Win64)', 'creator': 'PTC Arbortext Layout Developer 12.1.6180/W-x64', 'creationdate': '2023-12-25T16:46:13+05:30', 'title': 'Aversive conditioning increases short-term wariness but does not change habitat use in black bears associated with conflict', 'epsprocessor': 'PStill version 1.84.42', 'author': 'Lori Homstol, Sage Raymond, Claire Edwards, Anthony N. Hamilton, Colleen Cassady St. Clair', 'moddate': '2023-12-25T16:46:13+05:30', 'source': 'hwc\\Homstol et al. 2024.pdf', 'total_pages': 19, 'page': 7, 'page_label': '8'}

--- Document #3 ---
51] and other carnivores, such as coyotes (Canis latrans) [69, 70], African lions (Panthera leo)
[71], and wolves (Canis lupus) [72]. The relative effectiveness of these AC programs for
increasing wariness could relate to several aspects of program implementation. Because we
subjected bears to aversive stimuli as they engaged in problematic behaviour [48, 50], we
increased the likelihood that bears associated the conditioning stimulus (conflict behaviour)
with the unconditioned stimulus (pain/ stress) [38, 52]. This principle of immediacy in aver-
sive conditioning [54] is not achieved when aversive conditioning occurs upon release of a
captured bear, sometimes hours later and kilometres distant from the capture location where
conflict occurred [32]. Repetition of treatments allowed bears to generalize among experiences
instead of associating the painful stimulus with a single location or human individual, which
has been identified as important to AC programs targeting bold coyotes [69

[Metadata]: {'producer': 'PDFlib+PDI 9.3.1p2 (C++/Win64)', 'creator': 'PTC Arbortext Layout Developer 12.1.6180/W-x64', 'creationdate': '2023-12-25T16:46:13+05:30', 'title': 'Aversive conditioning increases short-term wariness but does not change habitat use in black bears associated with conflict', 'epsprocessor': 'PStill version 1.84.42', 'author': 'Lori Homstol, Sage Raymond, Claire Edwards, Anthony N. Hamilton, Colleen Cassady St. Clair', 'moddate': '2023-12-25T16:46:13+05:30', 'source': 'hwc\\Homstol et al. 2024.pdf', 'total_pages': 19, 'page': 12, 'page_label': '13'}

--- Document #4 ---
3
Vol.:(0123456789)Scientific RepoRtS  |        (2020) 10:15341  | https://doi.org/10.1038/s41598-020-72343-6
www.nature.com/scientificreports/
numbers increase and more bears need more  food26,43,44. Hence, the effectiveness of anti-bear interventions can 
be lower than expected when hungry bears become persistent and more aggressive in damaging behaviour. As 
high density may lead to more bears involved in conflicts, it also could increase the demand for bear  removal45 
and affect the effectiveness of removal techniques such as translocation and lethal control.
In this paper, we compiled a global database of intervention effectiveness against bears and studied how it 
is related to bear species and densities, duration of intervention application, and intervention techniques. We 
attempted to find and describe the most effective and the least effective interventions against bears. Further, we 
tested several hypotheses: (1) lethal control and invasive management are less effective th

[Metadata]: {'producer': 'Adobe PDF Library 15.0; modified using iText® 5.3.5 ©2000-2012 1T3XT BVBA (SPRINGER SBM; licensed version)', 'creator': 'Springer', 'creationdate': '2020-09-14T15:09:33+05:30', 'crossmarkdomains[1]': 'springer.com', 'moddate': '2020-09-14T15:58:07+02:00', 'crossmarkmajorversiondate': '2010-04-23', 'subject': 'Scientific Reports, https://doi.org/10.1038/s41598-020-72343-6', 'author': 'Igor Khorozyan', 'title': 'Variation and conservation implications of the effectiveness of anti-bear interventions', 'crossmarkdomainexclusive': 'true', 'robots': 'noindex', 'doi': '10.1038/s41598-020-72343-6', 'crossmarkdomains[2]': 'springerlink.com', 'source': 'hwc\\Khorozyan and Waltert 2020.pdf', 'total_pages': 9, 'page': 2, 'page_label': '3'}

--- Document #5 ---
8 
 
 
 
 
 
Figure A5. Silhouette width plot of the k-medoid partitions with k = 2 to 10 used to estimate the best 
number of clusters to describe livestock husbandry systems within the wolf range in northern Portugal 
(see the main text for details). 
  
2 4 6 8 10 
0.20 0.22 0.24 0.26 0.28 0.30 0.32 
Number of clusters 
Silhouette Width

[Metadata]: {'producer': 'PDF Architect 3', 'creator': 'PDF Architect 3', 'creationdate': '2017-01-25T14:50:41+00:00', 'author': 'V. Pimenta', 'moddate': '2017-01-25T14:52:31+00:00', 'source': 'hwc\\Pimenta et al. 2017.pdf', 'total_pages': 20, 'page': 17, 'page_label': '18'}
Out[74]:
<function __main__.test_retriever_only(query: str, k: int = 5)>
In [ ]: