Bilingual (EN/HU) AI-powered interactive learning platform for precision agriculture
AI-Generated Content Disclosure
Both the textbook content (20 chapters, ~278K words) and the majority of this application's source code were generated with the assistance of large language models (LLMs). The text has been through two full automated lector passes (~5,000 corrections) but has not been independently peer-reviewed. This material should be treated as an educational technology demonstration, not as an authoritative precision agriculture reference.
An interactive learning platform built around a 20-chapter bilingual university textbook on precision agriculture. The book covers everything from soil sensing and satellite imagery to AI/ML, livestock monitoring, and the economics of PA adoption — with a dedicated chapter on Hungarian precision agriculture.
Students can read the book in English or Hungarian, ask questions about specific passages, take self-assessment quizzes, study with spaced-repetition flashcards, and explore chapter dependencies — all with a bilingual interface.
| Metric | Count |
|---|---|
| Chapters | 20 (EN) + 20 (HU) |
| Appendices | 5 (preface, exercises, glossary, data sources, software guide) |
| Total words | ~278,000 (152K EN + 126K HU) |
| Estimated pages | 275 (EN PDF) + 288 (HU PDF) |
| Quiz questions | 1,002 EN + 1,009 HU (4 types each) |
| RAG chunks | 648 EN + 627 HU |
| Concept graph | 81 concepts with prerequisites |
| Lector corrections | ~5,000 (2 passes via LLM) |
| Source books | 8 reference books + 13 lecture note folders |
| Feature | Description |
|---|---|
| Book Reader | 20-chapter textbook with markdown rendering, LaTeX equations, tables |
| EN/HU Toggle | Full bilingual support — chapters, quizzes, UI strings, sidebar |
| AI Chat | RAG-powered Q&A grounded in textbook content (both languages) |
| Text Selection | Highlight any passage and ask questions about it |
| Quiz System | 2,000+ pre-generated questions, local grading, PDF export |
| Flashcards | SM-2 spaced repetition with 4-level quality rating |
| Concept Map | Interactive SVG dependency graph across all 20 chapters |
| Full-Text Search | Semantic search across all chapters with highlighted excerpts |
| Cross-References | Clickable chapter links in text |
| 3-Level TOC | Sidebar with Part / Chapter / Section navigation |
| Dark Mode | Light/dark theme toggle |
| Mobile Layout | Responsive design for phone/tablet |
| Green Theme | Agriculture-themed color scheme |
- Why Precision Agriculture?
- The Agricultural Landscape
- The Data Revolution in Farming
- Satellite and Aerial Remote Sensing
- Hyperspectral and Multispectral Imaging
- Proximal and In-Field Sensors
- Positioning and Navigation
- Understanding Soil Variability
- Water Management and Irrigation
- Nutrient Management
- Variable Rate Technology
- Crop Health Monitoring and Protection
- Yield Monitoring and Mapping
- Data Pipelines and Management
- Artificial Intelligence and Machine Learning in Agriculture
- Decision Support Systems
- Economics of Precision Agriculture
- Precision Livestock and Beyond
- The Future of Precision Agriculture
- Precision Agriculture in Hungary — Case Studies and Perspectives
- A: Practical Exercises (20 exercises, one per chapter)
- B: Glossary (150+ terms with Hungarian translations)
- C: Data Sources (satellite, weather, soil, crop — incl. Hungarian portals)
- D: Software Guide (GIS, remote sensing, crop modeling, farm management tools)
| Layer | Technology |
|---|---|
| Frontend | React 19, Vite, TailwindCSS, KaTeX |
| Backend | FastAPI, Python 3.11+ |
| Vector DB | ChromaDB (local, persistent) |
| Embeddings | sentence-transformers (all-MiniLM-L6-v2, local) |
| LLM | Configurable (for chat/summaries) |
| Lector | LLM-based automated review |
| Pandoc + XeLaTeX |
git clone https://github.com/Nagyhoho1234/precagri.git
cd precagricd precagri-tutor
pip install -r requirements.txt
# Set up environment
echo "GEMINI_API_KEY=your-key-here" > .env
# Start backend
python -m uvicorn backend.main:app --host 0.0.0.0 --port 8000cd precagri-tutor/frontend
npm install
npm run dev
# Opens at http://localhost:5173python scripts/ingest_chapters.py --lang en
python scripts/ingest_chapters.py --lang hupython scripts/build_book.py
# Or directly:
pandoc full_book_clean.md -o full_book_en.pdf --pdf-engine=xelatex \
-V geometry:a4paper,margin=2.5cm -V fontsize=11pt --tocThe textbook was synthesized from 8 reference books:
| Book | Authors | Year | Focus |
|---|---|---|---|
| Precision Agriculture Basics | Shannon, Clay, Kitchen | 2018 | Foundational PA textbook |
| PA for Sustainability | Oliver, Bishop | 2013 | Geostatistics, economics, soil |
| AI & Data Sciences for PA | Fiaz, Nadeem et al. | 2026 | AI/ML applications |
| Hyperspectral Imaging for PA | Zhao, Wang | 2023-24 | Spectral methods, UAV |
| Precision Agriculture (ECPA) | Stafford, Werner | 2003 | 118 European research papers |
| PA Technology for Crop Farming | Zhang | 2016 | Sensors, VRT, machinery |
| Advances in PLF | Berckmans et al. | 2022 | Precision livestock farming |
| Precíziós MG helyzetkép | Vértesy (MATE) | 2023 | Hungarian PA economics |
Plus 13 folders of Hungarian university lecture materials (water management, soil mapping, remote sensing, irrigation).
precagri/
├── chapters_en/ # 20 English chapters + preface + 4 appendices
├── chapters_hu/ # 20 Hungarian chapters + preface + 4 appendices
├── precagri-tutor/ # Full-stack web application
│ ├── backend/ # FastAPI + RAG + agents + student tracking
│ ├── frontend/ # React 19 + Vite + TailwindCSS
│ └── data/ # ChromaDB, question banks, chunks
├── books/ # Source material (PDFs + converted markdown)
├── scripts/ # Build, translate, ingest, lector, question gen
├── lector_fixes/ # Lector results and claims verification
├── full_book_en.pdf # Printable English PDF (275 pages)
├── full_book_hu.pdf # Printable Hungarian PDF (288 pages)
├── CLAUDE.md # Project rules for AI assistants
└── README.md # This file
- Two full lector passes via LLM (~5,000 corrections across EN + HU)
- Fact-checking: 76 quotes, dates, and claims verified against web sources
- 3 factual errors corrected (Landsat OLI bands, NDVI attribution date, AFBF date)
- 1 misattribution flagged (Socrates quote — uncertain provenance noted in text)
- Hungarian translation: domain-specific terminology glossary (312 terms), multi-pass review
- Known limitation: AI-generated content may contain errors not caught by automated review
Built with the assistance of large language models. Source materials include works by Shannon et al., Oliver & Bishop, Stafford & Werner, Zhang, Fiaz et al., Berckmans et al., and Vértesy (MATE Press). Hungarian lecture materials from the University of Debrecen and MATE Gödöllő.