ScalaintermediateaiAI generated

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

  1. 01

    Load a FAQ knowledge base

    ~1.5h

    Read a set of question/answer pairs with associated keywords from a JSON or CSV file.

  2. 02

    Implement keyword scoring

    ~2h

    Score each FAQ entry against the user's input based on keyword overlap.

  3. 03

    Implement best-match selection

    ~1.5h

    Select the highest-scoring FAQ entry and apply a confidence threshold.

  4. 04

    Build the conversation loop

    ~1.5h

    Read user questions in a loop and print the matched answer.

  5. 05

    Add fallback responses

    ~1h

    Return a helpful fallback message when no FAQ entry scores above the threshold.

  6. 06

    Write unit tests

    ~1.5h

    Test 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.

~9h · 6 steps

Tech stack

sbtScalaTest