File size: 2,006 Bytes
f42f0c1
9d742c4
f42f0c1
 
 
 
 
 
 
 
 
9d742c4
 
f42f0c1
 
 
e223a00
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: Thoughtful Test
emoji: 💬
colorFrom: yellow
colorTo: purple
sdk: gradio
sdk_version: 5.42.0
app_file: app.py
pinned: false
hf_oauth: true
hf_oauth_scopes:
- inference-api
short_description: A quick Gradio agent demo
---

An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index).

# 🧠 Thoughtful AI – Customer Support Agent

A lightweight conversational demo built for the **Thoughtful AI coding exercise**.  
This app simulates a simple **customer service AI agent** that answers user questions about Thoughtful AI’s healthcare automation agents — using only **hardcoded responses** and a minimal similarity retriever.

---

## 🚀 Overview

The **Thoughtful AI Support Assistant** accepts user questions and returns the most relevant predefined answer.  
It uses a lightweight token-based similarity model (no external NLP dependencies) to match user input against five common FAQs.

### Example Questions
- What does the eligibility verification agent (EVA) do?  
- How does the claims processing agent (CAM) work?  
- What are the benefits of using Thoughtful AI’s agents?  
- Tell me about Thoughtful AI’s agents.

---

## 💡 Features

- Conversational chat interface built with **Gradio Blocks**.  
- **Hardcoded FAQ retrieval** (no external APIs or models required).  
- **Lightweight custom tokenizer** for fuzzy keyword matching.  
- Handles unknown inputs gracefully with fallback responses.  
- Includes confidence scoring and clear, user-friendly formatting.

---

## 🧩 Tech Stack

- **Language:** Python 3.9+  
- **Framework:** [Gradio](https://gradio.app)  
- **Deployment:** [Hugging Face Spaces](https://huggingface.co/spaces)  
- **Dependencies:** None beyond Gradio (no model downloads required)

---

## 🏗️ Local Development

To run locally:

```bash
pip install gradio
python app.py