To evaluate the candidate's ability to:
- Understand the basics of conversational AI and chatbot development.
- Use pre-trained models to build a functional chatbot.
- Demonstrate creativity and problem-solving skills in creating a simple, user-friendly chatbot interface.
Create a Conversational AI Chatbot that can answer basic questions or have simple conversations with a user. The chatbot should have the following features:
-
Input
- Accept text input from the user (e.g., via a command-line interface, a simple web app, or a chat interface).
-
Processing
- Use a pre-trained conversational AI model (e.g., OpenAI’s GPT-3.5, Hugging Face models, or similar).
- Ensure the chatbot responds coherently to user queries.
-
Output
- Display the chatbot’s response in real-time.
-
The chatbot should be able to:
- Greet the user (e.g., “Hello! How can I help you today?”).
- Respond to simple general knowledge questions (e.g., “What’s the capital of France?”).
- Handle casual conversation (e.g., “How’s the weather today?” or “Tell me a joke.”)
-
The chatbot should handle basic edge cases:
- If it doesn’t understand a query, respond with something like:
“I’m sorry, I didn’t understand that. Could you please rephrase?”
- If it doesn’t understand a query, respond with something like:
-
Predefined Intent Recognition
- Recognize specific intents like:
- Weather inquiries: “What’s the weather like today?”
- Time-related queries: “What time is it?”
- Respond accordingly.
- Recognize specific intents like:
-
Web Interface
- Create a simple web-based interface using a framework like Flask, Streamlit, or React.js.
-
Personalization
- Allow the user to provide their name and personalize responses (e.g., “Hi John, how can I assist you?”).
-
Memory
- Enable the chatbot to remember the context of the conversation within a session (e.g., “Can you tell me more about that?”).
-
Programming Language
- Use Python for development.
-
Pre-Trained Model
- Use a conversational AI model such as:
- OpenAI's API (GPT-3.5 or similar).
- Hugging Face’s transformers library with models like DialoGPT or T5.
- Or any basic chatbot library like ChatterBot.
- Use a conversational AI model such as:
-
Libraries/Tools
- Suggested libraries: transformers, flask (for a web interface), nltk, or any other you’re comfortable with.
-
Error Handling
- Handle empty or invalid input gracefully.
-
Documentation
- Provide clear instructions in a README.md file on how to set up and run the chatbot.
-
Source Code
- A GitHub repository containing:
- The Python code for the chatbot.
- Any configuration or requirement files (e.g., requirements.txt).
- A GitHub repository containing:
-
README.md
- Clear setup instructions.
- Examples of queries the chatbot can handle.
-
Sample Output
- Provide a few examples of conversations with the chatbot.
-
Optional Deliverables
- A link to the web-based interface (if implemented).
-
Understanding of Conversational AI
- Does the chatbot handle user queries logically and conversationally?
-
Functionality
- Does the chatbot work as described in the task requirements?
-
Code Quality
- Is the code clean, modular, and readable?
- Are best practices followed for error handling and maintainability?
-
Creativity
- Have any bonus features been implemented, and are they functional?
-
Documentation
- Is the README.md file clear and helpful?
-
Start Simple
- Focus on getting the chatbot to respond to a few basic queries before adding extra features.
-
Use Online Resources
- Look for tutorials or documentation for tools like Hugging Face or OpenAI’s API.
-
Test as You Go
- Regularly test the chatbot to ensure it behaves as expected.
-
Add Comments
- Write clear comments in your code to explain key sections.