← HomeSetup · 2026 EditionChat

Setup guide · 2026 Edition

Texas AgriLife Advisor

Geo-prescriptive RAG on your machine

4 simple stepsDocker-basedPro-level grounding
Download PDF

A location-grounded agriculture assistant that combines GROW groundwater wells, SSURGO soils, AgriLife extension PDFs, and crop suitability models — with cited, actionable answers.

Setup time: ~15–30 min (stack only; data ingest is separate)

Four steps

1

Start the database

PostGIS + pgvector for wells, soils, and AgriLife chunks

  • Copy the environment template and add your keys
  • Start PostgreSQL with the project schema
cp .env.example .env && docker compose up -d db

Pro tip: Wait until `docker compose ps` shows the db container as healthy.

2

Configure Bedrock & Voyage

Chat LLM on AWS Bedrock; embeddings on Voyage

  • Set `LLM_PROVIDER=bedrock` and `BEDROCK_MODEL_ID` (e.g. Claude Sonnet 4.6)
  • Set `AWS_BEARER_TOKEN_BEDROCK` or IAM credentials
  • Set `VOYAGE_API_KEY` for `retrieve_guidance` search
docker compose up -d api --build

Pro tip: Test in the AWS Bedrock playground first, then match the model ID in `.env`.

3

Load data & train models

GROW wells, SSURGO soils, AgriLife PDFs, XGBoost suitability

  • Ingest GROW + SSURGO (see README Phase 1)
  • Embed AgriLife PDFs with Voyage
  • Build training CSV and train four crop models
python3 scripts/ingest_grow.py && python3 scripts/embed_agrilife.py && python3 scripts/build_training_data.py && docker compose exec api python /scripts/train_simulation_models.py

Pro tip: Skip this step only for a UI/API smoke test — geo tools need the database loaded.

4

Open the advisor chat

Next.js UI + dev login (or TAMU CAS in production)

  • Start the full stack (db + api + frontend)
  • Sign in at localhost:3000 (dev bypass) or with NetID
  • Ask field-specific questions — e.g. cotton near Lubbock
docker compose up -d --build

Pro tip: Use suggested prompts on the chat page; expand “Data sources & provenance” on replies.

Quick reference

Stack
docker compose up -d --buildUI :3000 · API :8000
Dev login
DEV_AUTH_BYPASS=true in .envThen Continue on home
Health
curl http://localhost:8000/healthExpect {"status":"ok"}
Phase 4 eval
python3 scripts/build_phase4_fixtures.pySee docs/PHASE4.md