Best Practices - Marine Biology
Practical guidelines for developers building AI/RAG/agent applications in the marine biology domain, referencing taxonomic sources and data quality practices.
Always use the WoRMS AphiaID as a stable species identifier
Scientific Latin names are subject to nomenclatural revisions: a genus may be synonymised, a species moved to a different genus, or an epithet corrected. Using only the text name as a key in a RAG corpus or database produces duplicates and orphan records after each revision. Do: add an aphia_id field to every species record and use it as a stable foreign key. WoRMS exposes a REST API (https://www.marinespecies.org/rest/AphiaRecordsByName/{scientificname}) returning the full record including AphiaID. Do not: use common names as identifiers - the same species may have dozens of common names in English.
Always cite the taxonomic source and year for every scientific name
In educational content and data packs, every scientific name should appear in full form: Genus species Author, Year (e.g., Caretta caretta Linnaeus, 1758). This is not mere formalism: the name+author+year combination resolves ambiguities (homonyms: two species in different genera with the same epithet) and traces the nomenclatural source. Do: use the full WoRMS format in glossary entries and corpus.jsonl captions. Do not: use truncated Latin names without authors in contexts where taxonomic precision is required (eval.jsonl, corpus.jsonl).
Validate every Latin name on WoRMS, FishBase, or IUCN before including it in the corpus
Language models generate structurally plausible but unattested Latin names. Before finalising a RAG corpus for marine biology, verify every scientific name on WoRMS (marinespecies.org) or FishBase (fishbase.org). A name not found should not be included. Do: use the WoRMS AphiaIDByName API (fuzzy search) to validate names in batch. Do not: rely on the internal consistency of LLM-generated corpus as the sole validation.
Distinguish between accepted names, synonyms, and invalid names
WoRMS classifies each nomenclatural record as "accepted" (current valid name), "unaccepted" (synonym or obsolete name pointing to the accepted record), or "nomen dubium" (name of doubtful application). In your data and prompts, always use the accepted name. Do: call AphiaRecordsByName with marine_only=true and filter by status="accepted". Do not: use obsolete synonyms (e.g., while Posidonia oceanica has no accepted synonyms, other genera such as Cystoseira have undergone recent revisions toward Gongolaria and Treptacantha).
Segment the corpus by bathymetric depth zone in RAG queries
The marine biology domain has a fundamental vertical spatial dimension: a document describing a mesopelagic organism (200–1,000 m) is not relevant to a query about coastal benthic organisms (0–50 m). Add bathymetric zone metadata (coastal, mesopelagic, bathypelagic, abyssal) to every corpus.jsonl chunk and filter them in retrieval queries. Do: include a depth_zone field in each corpus entry's metadata. Do not: treat the ocean as a homogeneous environment in retrieval - producing mismatched responses (e.g., deep-sea organisms in reply to intertidal zone questions) degrades RAG system quality.
Manage bilingual (it+en) nomenclature with concordance tables
A bilingual knowledge pack must ensure that the Italian and English terms refer to exactly the same species or concept. Translation is not always straightforward (e.g., "riccio di mare" → Paracentrotus lividus in the Mediterranean, but in English "sea urchin" is generic; "orca" in Italian = "killer whale" in English = Orcinus orca). Do: maintain a table {it_term, en_term, aphia_id, latin_name} as the source of truth for term translation; include the AphiaID as a stable pivot. Do not: translate common names between languages without anchoring the translation to the scientific name.
Include disclaimers on operational uses in safety-adjacent contexts
Marine biology as an educational domain is low-stakes, but some content approaches safety-adjacent territory: species toxicity (pufferfish: Lagocephalus sceleratus; fire urchins Toxopneustes pileolus; Portuguese man-of-war Physalia physalis), risks from shellfish consumption during HABs, underwater safety norms. Do: include an explicit disclaimer "Information for educational purposes only - does not replace advice from a qualified expert" in sections dealing with toxicity or water safety. Do not: list toxicological properties as operational instructions or absolute claims.
Structure system prompts to respect the Linnaean taxonomic hierarchy
A RAG system or chatbot on marine biology is more precise if the system prompt explicitly includes the Linnaean taxonomic hierarchy (domain → kingdom → phylum → class → order → family → genus → species) and instructs the model to always report the relevant taxonomic level for the answer. Do: insert a "Taxonomy: always specify phylum and, when available, the WoRMS-accepted scientific name" section in the system prompt. Do not: leave the model free to use ambiguous common names without scientific anchoring.
Clearly differentiate between historical and current distribution data
Geographic distributions of species change over time due to ocean warming, biological invasions, and fishing pressure. A corpus mixing historical data (1980s) with current data produces inconsistent retrieval. Do: add an observation_year or at least decade field to each distribution record; filter in queries by time period. Do not: present data extracted from decades-old sources as "current distribution" without verification on GBIF or WoRMS.
Use GeoJSON format for the spatial distribution of species
Marine species distribution coordinates must be stored in standard georeferenced format (GeoJSON, WKT) with explicit WGS84 datum. Geospatial RAG systems can filter by geographic area only if data is in a standard format. Do: use GeoJSON FeatureCollection format with properties {species, aphia_id, date, depth_m, source_url}. Do not: store coordinates as unparsable text strings ("near Capo Gallo, Sicily").
Validate JSONL line by line before committing
The eval.jsonl and corpus.jsonl files are read line by line; a single malformed line (unescaped quotes, non-UTF-8 Unicode, missing field) interrupts parsing and invalidates the entire eval or retrieval session. Do: run python3 -c "import json; [json.loads(l) for l in open('eval.jsonl')]" as a pre-commit gate and ensure every line is valid. Do not: commit unvalidated JSONL - a corrupted file produces no visible errors until RAG system runtime.
Use the IUCN code as an enum value for conservation status
A species conservation status should be stored as an enum of standard IUCN codes (EX, EW, CR, EN, VU, NT, LC, DD, NE) rather than free text ("endangered", "vulnerable"). The codes are stable across languages and allow programmatic filtering. Do: add a field iucn_status: "VU" to every species record in corpus.jsonl. Do not: use prose descriptions for conservation status in structured data fields.