๐ŸŒฝ Maize Agriculture RAG Q&A System

This system uses Retrieval-Augmented Generation (RAG) to answer questions about maize agriculture. Upload your own document or use the default maize dataset.

Get your API key from Google AI Studio

Upload a text file or use the default maize dataset

๐Ÿ’ฌ Ask Questions

๐Ÿ’ก Sample Questions

๐Ÿ“Š Statistics will appear here after queries.

๐Ÿ“ Instructions:

  1. Enter your Google API Key (required)
  2. Upload a document (optional - uses default maize dataset if not provided)
  3. Initialize the RAG system by clicking "Initialize RAG System"
  4. Ask questions about the document content
  5. View statistics to monitor token usage and costs

๐Ÿ’ฐ Cost Information:

  • Gemini 1.5 Flash: Input: $0.075/1M tokens, Output: $0.30/1M tokens
  • Embedding Model: $0.025/1M tokens

Token usage is estimated and displayed for cost tracking.

๐Ÿ”— API Access:

This system also provides REST API endpoints:

  • API Docs: Add /docs to the URL for interactive API documentation
  • Health Check: GET /health
  • Initialize: POST /initialize
  • Query: POST /query