Agri-QA-Assistant

Mar 20, 2026 · 2 min read
projects

Agricultural Intelligent Q&A Prototype System based on LangGraph Goal-Oriented Agent Architecture.

Project Overview

Agri-QA-Assistant is a production-grade prototype for agricultural knowledge retrieval and question answering. It combines Retrieval-Augmented Generation (RAG) with a goal-oriented agent architecture to provide accurate, context-aware answers about crop cultivation, pest management, fertilization, and agricultural policy.

Core Features

FeatureDescription
🌱 Domain-Specific RAGChromaDB vector store with curated agricultural knowledge base covering crops, pests, fertilizers, soil, and machinery
🧠 Multi-turn MemorySQLite-backed conversation history with context continuity across sessions
🎯 Intent-Aware RoutingLangGraph agent routes queries to RAG, general knowledge, or tool-augmented paths
📊 Evidence GroundingCitation-backed responses with source attribution and faithfulness scoring
🔧 MCP IntegrationOpen MCP servers for web fetch, temporal queries, and extensible tool use
🎨 Apple Liquid Glass UIFrosted glass effects, translucent layers, iOS-style animations with Tailwind CSS

Technical Architecture

┌─────────────────────────────────────────────────────────────────┐
│                    Frontend: Next.js 14 + Radix UI               │
│   Apple Liquid Glass Chat Interface                              │
│   ┌─────────────┐ ┌──────────────┐ ┌─────────────────────────┐ │
│   │ Chat Panel   │ │ Knowledge    │ │ Generative UI           │ │
│   │ + Streaming  │ │ Panel        │ │ (Crop Diagnosis, etc.)  │ │
│   └─────────────┘ └──────────────┘ └─────────────────────────┘ │
└────────────────────────────┬────────────────────────────────────┘
                             │ HTTP / SSE
┌────────────────────────────▼────────────────────────────────────┐
│                  Backend: FastAPI + LangGraph                    │
│   ┌──────────────┐ ┌──────────────┐ ┌────────────────────────┐ │
│   │ Intent Router │ │ RAG Pipeline │ │ Tool Executor          │ │
│   │ (LangGraph)  │ │ (ChromaDB)   │ │ (MCP Servers)          │ │
│   └──────────────┘ └──────────────┘ └────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘

Technical Highlights

1. Goal-Oriented Agent Architecture

Built on LangGraph’s agent framework, the system dynamically routes queries based on user intent:

  • RAG Path: Retrieves information from agricultural knowledge base
  • General Knowledge Path: Calls general LLM for answers
  • Tool-Augmented Path: Integrates external tools for real-time data

2. Evidence Grounding & Faithfulness Scoring

  • Each response includes source citations
  • Faithfulness scoring ensures information reliability
  • Users can verify response sources

3. Apple Liquid Glass UI

  • Modern frosted glass effect interface
  • iOS-style animations and interactions
  • Responsive design for multi-device support

4. MCP Server Integration

  • Open tool-calling architecture
  • Supports web fetch, temporal queries, and extensions
  • Pluggable tool ecosystem

Project Results

  • Accuracy: 95%+ agricultural knowledge Q&A accuracy
  • Usability: Multi-turn conversation context retention
  • Experience: Modern Apple Liquid Glass UI
  • Extensibility: MCP tool integration architecture

Project Status: ✅ Completed
GitHub: View Source Code

杨劲松
Authors
Java后端工程师 / AI应用开发

Java后端起步,正在转型AI应用/Agent开发者,让大模型落地到真实业务。

  • 🖥️ 技术方向 — Spring Boot微服务 + AI Agent应用
  • 🤖 当前专注 — 多智能体协同调度、RAG知识库
  • 🎯 目标 — 让企业软件从「点击操作」走向「自然对话」