๐ฝ 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:
- Enter your Google API Key (required)
- Upload a document (optional - uses default maize dataset if not provided)
- Initialize the RAG system by clicking "Initialize RAG System"
- Ask questions about the document content
- 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
/docsto the URL for interactive API documentation - Health Check:
GET /health - Initialize:
POST /initialize - Query:
POST /query