Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

In this module we treat a large body of legal documents as data. We ask whether the US government names climate change as a reason when it lists a species as endangered, and we compare our answer with a study that read the same kind of documents by hand.

Learning goalsΒΆ

BackgroundΒΆ

In 2019, Delach et al. published Agency plans are inadequate to conserve US endangered species under climate change in Nature Climate Change. They read the official documents for all 459 animals listed as endangered under the Endangered Species Act (ESA). Climate change was named as a threat for 64% of those species, but management actions to address it were planned for only 18%. Their per-species codings are openly published.

Under section 4 of the ESA, a species is listed because of one or more of five factors, including the destruction of its habitat, overuse, disease or predation, inadequate regulation, and β€œother natural or manmade factors.” The decision must rest β€œsolely on the basis of the best scientific and commercial data available.” Each final listing decision is published as a rule in the Federal Register. The rule lays out the evidence, responds to public and peer-review comments, and states the agency’s conclusion. These rules can be challenged in court, and they are written with that in mind.

We read thirty years of these rules with code. The hard part of the module is deciding what counts as an answer: a rule that mentions climate change once in passing is different from one in which the agency finds that climate change threatens the species.

DataΒΆ

ToolsΒΆ

The module introduces five ways to work with text. Part of the assignment is to decide which one fits each step and to say why.

The language model is deepseek-v4-flash and the embedding model is qwen3-embedding, both served by the National Research Platform. This is the same API you configured in Kilo Code during Module 1.

Further readingΒΆ

Decision modelsΒΆ

A decision model takes a text and a set of typed questions and returns a probability for each possible answer in a single step. It is much faster than a language model, and its probabilities can be checked against labels we trust.

Structured extractionΒΆ

Any standard language model can be asked to return data in a fixed format instead of prose. We describe the record we want as a schema, and the model returns one record per document that matches it. The schema makes the output easy to check and to load into a table.

TemplateΒΆ

text template

ReferencesΒΆ
  1. Delach, A., Caldas, A., Edson, K. M., Krehbiel, R., Murray, S., Theoharides, K. A., Vorhees, L. J., Malcom, J. W., Salvo, M. N., & Miller, J. R. B. (2019). Agency plans are inadequate to conserve US endangered species under climate change. Nature Climate Change, 9(12), 999–1004. 10.1038/s41558-019-0620-8
  2. Jennifer R. B. Miller, Jacob Malcom, & Center for Conservation Innovation. (2019). Agency plans are inadequate to conserve US endangered species under climate change. 10.17605/OSF.IO/R9UCA