Skip to content

vaishnavipanskar28-sys/CodeAlpha_FAQ_Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

FAQ Chatbot

Project Description

FAQ Chatbot is a simple Python-based chatbot designed to answer frequently asked questions automatically. The chatbot compares the user's question with predefined FAQ questions and returns the most relevant response.

The system uses Python's built-in difflib library and the get_close_matches() function to identify similar questions and provide accurate answers.

Features

  • Answers frequently asked questions
  • Matches similar user queries
  • Simple and user-friendly interaction
  • Fast response generation
  • Easy to modify FAQ dataset
  • Exit option to stop chatbot

Technologies Used

  • Python

Library Used

  • difflib

Working Procedure

  1. Store FAQ questions and answers in a dictionary.
  2. Accept user input.
  3. Convert user input to lowercase.
  4. Compare user query with stored questions using get_close_matches().
  5. Find the closest matching question.
  6. Return the corresponding answer.
  7. If no match is found, display an error message.

Project Structure

FAQ-Chatbot/
│
├── chatbot.py
├── README.md

Functions Used

chatbot_response()

This function:

  • Takes user input
  • Converts input to lowercase
  • Finds similar questions
  • Returns the appropriate answer

get_close_matches()

Used to compare user queries with predefined questions and find the closest match.

Advantages

  • Simple implementation
  • Fast execution
  • No external libraries required
  • Easy to understand
  • Suitable for beginner projects

Future Improvements

  • Add GUI interface
  • Add NLP libraries like NLTK or SpaCy
  • Add voice support
  • Store FAQs in database
  • Add machine learning-based responses

Sample Questions

  • What is your return policy?
  • How can I track my order?
  • Do you provide cash on delivery?
  • How do I contact customer support?
  • What payment methods are accepted?
  • How long does delivery take?

Screenshots

FAQ Chatbot Screenshot

Conclusion

This FAQ Chatbot provides an easy way to automate responses for common questions. It reduces manual work and demonstrates basic chatbot concepts using Python.

Author

Vaishnavi

About

This is a FAQ Chatbot built using Python and NLP. It takes user questions and returns the most relevant answer from a predefined FAQ dataset using TF-IDF vectorization and cosine similarity. The project demonstrates basic NLP and chatbot functionality.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages