Build a Console Application that functions as an intelligent chatbot.
- Console Interface: The app must run in a continuous terminal loop.
- Knowledge Base (KB): Answer static questions using
knowledge_base.txt. - Database (DB): Answer inventory questions by querying
inventory.dbvia Function/Tool Calling. - Fallback: For any query not in the KB or DB, return: "I'm sorry, I cannot answer your query at the moment."
- Database: Use the provided
inventory.db(SQLite) located in the root directory. If the .db file is missing or corrupted, generate a fresh one using:
sqlite3 inventory.db < inventory_setup.sql- Pathing: Use a relative path (
./inventory.db) for the connection string. - Currency: All prices must be displayed in GBP (£).
- Language: Use UK English for all responses.
- Accuracy: Does the bot route to the correct data source?
- Function Calling: Does the LLM correctly extract parameters (item name/size) for SQL?
- Clean Code: Adherence to best practices within the 2-hour limit.