The Architecture of Agency: What My Dog and an AI Taught Me About Being Ourselves
Description and use
EthoPipe transforms unstructured dog‑behavior observations into machine‑readable records using Gemini 2.5 Pro for extraction, Pydantic v2 for validation, and Darwin Core mapping, enhancing reproducibility and research interoperability.
Problem
Field animal‑behavior researchers lack a standardized, machine‑readable way to transform narrative observations into structured data, leading to inter‑rater variability and limited reusability.
Outcome
EthoPipe provides a reproducible, auditable pipeline that converts narrative dog‑behavior logs into structured, Darwin Core‑compatible records, enabling quantitative analysis and peer review.
Workflow
- 1. Capture raw narrative text from field logs.
- 2. Send text to FastAPI ingestion gateway with PII anonymization.
- 3. Use Gemini 2.5 Pro (temperature 0.0) to produce structured JSON following a Pydantic schema.
- 4. Validate payload with Pydantic v2 strict configuration and canine heart‑rate bounds.
- 5. Map validated data to Darwin Core terms and export to Firestore, Parquet, or an analytical warehouse.
- 6. Run automated tests via GitHub Actions and Docker containers.
Evidence
EthoPipe uses the language model as a structured extraction component rather than a creative writer. A temperature setting of 0.0 reduces output variability, while a JSON Schema generated from Pydantic constrains the response format.
Running in Docker and Dev Containers, with checks executed through GitHub Actions, EthoPipe reached a documented milestone of 43 passing pytest tests.
The project also received the DOI 10.5281/zenodo.21211371, is associated with my ORCID record (0009-0003-0048-8982).
- Record date: 2026-10-07T19:40:52.920Z