AgriScholarQA / README.md
sayande's picture
Upload README.md with huggingface_hub
e4b953c verified

A newer version of the Gradio SDK is available: 6.1.0

Upgrade
metadata
title: Agri-Critique Research Assistant
emoji: 🌾
colorFrom: green
colorTo: yellow
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
license: mit

Agri-Critique: Self-Correcting Agricultural QA System

Overview

Agri-Critique is an evidence-based question-answering system for agricultural research, powered by a fine-tuned Llama 3.1 8B model trained on 2,859 QA pairs with self-correction capabilities.

Key Features

  • 🎯 Evidence-Grounded Answers: All responses cite scientific papers
  • πŸ” Hallucination Detection: Trained to identify and correct errors
  • πŸ”Ž Critique Mode: Validate any answer for accuracy and errors
  • πŸ’¬ Conversational: Maintains context across multiple questions
  • πŸ“š Citation-Aware: Provides paper references for verification

Two Interaction Modes

  1. πŸ’¬ Q&A Mode: Ask questions and get evidence-based answers
  2. πŸ” Critique Mode: Submit a question + proposed answer to validate for:
    • Hallucinations (fake findings)
    • Unsupported claims
    • Temporal/causal errors
    • Missing citations

Model Details

  • Base Model: Llama 3.1 8B Instruct
  • Fine-tuning: LoRA (rank=32, alpha=64)
  • Training Data:
    • 1,814 standard QA pairs (63.4%)
    • 1,045 adversarial critique pairs (36.6%)
  • Training Objective: Mixed curriculum (answer + critique)

Dataset Composition

The model was trained on Agri-Critique, a novel dataset combining:

  1. Standard QA: Evidence-based agricultural questions
  2. Adversarial QA: Intentionally flawed answers with critiques
    • Hallucinations (fake findings)
    • Temporal mismatches
    • Causal reversals
    • Unsupported extrapolations

Research Contribution

This system demonstrates:

  • Self-Correction: Models can learn to detect their own errors
  • Citation Integrity: Reduces "fake citation" problem in RAG systems
  • Domain Adaptation: Specialized for agricultural/scientific QA

Usage

  1. Type your agricultural research question
  2. View the evidence-based answer with citations
  3. Expand "View Evidence Sources" to see paper excerpts
  4. Ask follow-up questions for multi-turn conversation

Example Questions

  • "What is the effect of nitrogen fertilizer on rice yield?"
  • "How does drought stress affect wheat production?"
  • "What are the benefits of crop rotation?"
  • "Explain the impact of climate change on agriculture."

Limitations

  • Domain-Specific: Optimized for agricultural/scientific questions
  • Evidence-Dependent: Answers limited to indexed papers
  • Not Hallucination-Free: While reduced, some errors may occur
  • English Only: Currently supports English language only

Citation

If you use this system in your research, please cite:

@article{agri-critique-2025,
  title={Agri-Critique: Training Self-Correcting Language Models for Agricultural Question Answering},
  author={Your Name},
  journal={arXiv preprint},
  year={2025}
}

Links

License

MIT License - See LICENSE file for details

Acknowledgments

Built with:

  • Llama 3.1 by Meta
  • Hugging Face Transformers
  • FAISS for vector search
  • Streamlit for UI