Conversational AI encompasses a wide range of architectures — from simple pattern-matching scripts to fine-tuned large language models. The four projects in this section represent each major paradigm: a deterministic rule-based FAQ bot, an empathetic response agent for mental health support, an LLM fine-tuned on a 28,000-row legal Q&A dataset, and a voice-to-text pipeline that adds speech recognition at the front of the conversation loop. Studying them together reveals the genuine trade-offs between interpretability, latency, data requirements, and conversational quality.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dronabopche/100-ML-AI-Project/llms.txt
Use this file to discover all available pages before exploring further.
Projects at a glance
| Project | Approach | Input Type | Use Case |
|---|---|---|---|
| LegalEase ChatBot (60) | GPT-2 fine-tuned on legal Q&A | Text prompt | Indian legal queries |
| Rule-Based FAQ System (61) | Pattern matching + keyword lookup | Text | Structured FAQ domains |
| Mental Health Support Bot (62) | Retrieval + empathy-aware responses | Text | Emotional support conversation |
| Voice-to-Text Chatbot (65) | ASR (Whisper/SpeechRecognition) + NLP | Audio / microphone | Hands-free chatbot interaction |
LegalEase ChatBot (Project 60)
LegalEase ChatBot (Project 60)
Goal: Fine-tune GPT-2 on a 28,689-row dataset of Indian legal question-answer pairs and serve the model through a FastAPI endpoint for interactive legal queries.Dataset: The dataset is converted to a HuggingFace Inference:FastAPI service (Run the API locally:Then query it:
legal_qa.csv with question and answer columns covering Indian civil law, writ petitions, PIL, and constitutional schedules.Training pipeline (from LegalEase_CharBot.ipynb):Each row is formatted as a prompt-completion pair:Dataset, tokenized to max_length=384, and trained for one epoch using the Trainer API:src/app.py):The trained model is wrapped in a FastAPI service. Incoming prompts go through preprocess_prompt() (cleaning + whitespace normalization) before reaching the model:Rule-Based FAQ System (Project 61)
Rule-Based FAQ System (Project 61)
Goal: Answer frequently asked questions by matching the user’s input against a predefined set of patterns and returning the associated canned response.How it works:The bot maintains a list of Strengths: Zero training data, zero latency, fully auditable. Every response is traceable to a specific rule.Limitations: Brittle to spelling variations, synonyms not in the pattern set, and multi-turn context. Combining rule-based matching with a small intent classifier (e.g., a TF-IDF + logistic regression pipeline) handles paraphrases far better.
(pattern, response) pairs. Each user message is normalized (lowercased, punctuation stripped) and matched against the patterns in order. The first match wins and its associated response is returned. For more flexible matching, patterns can be regular expressions rather than exact strings.Mental Health Support Bot (Project 62)
Mental Health Support Bot (Project 62)
Goal: Provide empathetic, non-judgmental conversational responses to users expressing emotional distress, loneliness, anxiety, or depression.How it works:This project takes a retrieval-based approach: a corpus of empathetic dialogue pairs (e.g., the Empathy-aware design considerations:
EmpatheticDialogues dataset from Facebook Research) is indexed by embedding. At inference time, the user’s message is embedded and the most semantically similar previous dialogue turn is retrieved. The bot replies with the response associated with that retrieved turn.- Always include a safety fallback: if the user mentions self-harm or crisis keywords, redirect to a professional helpline regardless of retrieval results.
- Avoid generating unsolicited advice. The retrieved responses in
EmpatheticDialoguesare designed to validate feelings rather than prescribe solutions. - Log nothing that could re-identify the user; mental health conversations require strict privacy handling.
Voice-to-Text Chatbot (Project 65)
Voice-to-Text Chatbot (Project 65)
Goal: Accept spoken audio as input, transcribe it to text using automatic speech recognition (ASR), pass the transcript to an NLP chatbot, and optionally speak the response back to the user with text-to-speech (TTS).How it works:The pipeline chains three components:Install dependencies:Whisper model sizes:
- ASR — OpenAI Whisper (or the
SpeechRecognitionlibrary for simpler use cases) converts recorded audio to a text transcript. - NLP chatbot — any of the other chatbot projects in this section can serve as the text-processing core.
- TTS (optional) —
pyttsx3orgTTSreads the bot’s response aloud.
tiny and base run on CPU; small and medium benefit from a GPU. For low-latency applications, tiny transcribes a 5-second clip in under a second on a modern laptop CPU.Latency budget: ASR (0.5–2 s) + chatbot inference (0.1–5 s depending on model) + TTS (0.2 s) = 1–7 s end-to-end. For production voice assistants, streaming ASR (e.g., Whisper with faster-whisper) and streamed LLM generation reduce perceived latency significantly.