File size: 773 Bytes
9142902
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
def get_source(query_type: str):
    """
    Returns the accurate data source(s) based on query type.
    Ensures correct citation for all Q&A responses.
    """

    if query_type in ["compare_rainfall", "compare_rainfall_production"]:
        return "Ministry of Agriculture & Farmers Welfare and India Meteorological Department (IMD), data.gov.in"

    elif query_type in ["highest_production", "crop_trend"]:
        return "Ministry of Agriculture & Farmers Welfare, data.gov.in"

    elif query_type == "climate_correlation":
        return "India Meteorological Department (IMD), data.gov.in"

    # Default fallback
    return "Government Open Data Portal (data.gov.in)"


# 🧪 Test
if __name__ == "__main__":
    print(get_source("compare_rainfall_production"))