AIFAQSystem / knowledge_base.py
siddani93's picture
Create knowledge_base.py
b58a076 verified
Raw History Blame Contribute Delete
1.15 kB
# Predefined Industrial Q&A
INDUSTRIAL_KNOWLEDGE = {
"refund": {
"question": "How long does refund processing take?",
"answer": "Standard refund processing takes 5-7 business days. Expedited options available for enterprise accounts.",
"sources": ["finance_policy_v3.2", "customer_service_handbook"]
},
"invoice": {
"question": "Where can I find my invoice?",
"answer": "Access invoices through:\n1. Customer portal (portal.example.com)\n2. Automated email system\n3. API integration (contact support@example.com)",
"sources": ["billing_system_guide", "API_docs"]
},
"shipment": {
"question": "How to track shipments?",
"answer": "Track shipments using:\n- Tracking ID via website\n- Mobile app notifications\n- ERP system integration (Contact IT team)",
"sources": ["shipping_policy", "ERP_manual"]
}
}
def get_industrial_answer(query: str) -> dict:
"""Check against predefined industrial knowledge"""
query = query.lower()
for key in INDUSTRIAL_KNOWLEDGE:
if key in query:
return INDUSTRIAL_KNOWLEDGE[key]
return None