Rule-Based FAQ Chatbot
Build a terminal chatbot that matches user questions against a knowledge base of FAQ patterns and returns the best-matching answer using keyword scoring. Learners practice pattern matching, string similarity algorithms, and designing a simple matching pipeline.
- Estimate
- ~9h
- Steps
- 6
- Completed by
- 0
- Proposed by
- codeseed.app
sbt · ScalaTest
Project roadmap
- 01
Load a FAQ knowledge base
~1.5hRead a set of question/answer pairs with associated keywords from a JSON or CSV file.
- 02
Implement keyword scoring
~2hScore each FAQ entry against the user's input based on keyword overlap.
- 03
Implement best-match selection
~1.5hSelect the highest-scoring FAQ entry and apply a confidence threshold.
- 04
Build the conversation loop
~1.5hRead user questions in a loop and print the matched answer.
- 05
Add fallback responses
~1hReturn a helpful fallback message when no FAQ entry scores above the threshold.
- 06
Write unit tests
~1.5hTest the scoring and matching logic against sample questions.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack