File size: 89,911 Bytes
d4e7af6
7a62a73
 
d4e7af6
 
 
 
 
 
 
 
 
 
 
7a62a73
d4e7af6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7a62a73
 
d4e7af6
 
 
 
 
7a62a73
d4e7af6
7a62a73
 
 
 
 
 
d4e7af6
 
 
 
 
 
7a62a73
d4e7af6
 
 
 
 
7a62a73
 
 
 
d4e7af6
 
 
7a62a73
 
d4e7af6
 
b4eaa89
d4e7af6
7a62a73
 
 
 
 
 
 
 
 
 
 
 
 
350c84a
7a62a73
350c84a
79c30bc
350c84a
7a62a73
 
 
d4e7af6
7a62a73
 
 
 
d4e7af6
 
 
 
 
7a62a73
d4e7af6
7a62a73
d4e7af6
7a62a73
d4e7af6
 
 
 
7a62a73
d4e7af6
 
 
7a62a73
 
d4e7af6
 
 
 
 
 
 
 
7a62a73
d4e7af6
 
 
7a62a73
 
d4e7af6
7a62a73
d4e7af6
 
7a62a73
 
 
 
 
 
9ab4a2a
7a62a73
 
d4e7af6
 
7a62a73
 
 
d4e7af6
7a62a73
d4e7af6
 
13b7d08
d4e7af6
 
 
 
 
 
13b7d08
7a62a73
d4e7af6
7a62a73
0922e58
13b7d08
 
 
 
 
 
0922e58
13b7d08
 
7a62a73
13b7d08
 
7a62a73
13b7d08
 
0922e58
13b7d08
 
 
 
 
 
 
0922e58
7a62a73
0922e58
7a62a73
d4e7af6
 
13b7d08
7a62a73
d4e7af6
7a62a73
0922e58
7a62a73
13b7d08
 
 
0922e58
13b7d08
0922e58
13b7d08
 
0922e58
13b7d08
 
0922e58
13b7d08
0922e58
13b7d08
 
9ab4a2a
7a62a73
9ab4a2a
7a62a73
9ab4a2a
7a62a73
13b7d08
7a62a73
9ab4a2a
7a62a73
9ab4a2a
7a62a73
13b7d08
 
 
9ab4a2a
13b7d08
9ab4a2a
13b7d08
 
9ab4a2a
13b7d08
 
9ab4a2a
13b7d08
 
 
 
 
 
 
9ab4a2a
7a62a73
9ab4a2a
7a62a73
0922e58
 
13b7d08
7a62a73
0922e58
7a62a73
0922e58
7a62a73
13b7d08
 
 
 
 
0922e58
13b7d08
 
0922e58
13b7d08
 
0922e58
13b7d08
 
 
 
0922e58
13b7d08
 
0922e58
7a62a73
0922e58
7a62a73
0922e58
 
13b7d08
7a62a73
0922e58
7a62a73
0922e58
7a62a73
 
0922e58
13b7d08
 
 
 
 
 
 
 
 
7a62a73
13b7d08
 
7a62a73
13b7d08
7a62a73
13b7d08
 
7a62a73
 
 
 
 
 
13b7d08
7a62a73
 
 
 
 
13b7d08
 
 
 
 
7a62a73
13b7d08
 
7a62a73
13b7d08
 
7a62a73
13b7d08
 
0922e58
13b7d08
 
 
 
 
 
 
0922e58
7a62a73
0922e58
7a62a73
0922e58
 
13b7d08
7a62a73
0922e58
7a62a73
0922e58
7a62a73
13b7d08
 
 
 
 
0922e58
13b7d08
 
0922e58
13b7d08
 
7a62a73
13b7d08
 
 
 
7a62a73
13b7d08
 
7a62a73
 
 
 
 
 
13b7d08
7a62a73
 
 
 
 
13b7d08
 
 
 
 
 
 
 
7a62a73
13b7d08
 
7a62a73
13b7d08
 
7a62a73
13b7d08
 
0922e58
13b7d08
 
 
 
0922e58
7a62a73
0922e58
7a62a73
0922e58
 
13b7d08
0a8fe1a
 
 
 
 
13b7d08
0a8fe1a
 
 
13b7d08
0a8fe1a
13b7d08
 
0a8fe1a
13b7d08
 
0a8fe1a
13b7d08
 
0a8fe1a
13b7d08
 
0a8fe1a
13b7d08
 
0a8fe1a
13b7d08
 
0a8fe1a
 
 
13b7d08
 
0a8fe1a
 
 
13b7d08
 
 
 
 
 
 
b4eaa89
13b7d08
 
b4eaa89
 
0a8fe1a
13b7d08
0a8fe1a
13b7d08
 
0a8fe1a
13b7d08
 
0a8fe1a
13b7d08
 
0a8fe1a
13b7d08
 
6675439
13b7d08
 
 
 
 
0a8fe1a
 
 
13b7d08
 
0a8fe1a
 
 
 
 
 
13b7d08
7a62a73
0922e58
7a62a73
0922e58
7a62a73
13b7d08
 
 
 
 
0922e58
13b7d08
 
0922e58
13b7d08
 
0922e58
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
0922e58
7a62a73
0922e58
7a62a73
0922e58
 
13b7d08
7a62a73
0922e58
7a62a73
0922e58
7a62a73
13b7d08
 
 
 
 
0922e58
13b7d08
 
0922e58
13b7d08
 
0922e58
13b7d08
 
0922e58
13b7d08
 
0922e58
13b7d08
 
 
 
0922e58
7a62a73
0922e58
7a62a73
0922e58
 
13b7d08
7a62a73
 
 
0922e58
13b7d08
 
0922e58
13b7d08
7a62a73
13b7d08
7a62a73
13b7d08
 
7a62a73
13b7d08
 
7a62a73
13b7d08
7a62a73
13b7d08
 
0922e58
7a62a73
0922e58
7a62a73
0922e58
 
13b7d08
7a62a73
 
 
0922e58
7a62a73
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7a62a73
 
 
 
0811e45
13b7d08
 
f2bb09f
0811e45
b4eaa89
6675439
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0811e45
826d35a
13b7d08
cb4a2b7
0811e45
13b7d08
0811e45
826d35a
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b4eaa89
 
13b7d08
b4eaa89
0811e45
 
 
 
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0811e45
 
13b7d08
0811e45
 
 
 
 
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d30c199
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113508d
 
 
79c30bc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0811e45
 
13b7d08
0811e45
 
 
 
 
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0811e45
 
13b7d08
0811e45
 
 
 
 
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6675439
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
0811e45
 
13b7d08
0811e45
 
 
 
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6675439
13b7d08
 
6675439
13b7d08
 
 
 
 
 
0811e45
13b7d08
0811e45
 
13b7d08
0811e45
 
 
 
 
13b7d08
0811e45
13b7d08
0811e45
13b7d08
0811e45
13b7d08
 
0811e45
13b7d08
 
0811e45
13b7d08
 
0811e45
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
0811e45
 
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
0811e45
13b7d08
 
0811e45
13b7d08
 
0811e45
13b7d08
 
0811e45
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
0811e45
 
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
 
0811e45
13b7d08
0811e45
13b7d08
0811e45
13b7d08
 
0811e45
13b7d08
 
0811e45
13b7d08
 
6675439
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6675439
b4eaa89
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0811e45
 
13b7d08
 
0811e45
13b7d08
6675439
13b7d08
 
6675439
13b7d08
6675439
13b7d08
0811e45
13b7d08
 
 
6675439
13b7d08
 
 
 
 
 
6675439
13b7d08
6675439
13b7d08
 
 
 
 
6675439
13b7d08
 
 
 
 
 
 
 
0811e45
 
13b7d08
 
0811e45
13b7d08
6675439
13b7d08
 
6675439
13b7d08
6675439
13b7d08
0811e45
13b7d08
 
6675439
13b7d08
 
0811e45
13b7d08
 
6675439
13b7d08
 
6675439
13b7d08
 
8a182a5
13b7d08
 
8a182a5
13b7d08
8a182a5
13b7d08
 
 
 
 
 
8a182a5
 
13b7d08
 
8a182a5
13b7d08
8a182a5
13b7d08
 
8a182a5
13b7d08
8a182a5
13b7d08
8a182a5
13b7d08
 
8a182a5
13b7d08
 
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a182a5
 
13b7d08
 
8a182a5
13b7d08
8a182a5
13b7d08
 
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a182a5
13b7d08
 
 
 
 
 
8a182a5
 
13b7d08
 
8a182a5
13b7d08
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a182a5
 
13b7d08
 
8a182a5
13b7d08
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a182a5
 
13b7d08
 
8a182a5
13b7d08
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b4eaa89
8a182a5
13b7d08
 
b4eaa89
13b7d08
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b4eaa89
8a182a5
13b7d08
 
b4eaa89
13b7d08
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8a182a5
 
13b7d08
 
b4eaa89
13b7d08
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b4eaa89
8a182a5
13b7d08
 
b4eaa89
13b7d08
8a182a5
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6675439
 
13b7d08
 
b4eaa89
13b7d08
b4eaa89
13b7d08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d4e7af6
 
 
 
 
 
0922e58
d4e7af6
7a62a73
 
 
 
 
 
 
 
13b7d08
7a62a73
0811e45
 
 
 
7a62a73
 
 
 
 
d4e7af6
7a62a73
 
 
 
 
0811e45
 
 
 
7a62a73
 
 
 
 
 
d4e7af6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0922e58
d4e7af6
7a62a73
 
 
0811e45
7a62a73
0811e45
 
7a62a73
 
 
d4e7af6
 
7a62a73
d4e7af6
7a62a73
d4e7af6
 
 
 
 
 
 
7a62a73
d4e7af6
 
 
7a62a73
 
d4e7af6
 
 
 
 
 
 
7a62a73
d4e7af6
 
 
 
 
 
 
7a62a73
d4e7af6
 
 
 
7a62a73
 
 
 
 
 
 
 
 
 
0811e45
 
 
 
7a62a73
 
 
 
 
d4e7af6
 
7a62a73
 
 
 
 
 
 
 
 
 
 
0811e45
 
 
 
 
d4e7af6
7a62a73
 
 
 
d4e7af6
 
7a62a73
 
 
 
 
 
 
 
d4e7af6
7a62a73
d4e7af6
 
 
 
 
 
 
7a62a73
 
 
 
 
 
 
 
 
0a8fe1a
d4e7af6
7a62a73
 
 
0811e45
7a62a73
0811e45
 
7a62a73
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
"""
IT-Business Analysis Assistant - Professional Version
Comprehensive Local Templates for BA Coverage - NO API REQUIRED
"""

import os
import json
import logging
from pathlib import Path
from typing import Tuple, List, Dict, Any, Optional

import gradio as gr
from dotenv import load_dotenv

# Load environment variables (optional)
load_dotenv()

# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)

# ---------------------------
# Configuration
# ---------------------------
class Config:
    """Application configuration"""
    
    BASE_DIR = Path(__file__).resolve().parent
    DATA_DIR = BASE_DIR / "data"
    KEYWORDS_FILE = DATA_DIR / "ba_keywords.json"
    
    APP_NAME = "Professional IT Business Analysis Assistant"
    APP_VERSION = "4.0.0"
    APP_DESCRIPTION = "Comprehensive local guide for BA concepts"

# ---------------------------
# Load BA Keywords
# ---------------------------
def load_ba_keywords() -> Dict[str, List[str]]:
    """Load BA keywords from JSON file or return defaults"""
    try:
        if Config.KEYWORDS_FILE.exists():
            with open(Config.KEYWORDS_FILE, 'r', encoding='utf-8') as f:
                data = json.load(f)
                return data.get('categories', get_default_ba_keywords())
        else:
            logger.info("No keywords file found, using defaults")
            return get_default_ba_keywords()
    except Exception as e:
        logger.error(f"Error loading keywords: {e}")
        return get_default_ba_keywords()

def get_default_ba_keywords() -> Dict[str, List[str]]:
    """Default BA keywords organized by category"""
    return {
        "Core Concepts": [
            "business analysis", "requirements gathering", "stakeholder analysis",
            "business case", "scope definition", "gap analysis", "requirements",
            "stakeholder", "business need", "value proposition", "traceability",
            "swot analysis", "pestle analysis", "moscow", "prioritization",
            "kpi", "roi", "sla", "mvp", "uat", "etl", "crud", "raci",
            "change request", "risk assessment", "impact analysis", "root cause analysis",
            "cost benefit analysis", "feasibility study", "process mapping"
        ],
        "Methodologies": [
            "agile", "scrum", "kanban", "waterfall", "babok", "bpmn", "uml",
            "user stories", "acceptance criteria", "sprint", "product backlog",
            "lean", "six sigma", "dmaic", "kaizen"
        ],
        "Requirements": [
            "functional requirements", "non-functional requirements", "srs", "brd","brs","frd","frs",
            "user stories", "acceptance criteria", "requirements traceability",
            "traceability matrix", "rtm", "use cases", "epics", "features",
            "quality attributes", "business rules"
        ],
        "Analysis Techniques": [
            "swot analysis", "pestle analysis", "gap analysis", "root cause analysis",
            "cost benefit analysis", "feasibility study", "impact analysis",
            "risk assessment", "five whys", "fishbone diagram", "ishikawa",
            "benchmarking", "pareto analysis"
        ],
        "Modeling & Diagrams": [
            "process mapping", "data flow diagram", "dfd", "decision table",
            "decision tree", "story mapping", "domain model", "context diagram",
            "sequence diagram", "class diagram", "value stream mapping", "sipoc",
            "dependency mapping"
        ],
        "Designs": [
            "ui design","wireframe", "mockup", "prototype","Wireflows","figma"
        ],            
        "Data & Metrics": [
            "kpi", "roi", "sla", "etl", "crud", "data dictionary",
            "metadata management", "performance baseline", "scalability"
        ],
        "Project & Delivery": [
            "mvp", "uat", "change request", "proof of concept", "poc",
            "pilot program", "technical debt", "legacy modernization",
            "system integration", "interoperability"
        ]
    }

# Load keywords
BA_KEYWORDS = load_ba_keywords()
logger.info(f"📊 Loaded {sum(len(k) for k in BA_KEYWORDS.values())} keywords from {len(BA_KEYWORDS)} categories")

# Create searchable keyword list
ALL_KEYWORDS = []
for keywords in BA_KEYWORDS.values():
    ALL_KEYWORDS.extend([k.lower() for k in keywords])
ALL_KEYWORDS = list(set(ALL_KEYWORDS))

# ---------------------------
# Keyword Detection
# ---------------------------
def is_ba_related(question: str) -> Tuple[bool, List[str], List[str]]:
    """
    Check if question contains BA-related keywords
    Returns: (is_related, matched_keywords, matched_categories)
    """
    if not question or not question.strip():
        return False, [], []
    
    question_lower = question.lower()
    matched_keywords = []
    matched_categories = set()
    
    # Check for keyword matches
    for keyword in ALL_KEYWORDS:
        if keyword in question_lower:
            matched_keywords.append(keyword)
            # Find category
            for category, keys in BA_KEYWORDS.items():
                if any(k.lower() == keyword for k in keys):
                    matched_categories.add(category)
                    break
    
    # Also check common terms
    common_terms = [
        "stakeholder", "requirement", "agile", "scrum", "waterfall",
        "swot", "pestle", "kpi", "roi", "sla", "mvp", "uat", "etl",
        "crud", "raci", "uml", "bpmn", "use case", "user story"
    ]
    
    for term in common_terms:
        if term in question_lower:
            matched_keywords.append(term)
    
    # Deduplicate and limit
    matched_keywords = list(set(matched_keywords))[:5]
    matched_categories = list(matched_categories)
    
    return len(matched_keywords) > 0, matched_keywords, matched_categories

# ---------------------------
# Local Response Templates - SIMPLE 3-POINT FORMAT
# ---------------------------
def get_local_response(question: str, keywords: List[str], categories: List[str]) -> str:
    """Get response from local templates"""
    
    question_lower = question.lower()
    
    # === KPI ===
    if any(term in question_lower for term in ["kpi", "key performance indicator"]):
        return """
## 📊 KPI (Key Performance Indicator)

### What is KPI?
A **Key Performance Indicator (KPI)** is a measurable value that tracks how effectively an organization is achieving key business objectives.

---

### 📊 Types of KPIs

**1. Strategic KPIs**
Measure high-level organizational performance. Example: Market share, ROI, revenue growth.

**2. Operational KPIs**
Measure day-to-day process efficiency. Example: Cycle time, defect rate, customer wait time.

**3. Leading KPIs**
Predict future performance. Example: Sales pipeline value, customer inquiries, website traffic.

**4. Lagging KPIs**
Measure past performance outcomes. Example: Revenue, customer churn, profit margin.

---

### 👤 BA Role in KPI Definition
Collaborate with stakeholders to define measurable KPIs, document calculation methods, and design dashboards for tracking.

---

*Source: Professional Knowledge Base*
"""
    
    # === ROI ===
    elif any(term in question_lower for term in ["roi", "return on investment"]):
        return """
## 💰 ROI (Return on Investment)

### What is ROI?
**Return on Investment (ROI)** measures the profitability of an investment by comparing net gains to costs.

---

### 📊 ROI Formula

**1. Basic Formula**
ROI = (Net Profit / Cost of Investment) × 100%. Example: $50,000 profit on $100,000 investment = 50% ROI.

**2. Considerations**
Include time period, tangible benefits (cost savings), and intangible benefits (customer satisfaction).

---

### 👤 BA Role in ROI Analysis
Gather cost data, quantify benefits, document assumptions, and present ROI findings in business cases.

---

*Source: Professional Knowledge Base*
"""
    
    # === SLA ===
    elif any(term in question_lower for term in ["sla", "service level agreement"]):
        return """
## 📝 SLA (Service Level Agreement)

### What is an SLA?
A **Service Level Agreement (SLA)** is a contract defining the expected service level between a provider and client.

---

### 📊 Common SLA Metrics

**1. Uptime/Availability**
System operational time percentage. Typical target: 99.5% - 99.9%.

**2. Response Time**
Time to acknowledge an issue. Typical target: < 1 hour.

**3. Resolution Time**
Time to fix an issue. Typical target: < 24 hours.

---

### 👤 BA Role in SLAs
Elicit service requirements, document measurable metrics, and ensure SLAs are realistic and achievable.

---

*Source: Professional Knowledge Base*
"""

    # === MVP ===
    elif any(term in question_lower for term in ["mvp", "minimum viable product"]):
        return """
## 🚀 MVP (Minimum Viable Product)

### What is an MVP?
A **Minimum Viable Product (MVP)** is a product version with just enough features to satisfy early customers and gather feedback.

---

### 📊 MVP Examples

**1. Dropbox MVP**
Demo video explaining the concept before building the actual product.

**2. Airbnb MVP**
Rented air mattresses in founders' apartment to test the concept.

**3. Zappos MVP**
Took photos of shoes from stores, bought them after receiving orders.

---

### 👤 BA Role in MVP
Identify core features, prioritize using MoSCoW, and gather user feedback for future iterations.

---

*Source: Professional Knowledge Base*
"""
    
    # === UAT ===
    elif any(term in question_lower for term in ["uat", "user acceptance testing"]):
        return """
## ✅ UAT (User Acceptance Testing)

### What is UAT?
**User Acceptance Testing (UAT)** is the final testing phase where end users validate that the system meets their business needs.

---

### 📊 UAT Objectives

**1. Business Validation**
Confirm the solution meets business requirements. Example: Users verify order processing works correctly.

**2. Real-world Scenarios**
Test with actual business processes and data. Example: Process a real customer order from start to finish.

**3. Go/No-Go Decision**
Determine if the system is ready for production. Example: Stakeholders sign off based on UAT results.

---

### 👤 BA Role in UAT
Develop test scenarios from requirements, support users during testing, and facilitate the sign-off process.

---

*Source: Professional Knowledge Base*
"""

    # === RACI Matrix ===
    elif any(term in question_lower for term in ["raci", "raci matrix"]):
        return """
## 📊 RACI Matrix

### What is RACI?
**RACI** is a responsibility matrix clarifying roles: Responsible, Accountable, Consulted, Informed.

---

### 📊 RACI Definitions

**1. Responsible (R)**
The person who does the work. Example: Developer writing code.

**2. Accountable (A)**
The person who approves the work. Example: Project Manager signs off.

**3. Consulted (C)**
Those who provide input before decisions. Example: SMEs review requirements.

**4. Informed (I)**
Those kept updated on progress. Example: Stakeholders receive status reports.

---

### 👤 BA Role in RACI
Facilitate RACI workshops to clarify stakeholder roles and identify responsibility gaps.

---

*Source: Professional Knowledge Base*
"""

    # === ETL ===
    elif any(term in question_lower for term in ["etl", "extract transform load"]):
        return """
## 🔄 ETL (Extract, Transform, Load)

### What is ETL?
**ETL** is a data integration process that extracts data from sources, transforms it, and loads it into a target system.

---

### 📊 ETL Phases

**1. Extract**
Read data from source systems. Example: Connect to databases, APIs, or files.

**2. Transform**
Clean, format, and enrich data. Example: Remove duplicates, validate formats, aggregate totals.

**3. Load**
Write transformed data to target. Example: Insert records into a data warehouse.

---

### 👤 BA Role in ETL
Define data requirements, document source-to-target mappings, and specify transformation rules.

---

*Source: Professional Knowledge Base*
"""

    # === CRUD ===
    elif any(term in question_lower for term in ["crud"]):
        return """
## 📋 CRUD Operations

### What is CRUD?
**CRUD** stands for Create, Read, Update, Delete - the four basic operations for managing data.

---

### 📊 CRUD Operations

**1. Create**
Add new records. HTTP: POST, SQL: INSERT. Example: Adding a new customer.

**2. Read**
Retrieve records. HTTP: GET, SQL: SELECT. Example: Viewing customer details.

**3. Update**
Modify existing records. HTTP: PUT/PATCH, SQL: UPDATE. Example: Changing customer address.

**4. Delete**
Remove records. HTTP: DELETE, SQL: DELETE. Example: Removing an inactive customer.

---

### 👤 BA Role in CRUD
Define CRUD permissions for each user role and document business rules for each operation.

---

*Source: Professional Knowledge Base*
"""

    # === Gap Analysis ===
    elif any(term in question_lower for term in ["gap analysis", "gap assessment", "current state vs future state", "as-is to-be", "as is to be"]):
        return """
## 🔄 Gap Analysis

### What is Gap Analysis?
**Gap Analysis** compares where you are now (AS-IS) with where you want to be (TO-BE) to identify what's missing and create a plan to bridge the差距.

---

### 📊 Types of Gap Analysis

**1. Performance Gap**
Difference between actual and desired performance. Example: Current sales $1M vs Target $1.5M.

**2. Capability Gap**
Missing skills, tools, or competencies. Example: No data team vs Need advanced analytics.

**3. Process Gap**
Inefficiencies in workflows. Example: Manual data entry (3 hours) vs Automated (10 minutes).

**4. Technology Gap**
Outdated vs modern systems. Example: Legacy CRM from 2010 vs Cloud-based CRM.

**5. Resource Gap**
Insufficient vs required resources. Example: 5 developers vs Need 10 developers.

**6. Market Gap**
Unmet customer needs. Example: 40% customers want mobile app vs No app available.

---

### 👤 BA Role in Gap Analysis
Facilitate workshops to identify gaps, document current vs future state, and create action plans.

---

*Source: Professional Knowledge Base*
"""

    # === Requirements Gathering ===
    elif any(term in question_lower for term in ["requirement gathering", "requirements gathering", "gather requirements"]):
        return """
## 📝 Requirements Gathering

### What is Requirements Gathering?
**Requirements Gathering** is the process of identifying, collecting, and documenting stakeholder needs for a proposed system or project.

---

### 📊 Requirements Gathering Techniques

**1. Interviews**
One-on-one discussions for in-depth understanding. Best for sensitive topics and detailed insights.

**2. Workshops**
Collaborative sessions with multiple stakeholders. Best for consensus building and resolving conflicts.

**3. Surveys/Questionnaires**
Distributed forms to large groups. Best for collecting quantitative data from many users.

**4. Observation**
Watching users perform their work. Best for understanding actual vs. described processes.

**5. Document Analysis**
Reviewing existing documentation. Best for understanding current state and regulations.

**6. Prototyping**
Creating mockups for feedback. Best for validating UI/UX requirements.

---

### 👤 BA Role in Requirements Gathering
Plan and facilitate elicitation sessions, document requirements clearly, and validate with stakeholders.

---

*Source: Professional Knowledge Base*
"""
    
    # === Change Request ===
    elif any(term in question_lower for term in ["change request"]):
        return """
## 📝 Change Request

### What is a Change Request?
A **Change Request** is a formal proposal to modify a project's scope, deliverables, timeline, or resources after approval.

---

### 📊 Change Request Process

**1. Submit Request**
User/stakeholder identifies the need for change and completes a change request form.

**2. Impact Analysis**
BA analyzes impact on schedule, cost, resources, and risks.

**3. Review by CCB**
Change Control Board reviews the request and impact analysis.

**4. Decision**
Approve, reject, or defer the change request.

**5. Implementation**
Update plans, communicate changes, and implement approved changes.

---

### 👤 BA Role in Change Requests
Facilitate impact analysis, update requirements documentation, and maintain traceability.

---

*Source: Professional Knowledge Base*
"""

    # === Risk Assessment ===
    elif any(term in question_lower for term in ["risk assessment"]):
        return """
## ⚠️ Risk Assessment

### What is Risk Assessment?
**Risk Assessment** is the systematic process of identifying, analyzing, and evaluating potential risks that could impact a project.

---

### 📊 Risk Assessment Process

**1. Identify Risks**
List potential threats and opportunities. Example: Key resource leaving, technology failure.

**2. Analyze Risks**
Assess likelihood and impact. Use a matrix: High/Medium/Low for each.

**3. Evaluate Risks**
Prioritize for response based on risk score. Focus on high-impact, high-likelihood risks first.

**4. Plan Responses**
Develop mitigation strategies. Example: Cross-train staff, add redundancy.

---

### 👤 BA Role in Risk Assessment
Identify risks during requirements gathering, document assumptions, and participate in risk workshops.

---

*Source: Professional Knowledge Base*
"""

    # === Root Cause Analysis ===
    elif any(term in question_lower for term in ["root cause analysis", "rca", "five whys"]):
        return """
## 🔎 Root Cause Analysis (RCA)

### What is RCA?
**Root Cause Analysis** is a problem-solving method to identify the fundamental cause of problems, not just symptoms.

---

### 📊 RCA Techniques

**1. Five Whys**
Ask "Why?" repeatedly until root cause found. Example: System crashed → DB failed → Connection pool exhausted → Missing close() in code → Lack of training.

**2. Fishbone Diagram**
Categorize potential causes into groups: People, Process, Technology, Data, Environment.

---

### 👤 BA Role in RCA
Facilitate RCA sessions, document findings, and recommend process improvements to prevent recurrence.

---

*Source: Professional Knowledge Base*
"""

    # === Agile Methodologies ===
    elif any(term in question_lower for term in ["agile", "scrum", "kanban"]):
        return """
## 🔄 Agile Methodologies

### What is Agile?
**Agile** is an iterative approach to software development that delivers value incrementally through collaboration and flexibility.

---

### 📊 Agile Frameworks

**1. Scrum**
Sprint-based framework with defined roles (Product Owner, Scrum Master, Team) and events (Sprint Planning, Daily Scrum, Review, Retrospective).

**2. Kanban**
Visual workflow management with WIP limits to optimize flow and reduce cycle time.

**3. Agile vs Waterfall**
Agile: Emergent requirements, incremental delivery, welcomes change. Waterfall: Detailed upfront requirements, single release, change discouraged.

---

### 👤 BA Role in Agile
Collaborate with Product Owner on backlog, write user stories, define acceptance criteria, and participate in ceremonies.

---

*Source: Professional Knowledge Base*
"""

    # === BRS/BRD ===
    elif any(term in question_lower for term in ["brd", "brs", "business requirement document", "business requirements document", "business requirement specification", "business requirements specification"]):
        return """
## 📄 Business Requirements Specification (BRS/BRD)

### What is BRS/BRD?
A **Business Requirements Document** describes what the business needs, focusing on business objectives and stakeholder requirements.

---

### 📊 BRS vs Other Documents

**1. BRS/BRD**
Focus: Business needs, objectives. Audience: Stakeholders, Sponsors.

**2. FRD/FRS**
Focus: Functional specifications. Audience: Developers, Testers.

**3. SRS**
Focus: System requirements. Audience: Technical team, Architects.

---

### 📋 Typical BRS Structure

**1. Introduction**: Purpose, scope, definitions
**2. Business Objectives**: Goals and success metrics
**3. Scope**: In-scope and out-of-scope items
**4. Business Requirements**: Functional and non-functional needs
**5. Acceptance Criteria**: How success will be measured

---

### 👤 BA Role in BRS
Elicit and document business requirements, facilitate stakeholder reviews, and maintain version control.

---

*Source: Professional Knowledge Base*
"""
    
    # === FRD/FRS ===
    elif any(term in question_lower for term in ["frd", "frs", "functional requirement document", "functional requirements document", "functional requirement specification", "functional requirements specification"]):
        return """
## 📄 Functional Requirements Document (FRD/FRS)

### What is FRD/FRS?
A **Functional Requirements Document** details all functional requirements, specifying what the system must do.

---

### 📊 FRD/FRS Structure

**1. Introduction**
Purpose, scope, definitions, and references.

**2. Functional Requirements**
Detailed feature specifications with IDs (FR-001, FR-002).

**3. Business Rules**
Logic, calculations, and constraints.

**4. Acceptance Criteria**
Conditions that must be met for each requirement.

---

### 📋 Sample Requirement Format
**FR-101: User Login**
- Description: System shall authenticate users
- Input: Username and password
- Output: Access token or error
- Acceptance Criteria: Valid credentials → success, Invalid → error

---

### 👤 BA Role in FRD
Write clear, testable requirements, include requirement IDs, and prioritize using MoSCoW.

---

*Source: Professional Knowledge Base*
"""

    # === SRS ===
    elif any(term in question_lower for term in ["srs", "system requirement specification", "software requirement specification"]):
        return """
## 📄 System Requirements Specification (SRS)

### What is SRS?
A **System Requirements Specification** describes the capabilities, functionality, and constraints of a software system.

---

### 📊 SRS Structure (IEEE 830)

**1. Introduction**
Purpose, scope, definitions, references.

**2. Overall Description**
Product perspective, user characteristics, constraints.

**3. Specific Requirements**
Functional and non-functional requirements.

**4. External Interfaces**
User, hardware, software, communication interfaces.

**5. Quality Attributes**
Reliability, availability, security, performance.

---

### ✅ Good SRS Characteristics
- **Correct**: Accurately represents stakeholder needs
- **Unambiguous**: Single interpretation
- **Complete**: All requirements included
- **Verifiable**: Can be tested
- **Traceable**: Can be tracked through development

---

### 👤 BA Role in SRS
Document requirements in standard format, validate with SMEs, and ensure traceability to test cases.

---

*Source: Professional Knowledge Base*
"""

    # === Wireframes ===
    elif any(term in question_lower for term in ["wireframe", "mockup", "prototype"]):
        return """
## 🖼️ Wireframes, Mockups & Prototypes

### What are Wireframes?
**Wireframes** are low-fidelity layouts showing structure and functionality of a screen. **Mockups** add visual design. **Prototypes** add interactivity.

---
### 📊 Fidelity Levels

**1. Wireframe (Low Fidelity)**
Structure, layout, functionality. Tools: Balsamiq, Pen & Paper.

**2. Mockup (Medium-High Fidelity)**
Visual design, colors, typography. Tools: Figma, Sketch, Adobe XD.

**3. Prototype (High Fidelity)**
Interactive, clickable flows. Tools: Figma, InVision, Axure.

---
### 👤 BA Role in Wireframing
Collaborate with UX designers, validate requirements visually, and ensure business rules are represented.

---
*Source: Professional Knowledge Base*
"""
    # === Wire flow ===
    elif any(term in question_lower for term in ["wireflows"]):
        return """
## 🎨 Wireflow Principles

### What are Wireflows?
Wireflows combine wireframes and flowcharts to show both the interface and the user journey through screens.

### When to Use Wireflows
- Complex multi-screen processes
- User journeys with decision points
- Mobile app navigation
- Form completion flows
- Error and exception paths

### Benefits for BAs
- Visualize complete user experience
- Validate screen-to-screen transitions
- Document conditional logic
- Support use case development
- Guide prototype creation

### Tools
- Figma with connectors
- Sketch + Flinto
- Axure RP
- Balsamiq Wireflows

---

*Source: Professional Knowledge Base*
"""
    # === Figma ===
    elif any(term in question_lower for term in ["figma", "figma tool"]):
        return """
## 🎯 Figma Tool

### What is Figma Tool?
**Figma** is a cloud-based interface design tool that enables real-time collaboration for creating wireframes, mockups, prototypes, and design systems. Unlike traditional design tools, Figma runs entirely in the browser, allowing multiple team members to work on the same file simultaneously.
---

### 📊 Figma Tool Process

**1. Design Phase**
Create wireframes and high-fidelity mockups using vector tools, components, and styles. Designers build UI elements, define color schemes, typography, and layout structures.

**2. Prototyping Phase**
Link screens together with interactive connections, add transitions, and create clickable flows to simulate user interactions and test navigation paths.

**3. Collaboration Phase**
Share designs with stakeholders, gather feedback through comments, and iterate in real-time. Multiple team members can edit simultaneously, seeing each other's changes instantly.

**4. Development Handoff**
Generate design specs, inspect CSS properties, export assets, and provide developers with all necessary information for implementation through Dev Mode.

**5. Design System Management**
Create and maintain reusable components, variants, and styles to ensure consistency across products and teams.

---
### 👤 BA Role in Figma Tool

**1. Requirements Validation**
Review wireframes and prototypes to ensure they accurately reflect business requirements and user stories.

**2. Stakeholder Collaboration**
Participate in design reviews, provide feedback on functionality, and facilitate discussions between business stakeholders and design teams.

**3. User Flow Verification**
Validate that screen flows and navigation paths align with use cases and user journey maps documented in requirements.

**4. Design System Governance**
Ensure design components adhere to business rules and accessibility standards (WCAG) defined in requirements.

**5. Prototype Testing Support**
Collaborate with UX designers to define test scenarios for prototype testing and gather feedback from users.

"""

    # === UI Design ===
    elif any(term in question_lower for term in ["ui design", "user interface"]):
        return """
## 🎨 UI Design Principles

### What is UI Design?
**User Interface Design** focuses on the look and feel of the application—the visual elements users interact with.

---

### 📊 Key UI Principles

**1. Clarity**
Interface should be intuitive and self-explanatory. Users should know what to do without instructions.

**2. Consistency**
Similar elements behave similarly throughout. Example: All buttons use the same style.

**3. Feedback**
System responds to user actions. Example: Button changes color when clicked.

**4. Efficiency**
Minimize steps for common tasks. Example: One-click checkout.

---

### 👤 BA Role in UI Design
Ensure UI reflects business requirements, validate with user personas, and consider accessibility standards.

---

*Source: Professional Knowledge Base*
"""

    # === UX Process ===
    elif any(term in question_lower for term in ["ux process", "user experience"]):
        return """
## 🔄 UX Design Process

### What is UX?
**User Experience (UX)** encompasses all aspects of the end-user's interaction with a product or service.

---

### 📊 UX Process Phases

**1. Research**
User interviews, surveys, competitive analysis. Deliverables: Personas, journey maps.

**2. Analysis**
Affinity mapping, problem definition. Deliverables: User stories, requirements.

**3. Design**
Wireframes, prototypes, information architecture. Deliverables: Interactive prototypes.

**4. Testing**
Usability testing, A/B testing. Deliverables: Test reports, insights.

**5. Implementation**
Developer handoff, design QA. Deliverables: Style guides, assets.

---

### 👤 BA Role in UX
Share requirements, participate in user research, and review wireframes against business rules.

---

*Source: Professional Knowledge Base*
"""

    # === Information Architecture ===
    elif any(term in question_lower for term in ["information architecture", "ia"]):
        return """
## 🏛️ Information Architecture (IA)

### What is IA?
**Information Architecture** is the structural design of information environments—organizing and labeling content for findability.

---

### 📊 IA Components

**1. Organization Systems**
How content is categorized. Example: By topic, by task, by user type.

**2. Labeling Systems**
How information is represented. Example: Navigation labels, headings.

**3. Navigation Systems**
How users move through content. Example: Menus, breadcrumbs, search.

**4. Search Systems**
How users find specific content. Example: Search bars, filters.

---

### 👤 BA Role in IA
Ensure requirements consider content organization, navigation reflects business priorities, and search needs are specified.

---

*Source: Professional Knowledge Base*
"""

    # === Screen Flows ===
    elif any(term in question_lower for term in ["screen flow", "user flow", "navigation flow"]):
        return """
## 📱 Screen Flows & User Flows

### What are Screen Flows?
**Screen flows** visually represent the path users take through an application to complete tasks.

---

### 📊 Flow Diagram Symbols

**1. Screen/Page (▭)**
Represents a screen or page in the application.

**2. Decision Point (◇)**
A point where user chooses between options.

**3. User Action (⟹)**
An action taken by the user (click, swipe, etc.).

**4. Start/End Point (○)**
Beginning or end of the user journey.

---

### 👤 BA Role in Screen Flows
Validate complete user journeys, identify missing screens, and document alternative flows.

---

*Source: Professional Knowledge Base*
"""

    # === Accessibility ===
    elif any(term in question_lower for term in ["accessibility", "wcag", "a11y"]):
        return """
## ♿ Accessibility Standards (WCAG)

### What is Accessibility?
**Accessibility** ensures people with disabilities can perceive, understand, navigate, and interact with digital products.

---

### 📊 WCAG Four Principles (POUR)

**1. Perceivable**
Users can perceive information. Example: Alt text for images, captions for videos.

**2. Operable**
Users can navigate and interact. Example: Keyboard navigation, sufficient time.

**3. Understandable**
Users can comprehend content. Example: Clear language, predictable navigation.

**4. Robust**
Content works across technologies. Example: Compatible with screen readers.

---

### 👤 BA Role in Accessibility
Include accessibility in requirements, verify compliance with WCAG standards, and document acceptance criteria.

---

*Source: Professional Knowledge Base*
"""

    # === Responsive Design ===
    elif any(term in question_lower for term in ["responsive", "mobile design"]):
        return """
## 📱 Responsive Web Design

### What is Responsive Design?
**Responsive design** ensures websites and applications work well on all devices—desktop, tablet, and mobile.

---

### 📊 Responsive Design Approaches

**1. Fluid Grids**
Layouts use percentages, not fixed pixels. Content adapts to screen width.

**2. Flexible Images**
Images scale with the viewport to prevent overflow.

**3. Media Queries**
CSS adapts to screen size, orientation, and resolution.

**4. Mobile-First**
Design for mobile first, then enhance for larger screens.

---

### 📋 Common Breakpoints
- **Mobile**: up to 768px
- **Tablet**: 768px - 1024px
- **Desktop**: 1024px+

---

### 👤 BA Role in Responsive Design
Specify breakpoints and behavior, document content prioritization, and include responsive acceptance criteria.

---

*Source: Professional Knowledge Base*
"""

    # === Design System ===
    elif any(term in question_lower for term in ["design system", "style guide"]):
        return """
## 🎯 Design Systems & Style Guides

### What is a Design System?
A **design system** is a collection of reusable components and standards for building applications.

---

### 📊 Design System Components

**1. Design Tokens**
Visual design atoms. Example: Colors, typography, spacing.

**2. UI Components**
Reusable interface elements. Example: Buttons, forms, cards.

**3. Patterns**
Common solutions to design problems. Example: Navigation, search.

**4. Guidelines**
Usage rules and best practices. Example: When to use each component.

---

### 👤 BA Role in Design Systems
Document business rules for components, validate component behavior against requirements, and ensure accessibility.

---

*Source: Professional Knowledge Base*
"""

    # === Usability Testing ===
    elif any(term in question_lower for term in ["usability testing", "user testing"]):
        return """
## 🧪 Usability Testing

### What is Usability Testing?
**Usability testing** evaluates a product by testing it with representative users to identify issues and gather feedback.

---

### 📊 Types of Usability Testing

**1. Moderated Testing**
Facilitator guides users in real-time. Best for in-depth feedback and observation.

**2. Unmoderated Testing**
Users complete tasks independently. Best for quick, large-scale testing.

**3. Remote Testing**
Testing conducted online. Best for distributed users.

**4. In-Person Testing**
Testing in a lab or office. Best for detailed observation.

---

### 📊 Usability Metrics
- **Task Success Rate**: % of users who complete task (Target: >80%)
- **Time on Task**: Time to complete task
- **Error Rate**: Number of errors per task (Target: <2)

---

### 👤 BA Role in Usability Testing
Define test scenarios based on requirements, observe sessions, and document findings.

---

*Source: Professional Knowledge Base*
"""

    # === A/B Testing ===
    elif any(term in question_lower for term in ["ab testing", "a/b testing", "split testing"]):
        return """
## 📊 A/B Testing

### What is A/B Testing?
**A/B testing** compares two versions of a web page or feature to determine which performs better.

---

### 📊 A/B Testing Process

**1. Identify Goal**
Define what to improve. Example: Increase conversion rate, engagement, or click-throughs.

**2. Create Variants**
Develop Version A (control) and Version B (variant) with one element changed.

**3. Split Traffic**
Randomly assign users to each version (typically 50/50 split).

**4. Collect Data**
Measure performance metrics over a statistically significant period.

**5. Analyze Results**
Determine which version performed better and if results are statistically significant.

---

### 👤 BA Role in A/B Testing
Define clear success metrics, document test hypotheses, and plan for implementation of the winner.

---

*Source: Professional Knowledge Base*
"""

    # === Heuristic Evaluation ===
    elif any(term in question_lower for term in ["heuristic", "usability heuristics"]):
        return """
## 🔍 Heuristic Evaluation

### What is Heuristic Evaluation?
A **heuristic evaluation** is a usability inspection method where experts evaluate an interface against established principles.

---

### 📊 Nielsen's 10 Usability Heuristics

**1. Visibility of system status**
Keep users informed about what's happening with timely feedback.

**2. Match system and real world**
Use familiar language and concepts that users understand.

**3. User control and freedom**
Provide easy ways to undo actions and exit unwanted states.

**4. Consistency and standards**
Follow platform conventions and maintain consistent design.

**5. Error prevention**
Prevent problems before they occur through good design.

**6. Recognition not recall**
Minimize memory load by keeping elements visible.

**7. Flexibility and efficiency**
Provide shortcuts for expert users to speed up interactions.

**8. Aesthetic and minimalist design**
Avoid irrelevant information that distracts from essentials.

**9. Help users recognize errors**
Use clear error messages with solutions.

**10. Help and documentation**
Provide easy-to-search help when needed.

---

### 👤 BA Role in Heuristic Evaluation
Review wireframes against heuristics, document usability issues, and validate with user testing.

---

*Source: Professional Knowledge Base*
"""

    # === Personas ===
    elif any(term in question_lower for term in ["persona", "user persona"]):
        return """
## 👤 User Personas

### What are Personas?
**Personas** are fictional characters created to represent different user types that might use a product or service.

---

### 📊 Persona Components

**1. Name & Photo**
Humanizes the persona. Example: "Sarah, Marketing Manager"

**2. Demographics**
Age, occupation, location. Example: 35, Marketing Manager, Chicago

**3. Goals**
What they want to achieve. Example: "Track campaign performance in real-time"

**4. Pain Points**
Challenges they face. Example: "Too many manual reports to generate"

**5. Behaviors**
How they interact with technology. Example: "Uses mobile primarily, checks email 20x/day"

---

### 👤 BA Role in Personas
Create personas to empathize with users, validate requirements against user needs, and prioritize features by user value.

---

*Source: Professional Knowledge Base*
"""

    # === Journey Map ===
    elif any(term in question_lower for term in ["journey map", "customer journey"]):
        return """
## 🗺️ Customer Journey Mapping

### What is a Journey Map?
A **customer journey map** visualizes the process a user goes through to accomplish a goal with your product or service.

---

### 📊 Journey Map Components

**1. Phases**
High-level stages of the journey. Example: Awareness, Consideration, Purchase, Support.

**2. Actions**
Specific steps users take. Example: Search for product, read reviews, add to cart.

**3. Touchpoints**
Interactions with the product/brand. Example: Website, email, customer service call.

**4. Emotions**
User feelings at each step. Example: Frustrated when search fails, delighted when checkout is easy.

**5. Pain Points**
Problems or frustrations. Example: Long loading times, confusing navigation.

---

### 👤 BA Role in Journey Maps
Understand complete user experience, identify gaps and pain points, and prioritize improvements.

---

*Source: Professional Knowledge Base*
"""

    # === Task Analysis ===
    elif any(term in question_lower for term in ["task analysis"]):
        return """
## 📋 Task Analysis

### What is Task Analysis?
**Task analysis** is the process of understanding how users perform tasks, including their goals, actions, and decision points.

---

### 📊 Task Analysis Methods

**1. Hierarchical Task Analysis**
Break complex tasks into subtasks. Best for understanding step-by-step procedures.

**2. Cognitive Task Analysis**
Understand mental processes, decisions, and knowledge required. Best for complex decision-making tasks.

**3. Sequential Analysis**
Document the exact sequence of actions. Best for linear processes like checkout flows.

---

### 👤 BA Role in Task Analysis
Identify all required features, discover hidden requirements, and create accurate use cases.

---

*Source: Professional Knowledge Base*
"""

    # === Design Sprint ===
    elif any(term in question_lower for term in ["design sprint"]):
        return """
## 🏃 Design Sprint Methodology

### What is a Design Sprint?
A **design sprint** is a 5-day process for answering critical business questions through design, prototyping, and testing.

---

### 📊 Design Sprint Phases

**1. Monday - Understand**
Map the problem, choose a target, and gather insights from experts.

**2. Tuesday - Diverge**
Sketch solutions and explore ideas. Generate many possible approaches.

**3. Wednesday - Decide**
Select the best ideas and create a storyboard for the prototype.

**4. Thursday - Prototype**
Build a realistic prototype that looks like the final product.

**5. Friday - Test**
Validate with real users and gather feedback.

---

### 👤 BA Role in Design Sprints
Provide business requirements, share user research, and ensure feasibility of solutions.

---

*Source: Professional Knowledge Base*
"""

    # === Low-Code/No-Code ===
    elif any(term in question_lower for term in ["low code", "no code", "nocode"]):
        return """
## 🔧 Low-Code/No-Code Platforms

### What is Low-Code/No-Code?
**Low-code/no-code** platforms enable rapid application development with minimal hand-coding, using visual interfaces.

---

### 📊 Low-Code vs No-Code

**1. Low-Code Platforms**
Target users: Developers, IT. Minimal coding required. Best for complex applications. Examples: OutSystems, Mendix.

**2. No-Code Platforms**
Target users: Business users, citizen developers. No coding required. Best for simple to medium complexity. Examples: Bubble, Airtable, Zapier.

---

### 📋 Popular Platforms by Category
- **App Development**: Bubble, Adalo, Glide
- **Automation**: Zapier, Make (Integromat)
- **Database**: Airtable, Notion
- **Forms**: JotForm, Typeform

---

### 👤 BA Role in Low-Code
Evaluate platform fit for requirements, consider governance, and document platform-specific constraints.

---

*Source: Professional Knowledge Base*
"""

    # === API Design ===
    elif any(term in question_lower for term in ["api design", "rest api"]):
        return """
## 🔌 API Design & Specifications

### What is API Design?
**API design** involves creating interfaces that allow different software applications to communicate with each other.

---

### 📊 REST API Principles

**1. Stateless**
Each request contains all information needed. No client context stored on server.

**2. Resource-Based**
URLs represent resources (nouns), not actions. Example: /customers not /getCustomers.

**3. HTTP Methods**
Use standard methods: GET (read), POST (create), PUT (update), DELETE (remove).

**4. Status Codes**
Use standard HTTP status codes: 200 (success), 201 (created), 400 (bad request), 404 (not found), 500 (server error).

---

### 👤 BA Role in API Design
Define business requirements for APIs, document data requirements, and specify error handling needs.

---

*Source: Professional Knowledge Base*
"""

    # === Data Modeling ===
    elif any(term in question_lower for term in ["data modeling", "entity relationship", "erd"]):
        return """
## 🗃️ Data Modeling

### What is Data Modeling?
**Data modeling** is the process of creating a visual representation of data structures, relationships, and rules.

---

### 📊 Data Model Levels

**1. Conceptual Model**
High-level business concepts and relationships. Audience: Stakeholders, BAs.

**2. Logical Model**
Detailed entities, attributes, and relationships. Audience: BAs, Architects.

**3. Physical Model**
Database-specific implementation details. Audience: DBAs, Developers.

---

### 📊 Relationship Types
- **One-to-One (1:1)**: Person → Passport
- **One-to-Many (1:N)**: Customer → Orders
- **Many-to-Many (M:N)**: Student → Courses (requires junction table)

---

### 👤 BA Role in Data Modeling
Clarify data requirements, identify missing entities, and document business rules.

---

*Source: Professional Knowledge Base*
"""

    # === BPMN ===
    elif any(term in question_lower for term in ["bpmn", "business process modeling"]):
        return """
## 🔄 BPMN (Business Process Model and Notation)

### What is BPMN?
**BPMN** is a standardized graphical notation for modeling business processes, used by both business and technical stakeholders.

---

### 📊 BPMN Core Elements

**1. Events (○)**
Something that happens. Types: Start, end, intermediate events.

**2. Activities (▭)**
Work performed. Types: Tasks, subprocesses.

**3. Gateways (◇)**
Decision points, branching, merging, and forking.

**4. Flows (⟹)**
Sequence of activities showing the order of execution.

**5. Pools/Lanes (▭▭)**
Participants in the process (organizations, roles).

---

### 👤 BA Role in BPMN
Document processes in standardized notation, identify bottlenecks, and support process improvement.

---

*Source: Professional Knowledge Base*
"""

    # === Use Case Diagrams ===
    elif any(term in question_lower for term in ["use case diagram"]):
        return """
## 📊 Use Case Diagrams (UML)

### What are Use Case Diagrams?
**Use case diagrams** visually represent interactions between users (actors) and a system to achieve specific goals.

---

### 📊 Use Case Diagram Components

**1. Actor (👤)**
User or external system interacting with the system. Example: Customer, Admin, Payment System.

**2. Use Case (○)**
Specific functionality or goal. Placed inside an oval. Example: "Place Order", "Login".

**3. System Boundary (▭)**
Box containing use cases, defining system scope.

**4. Relationships (—)**
Lines connecting actors to use cases they participate in.

**5. Include/Extend**
«include» for required functionality, «extend» for optional behavior.

---

### 👤 BA Role in Use Case Diagrams
Capture functional requirements, define system scope, and identify all user interactions.

---

*Source: Professional Knowledge Base*
"""

    # === Activity Diagrams ===
    elif any(term in question_lower for term in ["activity diagram"]):
        return """
## 🔄 Activity Diagrams (UML)

### What are Activity Diagrams?
**Activity diagrams** model the flow of control from one activity to another, showing sequential and parallel behaviors.

---

### 📊 Activity Diagram Elements

**1. Start Node (●)**
Initial node where the process begins.

**2. Activity (▭)**
Action or task performed. Example: "Enter Customer Details".

**3. Decision Node (◇)**
Branch based on conditions. Example: "Payment Approved?".

**4. Merge Node (◇)**
Combine flows back together after decisions.

**5. Fork (―)**
Split into parallel flows for concurrent activities.

**6. Join (―)**
Synchronize parallel flows back together.

**7. End Node (●)**
Final node where the process ends.

---

### 👤 BA Role in Activity Diagrams
Model complex business logic, document workflow rules, and identify parallel processes.

---

*Source: Professional Knowledge Base*
"""

    # === State Machine Diagrams ===
    elif any(term in question_lower for term in ["state machine", "state diagram"]):
        return """
## ⚙️ State Machine Diagrams (UML)

### What are State Machine Diagrams?
**State machine diagrams** show the life cycle of an object—its states, transitions, and events that trigger changes.

---

### 📊 State Diagram Elements

**1. State (▭)**
Condition of an object at a point in time. Example: "Pending", "Approved", "Shipped".

**2. Start State (●)**
Initial state when object is created.

**3. End State (●)**
Final state when object life cycle ends.

**4. Transition (⟹)**
Change from one state to another. Labeled with the event that triggers it.

**5. Event [Guard]**
Trigger that causes transition, with optional condition. Example: "submit [amount > $1000]" requires manager approval.

---

### 👤 BA Role in State Diagrams
Document object lifecycles, identify all possible states, and define transition rules.

---

*Source: Professional Knowledge Base*
"""

    # === Data Dictionary ===
    elif any(term in question_lower for term in ["data dictionary"]):
        return """
## 📚 Data Dictionary

### What is a Data Dictionary?
A **Data Dictionary** is a centralized repository defining data elements, their types, formats, and business rules.

---

### 📊 Data Dictionary Components

**1. Element Name**
Name of the data field. Example: customer_id, first_name, email.

**2. Description**
Business meaning of the data. Example: "Unique identifier for customer".

**3. Data Type**
Type of data. Example: Integer, String, Date, Boolean.

**4. Length/Format**
Size and format. Example: 50 characters, YYYY-MM-DD.

**5. Validation Rules**
Business rules for data. Example: "Must be valid email format".

---

### 📋 Data Dictionary Example
| Element | Type | Length | Required | Validation |
|---------|------|--------|----------|------------|
| customer_id | Integer | 10 | Yes | Auto-generated |
| first_name | String | 50 | Yes | A-Z, a-z |
| email | String | 100 | Yes | Valid email format |

---

### 👤 BA Role in Data Dictionary
Create and maintain data dictionary, define data elements with stakeholders, and ensure consistency.

---

*Source: Professional Knowledge Base*
"""

    # === Benchmarking ===
    elif any(term in question_lower for term in ["benchmarking"]):
        return """
## 📊 Benchmarking

### What is Benchmarking?
**Benchmarking** compares business processes and performance metrics against industry best practices to identify improvement opportunities.

---

### 📊 Types of Benchmarking

**1. Internal Benchmarking**
Compare within the same organization. Example: Compare performance across different departments.

**2. Competitive Benchmarking**
Compare with direct competitors. Example: Compare features with competitor's product.

**3. Functional Benchmarking**
Compare similar functions in different industries. Example: Compare customer service with airline industry.

**4. Generic Benchmarking**
Compare processes regardless of industry. Example: Compare order fulfillment with Amazon.

---

### 📋 Benchmarking Process
1. **Plan**: Identify what to benchmark
2. **Collect**: Gather data on own and others' performance
3. **Analyze**: Compare and identify gaps
4. **Adapt**: Develop improvement plans
5. **Improve**: Implement changes and monitor

---

### 👤 BA Role in Benchmarking
Identify benchmarking metrics, collect and analyze data, and document findings.

---

*Source: Professional Knowledge Base*
"""

    # === Lean Methodology ===
    elif any(term in question_lower for term in ["lean", "lean methodology"]):
        return """
## 📦 Lean Methodology

### What is Lean?
**Lean** is a methodology focused on maximizing customer value while minimizing waste.

---

### 📊 The 7 Wastes (TIMWOOD)

**1. Transport**
Unnecessary movement of products. Example: Moving documents between offices.

**2. Inventory**
Excess products or materials. Example: Unused software licenses.

**3. Motion**
Unnecessary movement of people. Example: Walking to find files.

**4. Waiting**
Idle time waiting for something. Example: Waiting for approvals.

**5. Overprocessing**
Doing more than needed. Example: Excessive documentation.

**6. Overproduction**
Producing more than needed. Example: Building features no one uses.

**7. Defects**
Errors requiring rework. Example: Bugs, incorrect requirements.

---

### 👤 BA Role in Lean
Identify waste in requirements process, focus on customer value, and streamline documentation.

---

*Source: Professional Knowledge Base*
"""

    # === Six Sigma ===
    elif any(term in question_lower for term in ["six sigma"]):
        return """
## 6σ Six Sigma

### What is Six Sigma?
**Six Sigma** is a data-driven methodology for eliminating defects and reducing variation, aiming for 3.4 defects per million opportunities.

---

### 📊 Six Sigma Levels

| Sigma Level | Defects per Million | Yield |
|-------------|---------------------|-------|
| 1σ | 690,000 | 31% |
| 2σ | 308,000 | 69% |
| 3σ | 66,800 | 93.3% |
| 4σ | 6,210 | 99.38% |
| 5σ | 230 | 99.977% |
| 6σ | 3.4 | 99.99966% |

---

### 📋 DMAIC Methodology
- **Define**: Define problem and goals
- **Measure**: Measure current performance
- **Analyze**: Identify root causes
- **Improve**: Implement solutions
- **Control**: Sustain improvements

---

### 👤 BA Role in Six Sigma
Apply Six Sigma tools, support process improvement, and analyze data for decisions.

---

*Source: Professional Knowledge Base*
"""

    # === DMAIC ===
    elif any(term in question_lower for term in ["dmaic"]):
        return """
## 🔄 DMAIC Framework

### What is DMAIC?
**DMAIC** is a data-driven improvement cycle used in Six Sigma for optimizing business processes.

---

### 📊 DMAIC Phases

**1. Define**
Define the problem and goals. Example: "Reduce order errors from 10% to 3%."

**2. Measure**
Measure current state. Example: Collect error data for 30 days to establish baseline.

**3. Analyze**
Find root causes. Example: 70% of errors come from manual data entry.

**4. Improve**
Implement solutions. Example: Add barcode scanning to reduce manual entry.

**5. Control**
Sustain gains. Example: Monitor error rate monthly to ensure it stays below 3%.

---

### 👤 BA Role in DMAIC
Lead DMAIC projects, apply tools in each phase, and measure and report results.

---

*Source: Professional Knowledge Base*
"""

    # === Kaizen ===
    elif any(term in question_lower for term in ["kaizen"]):
        return """
## 🔄 Kaizen (Continuous Improvement)

### What is Kaizen?
**Kaizen** is a Japanese philosophy of continuous, incremental improvement involving all employees.

---

### 📊 Kaizen Principles

**1. Small Steps**
Make incremental improvements rather than radical changes. Example: Reduce report generation time by 5 minutes.

**2. Everyone Involved**
All employees participate, from executives to frontline workers.

**3. Low Cost**
Focus on simple, inexpensive changes that don't require major investment.

**4. Immediate Results**
Implement changes quickly to see results and build momentum.

---

### 📋 PDCA Cycle
**Plan** → **Do** → **Check** → **Act**

---

### 👤 BA Role in Kaizen
Facilitate kaizen events, document current and future processes, and identify improvement opportunities.

---

*Source: Professional Knowledge Base*
"""

    # === POC ===
    elif any(term in question_lower for term in ["poc", "proof of concept"]):
        return """
## 🧪 Proof of Concept (POC)

### What is a POC?
A **Proof of Concept (POC)** is a small-scale demonstration to verify that a concept or technology is feasible.

---

### 📊 POC vs Prototype vs Pilot

**1. POC**
Purpose: Test feasibility. Scope: Narrow, technical. When: Early stage.

**2. Prototype**
Purpose: Explore design. Scope: User interface. When: Design phase.

**3. Pilot**
Purpose: Test in production. Scope: Limited rollout. When: Pre-launch.

---

### 📋 POC Success Criteria
- Technical feasibility proven
- Key risks mitigated
- Clear recommendation (proceed/reject)

---

### 👤 BA Role in POC
Define POC scope and success criteria, coordinate with technical team, and document findings.

---

*Source: Professional Knowledge Base*
"""

    # === Pilot Program ===
    elif any(term in question_lower for term in ["pilot", "pilot program"]):
        return """
## ✈️ Pilot Program

### What is a Pilot Program?
A **Pilot Program** is a small-scale implementation in a real production environment to test effectiveness before full rollout.

---

### 📊 Pilot Objectives

**1. Real-world Testing**
Validate the solution in production with actual users and data.

**2. User Feedback**
Gather input from real users to identify issues and improvements.

**3. Risk Mitigation**
Identify problems early before full-scale deployment.

**4. Build Support**
Create advocates for full rollout by involving users early.

---

### 📋 Pilot Success Metrics
- User adoption rate (>80%)
- Task completion time
- User satisfaction score (>4/5)

---

### 👤 BA Role in Pilot
Plan and coordinate pilot, define success metrics, collect feedback, and refine requirements.

---

*Source: Professional Knowledge Base*
"""

    # === Technical Debt ===
    elif any(term in question_lower for term in ["technical debt"]):
        return """
## 💸 Technical Debt

### What is Technical Debt?
**Technical Debt** refers to the implied cost of additional rework caused by choosing quick solutions now instead of better approaches.

---

### 📊 Types of Technical Debt

**1. Code Debt**
Poor code quality. Example: No comments, complex nested logic.

**2. Design Debt**
Suboptimal architecture. Example: Tight coupling, no design patterns.

**3. Documentation Debt**
Missing documentation. Example: No user manuals, outdated specs.

**4. Testing Debt**
Insufficient testing. Example: Low test coverage, no automation.

**5. Requirements Debt**
Unclear requirements. Example: Vague specs, missing details.

---

### 👤 BA Role in Technical Debt
Understand technical debt implications, include debt reduction in requirements, and balance feature delivery with quality.

---

*Source: Professional Knowledge Base*
"""

    # === Legacy Modernization ===
    elif any(term in question_lower for term in ["legacy modernization"]):
        return """
## 🏛️ Legacy Modernization

### What is Legacy Modernization?
**Legacy Modernization** is updating outdated systems to align with current technology standards and business needs.

---

### 📊 Modernization Strategies

**1. Encapsulate**
Wrap legacy with APIs. Use when system works but needs integration.

**2. Rehost**
Move to new infrastructure. Use when hardware is obsolete.

**3. Replatform**
Move to new platform with minimal changes. Use when platform is end-of-life.

**4. Refactor**
Restructure code without changing behavior. Use when code is maintainable but inefficient.

**5. Rearchitect**
Change architecture significantly. Use when system can't scale.

**6. Rebuild**
Build from scratch. Use when system is beyond repair.

**7. Replace**
Replace with COTS or SaaS. Use when standard solution exists.

---

### 👤 BA Role in Modernization
Analyze current system functionality, define data migration requirements, and plan user transition.

---

*Source: Professional Knowledge Base*
"""

    # === System Integration ===
    elif any(term in question_lower for term in ["system integration"]):
        return """
## 🔌 System Integration

### What is System Integration?
**System Integration** connects different subsystems to work together as a unified whole, sharing data and functionality.

---

### 📊 Integration Patterns

**1. Point-to-Point**
Direct connections between systems. Best for simple, few integrations.

**2. Hub-and-Spoke**
Central hub connects all systems. Best for many integrations, complex routing.

**3. Bus Architecture**
Shared communication channel. Best for decoupled, scalable systems.

**4. Service-Oriented**
Services via standard protocols (SOAP/REST). Best for flexible, reusable integrations.

---

### 📋 Integration Approaches
- **API-based**: REST/SOAP APIs
- **Message-based**: Asynchronous messaging
- **File-based**: SFTP, EDI file transfer
- **Database**: Direct database access
- **Middleware**: Integration platform

---

### 👤 BA Role in Integration
Define integration requirements, document data mappings, and specify error handling.

---

*Source: Professional Knowledge Base*
"""

    # === Interoperability ===
    elif any(term in question_lower for term in ["interoperability"]):
        return """
## 🔗 Interoperability

### What is Interoperability?
**Interoperability** is the ability of different systems to connect, communicate, and exchange data effectively.

---

### 📊 Levels of Interoperability

**1. Technical Interoperability**
Physical connection and data transport. Example: TCP/IP, HTTP protocols.

**2. Syntactic Interoperability**
Common data formats. Example: XML, JSON, HL7.

**3. Semantic Interoperability**
Common meaning of data. Example: Shared data definitions, standardized codes.

**4. Organizational Interoperability**
Aligned processes and policies. Example: Cross-organization workflows.

---

### 📋 Industry Standards
- **Healthcare**: HL7, FHIR, DICOM
- **Finance**: ISO 20022, FIX, SWIFT
- **E-commerce**: EDI, UN/EDIFACT
- **Government**: NIEM, GS1

---

### 👤 BA Role in Interoperability
Identify interoperability requirements, research relevant standards, and define data exchange specifications.

---

*Source: Professional Knowledge Base*
"""

    # === SWOT Analysis ===
    elif any(term in question_lower for term in ["swot", "swot analysis"]):
        return """
## 📊 SWOT Analysis

### What is SWOT?
**SWOT Analysis** evaluates Strengths, Weaknesses, Opportunities, and Threats for strategic planning.

---

### 📊 SWOT Components

**1. Strengths (Internal)**
Internal attributes that give an advantage. Example: Strong brand, patent-protected technology, skilled workforce.

**2. Weaknesses (Internal)**
Internal factors that put you at a disadvantage. Example: Limited budget, outdated equipment, skill gaps.

**3. Opportunities (External)**
External factors to exploit for growth. Example: Emerging markets, new technology trends, regulatory changes.

**4. Threats (External)**
External factors that could harm the business. Example: New competitors, changing regulations, economic downturns.

---

### 👤 BA Role in SWOT
Facilitate SWOT workshops with stakeholders and use insights to inform requirements and strategy.

---

*Source: Professional Knowledge Base*
"""

    # === PESTLE Analysis ===
    elif any(term in question_lower for term in ["pestle", "pestle analysis"]):
        return """
## 🌍 PESTLE Analysis

### What is PESTLE?
**PESTLE Analysis** examines external factors: Political, Economic, Social, Technological, Legal, Environmental.

---

### 📊 PESTLE Components

**1. Political**
Government policies, trade restrictions, tax policies. Example: New data privacy laws affecting product design.

**2. Economic**
Inflation, interest rates, economic growth. Example: Rising interest rates impacting project budgets.

**3. Social**
Demographics, cultural trends, lifestyle changes. Example: Remote work trend requiring collaboration tools.

**4. Technological**
Automation, R&D, technology innovation. Example: AI advancements creating new feature opportunities.

**5. Legal**
Employment laws, health & safety, regulations. Example: GDPR compliance requirements for data handling.

**6. Environmental**
Climate change, sustainability, carbon footprint. Example: Net-zero targets driving green initiatives.

---

### 👤 BA Role in PESTLE
Research external factors, document impacts on the project, and identify risks and opportunities.

---

*Source: Professional Knowledge Base*
"""

    # === MoSCoW Prioritization ===
    elif any(term in question_lower for term in ["moscow", "prioritization", "prioritize requirements"]):
        return """
## ⚖️ MoSCoW Prioritization

### What is MoSCoW?
**MoSCoW** is a prioritization technique for requirements: Must have, Should have, Could have, Won't have.

---

### 📊 MoSCoW Categories

**1. Must Have**
Critical requirements that are non-negotiable. Without these, the solution fails. Example: User login for a banking app.

**2. Should Have**
Important requirements but can wait if necessary. Example: Password reset via email.

**3. Could Have**
Nice to have if time and budget permit. Example: Social media login integration.

**4. Won't Have**
Explicitly excluded from this release/phase. Example: Mobile app in phase 1 (desktop only).

---

### 👤 BA Role in MoSCoW
Facilitate prioritization sessions with stakeholders and document priority decisions.

---

*Source: Professional Knowledge Base*
"""

    # === Business Case ===
    elif any(term in question_lower for term in ["business case"]):
        return """
## 💼 Business Case

### What is a Business Case?
A **Business Case** provides justification for initiating a project, presenting benefits, costs, and risks.

---

### 📊 Business Case Components

**1. Executive Summary**
Brief overview of the proposal and recommendation.

**2. Problem Statement**
Current issues and opportunities being addressed.

**3. Options Analysis**
Evaluation of possible solutions with pros and cons.

**4. Cost-Benefit Analysis**
Financial justification with ROI, NPV, payback period.

**5. Risk Assessment**
Potential risks and mitigation strategies.

**6. Recommendation**
Proposed solution with clear rationale.

---

### 📋 Key Metrics
- **ROI**: Return on Investment
- **NPV**: Net Present Value
- **Payback Period**: Time to recover investment

---

### 👤 BA Role in Business Case
Gather data, quantify benefits, document assumptions, and present findings to stakeholders.

---

*Source: Professional Knowledge Base*
"""

    # === Feasibility Study ===
    elif any(term in question_lower for term in ["feasibility study"]):
        return """
## 📋 Feasibility Study

### What is a Feasibility Study?
A **Feasibility Study** evaluates the practicality and viability of a proposed project before committing resources.

---

### 📊 Types of Feasibility

**1. Technical Feasibility**
Can we build it? Do we have the technology and skills?

**2. Economic Feasibility**
Can we afford it? Is the ROI acceptable?

**3. Operational Feasibility**
Will it work in practice? Will users accept it?

**4. Schedule Feasibility**
Can we deliver on time? Is the timeline realistic?

**5. Legal Feasibility**
Is it compliant? Any regulatory issues?

---

### 👤 BA Role in Feasibility Study
Lead the feasibility study, coordinate with SMEs, document findings, and present recommendations.

---

*Source: Professional Knowledge Base*
"""

    # === Cost-Benefit Analysis ===
    elif any(term in question_lower for term in ["cost benefit analysis", "cba"]):
        return """
## 💰 Cost-Benefit Analysis (CBA)

### What is CBA?
**Cost-Benefit Analysis** compares projected costs and benefits to determine business value and feasibility.

---

### 📊 CBA Formula

**Net Benefit = Total Benefits - Total Costs**

**Benefit-Cost Ratio = Total Benefits / Total Costs** (>1 indicates positive return)

---

### 📋 Types of Costs and Benefits

**1. Direct Costs**
Directly attributable expenses. Example: Software licenses, hardware, salaries.

**2. Indirect Costs**
Overhead or shared expenses. Example: Facilities, utilities, management time.

**3. Tangible Benefits**
Quantifiable, monetary value. Example: Cost savings, revenue increase.

**4. Intangible Benefits**
Difficult to quantify. Example: Customer satisfaction, brand reputation.

---

### 👤 BA Role in CBA
Gather cost data, quantify benefits where possible, and document assumptions.

---

*Source: Professional Knowledge Base*
"""

    # === Impact Analysis ===
    elif any(term in question_lower for term in ["impact analysis"]):
        return """
## 🔍 Impact Analysis

### What is Impact Analysis?
**Impact Analysis** evaluates the potential consequences of a proposed change before implementation.

---

### 📊 Impact Analysis Dimensions

**1. Technical Impact**
Which systems, components, or interfaces will be affected?

**2. Business Impact**
How will business processes be affected?

**3. Schedule Impact**
Will timeline be affected? How much?

**4. Cost Impact**
What additional resources or budget needed?

**5. Resource Impact**
Which teams or individuals will be affected?

---

### 👤 BA Role in Impact Analysis
Perform traceability analysis, consult with stakeholders, and document findings.

---

*Source: Professional Knowledge Base*
"""

    # === Traceability Matrix ===
    elif any(term in question_lower for term in ["traceability matrix", "rtm", "requirements traceability"]):
        return """
## 🔍 Requirements Traceability Matrix (RTM)

### What is RTM?
A **Requirements Traceability Matrix** tracks requirements throughout the project lifecycle—from origin to delivery.

---

### 📊 RTM Example

| Req ID | Requirement | Source | Design | Test Case | Status |
|--------|-------------|--------|--------|-----------|--------|
| REQ-001 | User login | Interview | UI-101 | TC-201 | Done |
| REQ-002 | Password reset | Workshop | UI-102 | TC-202 | In Progress |

---

### 📋 Why Traceability Matters

**1. Impact Analysis**
Quickly identify affected requirements when changes occur.

**2. Coverage Validation**
Ensure all requirements are addressed in design and testing.

**3. Regulatory Compliance**
Demonstrate complete coverage for audits.

---

### 👤 BA Role in RTM
Create and maintain the traceability matrix, update when requirements change.

---

*Source: Professional Knowledge Base*
"""

    # === User Stories ===
    elif any(term in question_lower for term in ["user stories", "user story"]):
        return """
## 📝 User Stories

### What are User Stories?
**User Stories** are short, simple descriptions of a feature from the perspective of the user.

---

### 📊 User Story Format

**"As a [type of user], I want to [perform action] so that [achieve goal]."**

Example: "As a customer, I want to reset my password so that I can access my account if I forget it."

---

### 📋 Acceptance Criteria (Given-When-Then)

**Given** [context], **When** [action], **Then** [outcome].

Example:
- Given I am on the login page
- When I click "Forgot Password"
- Then I receive a password reset email

---

### 👤 BA Role in User Stories
Write and refine user stories, define acceptance criteria, and collaborate with Product Owner on backlog.

---

*Source: Professional Knowledge Base*
"""

    # === Acceptance Criteria ===
    elif any(term in question_lower for term in ["acceptance criteria"]):
        return """
## ✓ Acceptance Criteria

### What is Acceptance Criteria?
**Acceptance Criteria** are predefined conditions that a deliverable must meet to be accepted by stakeholders.

---

### 📊 Acceptance Criteria Formats

**1. Given-When-Then (BDD)**
Given [context], When [action], Then [outcome].
Example: Given valid credentials, When user logs in, Then dashboard is displayed.

**2. Rule-Oriented**
List of specific conditions.
Example: 
- Password must be at least 8 characters
- Email must be valid format
- Account locks after 3 failed attempts

---

### ✅ Good Acceptance Criteria Checklist
- **Testable**: Can we verify this?
- **Clear**: Is it unambiguous?
- **Concise**: Is it focused?
- **Complete**: Does it cover all scenarios?

---

### 👤 BA Role in Acceptance Criteria
Define acceptance criteria with stakeholders and ensure criteria are testable.

---

*Source: Professional Knowledge Base*
"""

    # === Quality Attributes ===
    elif any(term in question_lower for term in ["quality attributes", "non functional requirements"]):
        return """
## ⚡ Quality Attributes (Non-Functional Requirements)

### What are Quality Attributes?
**Quality Attributes** describe how well the system performs, rather than what it does.

---

### 📊 Key Quality Attributes

**1. Performance**
Response time, throughput. Example: "System shall respond in < 2 seconds."

**2. Scalability**
Ability to handle growth. Example: "Support 10,000 concurrent users."

**3. Availability**
Uptime percentage. Example: "99.9% availability (8.76 hours downtime/year)."

**4. Security**
Protection from threats. Example: "All data encrypted at rest and in transit."

**5. Usability**
Ease of use. Example: "New users can complete tasks without training."

**6. Reliability**
Consistency of operation. Example: "MTBF > 720 hours."

---

### 👤 BA Role in Quality Attributes
Elicit quality attribute requirements with clear, measurable criteria and ensure testability.

---

*Source: Professional Knowledge Base*
"""

    # === Business Rules ===
    elif any(term in question_lower for term in ["business rules"]):
        return """
## 📋 Business Rules

### What are Business Rules?
**Business Rules** are specific directives that define or govern business operations, decisions, and behavior.

---

### 📊 Types of Business Rules

**1. Definition Rules**
Define business terms. Example: "A premium customer is one with > $10,000 annual spend."

**2. Constraint Rules**
Limit or restrict actions. Example: "Orders cannot exceed $5,000 without approval."

**3. Derivation Rules**
Calculate or infer values. Example: "Discount = 10% if order value > $1,000."

**4. Action Rules**
Trigger specific actions. Example: "If inventory < 10, reorder automatically."

---

### 📋 Business Rules Format
**Rule ID:** BR-001
**Name:** Order Approval Limit
**Description:** Orders exceeding $5,000 require manager approval

---

### 👤 BA Role in Business Rules
Elicit rules from policies and experts, document clearly, and validate with stakeholders.

---

*Source: Professional Knowledge Base*
"""

    # === Domain Model ===
    elif any(term in question_lower for term in ["domain model"]):
        return """
## 🏛️ Domain Model

### What is a Domain Model?
A **Domain Model** is a conceptual representation of key business entities, their attributes, and relationships.

---

### 📊 Domain Model Components

**1. Entity**
Business object or concept. Example: Customer, Order, Product.

**2. Attribute**
Property of an entity. Example: Customer Name, Order Date, Product Price.

**3. Relationship**
Association between entities. Example: Customer places Order.

**4. Multiplicity**
Number of instances in relationship. Example: One Customer has many Orders.

---

### 📋 Example: E-commerce Domain
- **Customer** (1) to **(0..*) Order**
- **Order** (1) to **(1..*) OrderItem**
- **Product** (1) to **(0..*) OrderItem**

---

### 👤 BA Role in Domain Model
Identify key business entities, define attributes and relationships, and validate with SMEs.

---

*Source: Professional Knowledge Base*
"""

    # === Context Diagram ===
    elif any(term in question_lower for term in ["context diagram"]):
        return """
## 🔲 Context Diagram

### What is a Context Diagram?
A **Context Diagram** is a high-level view of a system showing its boundaries and interactions with external entities.

---

### 📊 Context Diagram Components

**1. System**
The system being modeled (shown as a single circle or box in the center).

**2. External Entity**
External person, system, or organization that interacts with the system. Example: Customer, Payment Gateway, Bank.

**3. Data Flow**
Movement of data between system and entities. Shown as arrows labeled with data content.

---

### 📋 Example: ATM Context Diagram
- **Entities**: Customer, Bank
- **Flows**: Card/PIN in, Cash out, Transaction data to bank

---

### 👤 BA Role in Context Diagram
Create context diagram during scoping, identify all external interfaces, and validate with stakeholders.

---

*Source: Professional Knowledge Base*
"""

    # === Sequence Diagram ===
    elif any(term in question_lower for term in ["sequence diagram"]):
        return """
## 📊 Sequence Diagram (UML)

### What is a Sequence Diagram?
A **Sequence Diagram** shows interactions between objects over time, emphasizing the order of messages.

---

### 📊 Sequence Diagram Elements

**1. Lifeline**
Vertical line representing an object over time. Shown as a box with a dashed line below.

**2. Actor**
User or external system initiating interactions.

**3. Message**
Communication between lifelines. Shown as arrows between lifelines.

**4. Activation Bar**
Period when an object is active processing a request.

---

### 📋 Example: Login Sequence
User → LoginForm: enter credentials
LoginForm → AuthService: validate()
AuthService → Database: query user
Database → AuthService: user data
AuthService → LoginForm: success/failure
LoginForm → User: show dashboard/error

---

### 👤 BA Role in Sequence Diagrams
Create diagrams for key scenarios, validate with stakeholders, and identify missing interactions.

---

*Source: Professional Knowledge Base*
"""

    # === Class Diagram ===
    elif any(term in question_lower for term in ["class diagram"]):
        return """
## 📐 Class Diagram (UML)

### What is a Class Diagram?
A **Class Diagram** shows the system's classes, attributes, methods, and relationships.

---

### 📊 Class Diagram Components

**1. Class**
Blueprint for objects. Shown as a box with three sections: Class Name, Attributes, Methods.

**2. Attribute**
Properties of the class. Example: -customerId: int, -name: String.

**3. Method**
Operations the class can perform. Example: +login(): boolean, +getOrders(): List.

**4. Relationship**
Associations between classes. Lines with symbols showing multiplicity.

---

### 📋 Multiplicity Notation
- **1**: Exactly one
- **0..1**: Zero or one
- *****: Zero or more
- **1..***: One or more

---

### 👤 BA Role in Class Diagrams
Identify business entities, define attributes and relationships, and validate with stakeholders.

---

*Source: Professional Knowledge Base*
"""

    # === Value Stream Mapping ===
    elif any(term in question_lower for term in ["value stream mapping", "vsm"]):
        return """
## 📈 Value Stream Mapping (VSM)

### What is VSM?
**Value Stream Mapping** visualizes the flow of materials and information required to deliver a product or service to customers.

---

### 📊 VSM Metrics

**1. Lead Time**
Total time from order to delivery. Example: 10 days from order to delivery.

**2. Processing Time**
Actual work time. Example: 2 hours of actual work.

**3. Wait Time**
Time between process steps. Example: 8 days waiting between steps.

**4. Value-Added Ratio**
Processing Time / Lead Time. Example: 2 hours / 10 days = 2.5% value-added.

---

### 👤 BA Role in VSM
Facilitate VSM workshops, map current state, and identify improvement opportunities.

---

*Source: Professional Knowledge Base*
"""

    # === SIPOC ===
    elif any(term in question_lower for term in ["sipoc"]):
        return """
## 📋 SIPOC Diagram

### What is SIPOC?
**SIPOC** is a high-level process mapping tool identifying Suppliers, Inputs, Process, Outputs, and Customers.

---

### 📊 SIPOC Components

**1. Suppliers**
Who provides inputs? Example: HR Department, IT Department.

**2. Inputs**
What resources are needed? Example: Offer letter, hardware, personal info.

**3. Process**
What steps are performed? Example: Collect documents, set up systems, assign equipment.

**4. Outputs**
What is produced? Example: Employee ID, email account, access badges.

**5. Customers**
Who receives outputs? Example: New Employee, Manager, Payroll.

---

### 📋 Example: Employee Onboarding SIPOC
| Suppliers | Inputs | Process | Outputs | Customers |
|-----------|--------|---------|---------|-----------|
| HR | Offer letter | 1. Collect docs | Employee ID | New Employee |
| IT | Hardware | 2. Set up systems | Email account | Manager |

---

### 👤 BA Role in SIPOC
Facilitate SIPOC sessions, identify all elements, and use as foundation for detailed analysis.

---

*Source: Professional Knowledge Base*
"""

    # === Five Whys ===
    elif any(term in question_lower for term in ["five whys", "5 whys"]):
        return """
## 🔍 Five Whys Technique

### What is Five Whys?
**Five Whys** is an iterative questioning technique to explore cause-and-effect and find the root cause of problems.

---

### 📊 Five Whys Example

**Problem:** The machine stopped working.

**1. Why?** → The circuit breaker tripped.
**2. Why?** → The machine was overloaded.
**3. Why?** → The bearing wasn't lubricated.
**4. Why?** → The lubrication pump wasn't working.
**5. Why?** → The pump filter was clogged.

**Root Cause:** Lubrication pump filter not on maintenance schedule.

---

### ✅ Best Practices
- Focus on the process, not people
- Base answers on facts and evidence
- Continue until you find a fixable root cause
- Verify the cause-and-effect logic

---

### 👤 BA Role in Five Whys
Facilitate sessions, document analysis, and identify process improvements.

---

*Source: Professional Knowledge Base*
"""

    # === Fishbone Diagram ===
    elif any(term in question_lower for term in ["fishbone", "ishikawa", "cause and effect"]):
        return """
## 🐟 Fishbone Diagram (Ishikawa)

### What is a Fishbone Diagram?
A **Fishbone Diagram** visualizes potential causes of a problem by categorizing them for systematic analysis.

---

### 📊 Common Cause Categories (6Ms)

**1. Man (People)**
Skills, training, fatigue, communication.

**2. Machine (Equipment)**
Tools, maintenance, calibration, software.

**3. Material (Raw materials)**
Quality, availability, specifications, consistency.

**4. Method (Process)**
Procedures, workflow, standards, policies.

**5. Measurement (Data)**
Accuracy, precision, frequency, tools.

**6. Mother Nature (Environment)**
Temperature, lighting, noise, location.

---

### 👤 BA Role in Fishbone
Facilitate sessions, categorize potential causes, and guide team to root causes.

---

*Source: Professional Knowledge Base*
"""

    # === Pareto Analysis ===
    elif any(term in question_lower for term in ["pareto", "80 20 rule"]):
        return """
## 📊 Pareto Analysis (80/20 Rule)

### What is Pareto Analysis?
**Pareto Analysis** is based on the 80/20 rule: roughly 80% of effects come from 20% of causes.

---

### 📊 Pareto Examples

**1. Problem Analysis**
80% of problems → 20% of causes.
Example: 80% of customer complaints come from 20% of defect types.

**2. Value Analysis**
80% of value → 20% of features.
Example: 80% of revenue comes from 20% of customers.

**3. Defect Analysis**
80% of defects → 20% of defect types.
Example: Focus on top 20% of defects to fix 80% of issues.

---

### 📋 Pareto Process
1. Identify problems/causes
2. Score or count each
3. Sort from highest to lowest
4. Calculate cumulative percentage
5. Focus on the vital few (top 20%)

---

### 👤 BA Role in Pareto
Collect data, create Pareto charts, and facilitate prioritization.

---

*Source: Professional Knowledge Base*
"""

    # === GENERIC RESPONSE ===
    else:
        cats = ', '.join(categories) if categories else 'General BA'
        topics = ', '.join(keywords[:3]) if keywords else 'BA concepts'
        
        return f"""
## 📊 Business Analysis Information

**Categories:** {cats}
**Topics:** {topics if topics else 'General BA'}

### Quick Reference Guide

| **Category** | **Key Topics** |
|--------------|----------------|
| **Core Concepts** | KPI, ROI, SLA, MVP, UAT, CRUD, RACI, Change Request, Risk Assessment, Impact Analysis, Root Cause Analysis, Cost-Benefit Analysis |
| **Methodologies** | Agile, Scrum, Kanban, Waterfall, BABOK, Lean, Six Sigma, DMAIC, Kaizen |
| **Requirements** | Functional/Non-functional, User Stories, Acceptance Criteria, Quality Attributes, Business Rules, Traceability Matrix, BRS, BRD, FRD, FRS, SRS |
| **Analysis Techniques** | SWOT, PESTLE, Gap Analysis, Five Whys, Fishbone Diagram, Pareto Analysis, Benchmarking |
| **Modeling** | Process Mapping, DFD, Decision Tables, Story Mapping, UML Diagrams, Value Stream Mapping, SIPOC, BPMN, Use Case Diagrams, Activity Diagrams, State Machine Diagrams |
| **Data & Metrics** | ETL, Data Dictionary, Metadata Management, Performance Baseline, Scalability Assessment, Data Modeling, ERD |
| **Design** | Wireframes, Mockups, Prototypes, UI Design, UX Process, Information Architecture, Screen Flows, Accessibility, Responsive Design, Design Systems |
| **Testing** | Usability Testing, A/B Testing, Heuristic Evaluation, User Testing |
| **Project & Delivery** | POC, Pilot, Technical Debt, Legacy Modernization, System Integration, Interoperability |

### How to Use This Assistant
Ask specific questions about any BA topic. For example:
- "Explain KPI and how to define them"
- "What is the difference between Agile and Waterfall?"
- "How to create a RACI matrix?"
- "Explain the UAT process"
- "What is a data dictionary?"
- "How to conduct root cause analysis?"
- "Explain the DMAIC framework"
- "What are wireframes and prototypes?"
- "Explain BPMN notation"
- "How to create use case diagrams?"
- "What is technical debt?"

*Ask a more specific question for detailed guidance!*

---

*Source: Professional Knowledge Base*
"""

# ---------------------------
# Main Function
# ---------------------------
def ask_ba_assistant(question: str) -> str:
    """Main function to handle BA queries"""
    
    question = question.strip()
    
    if not question:
        return "Please enter a question about IT-Business Analysis."
    
    # Check if BA-related
    is_related, keywords, categories = is_ba_related(question)
    
    if not is_related:
        return """❌ I specialize in IT-Business Analysis topics only.

### ✅ Try Asking About:
• **Core Concepts**: KPI, ROI, SLA, MVP, UAT, CRUD, RACI Matrix, Change Request
• **Methodologies**: Agile, Scrum, Waterfall, BABOK, Lean, Six Sigma, DMAIC
• **Analysis Techniques**: SWOT, PESTLE, Gap Analysis, Root Cause Analysis, Five Whys
• **Modeling**: Process Mapping, DFD, Decision Tables, Story Mapping, UML, BPMN
• **Data & Metrics**: ETL, Data Dictionary, Metadata Management, Benchmarking
• **Design**: Wireframes, UI/UX, Information Architecture, Screen Flows
• **Testing**: Usability Testing, A/B Testing, Heuristic Evaluation
• **Project & Delivery**: POC, Pilot, Technical Debt, System Integration

*Or ask a specific BA question using the terms above!*
"""
    
    # Get local response
    response = get_local_response(question, keywords, categories)
    return response

# ---------------------------
# Build Interface
# ---------------------------
def build_app():
    """Build the Gradio interface"""
    
    with gr.Blocks(theme=gr.themes.Soft(), title="IT Business Analysis Assistant") as demo:
        gr.Markdown(f"""
        <div style='text-align:center;'>
            <h1>📊 Professional IT Business Analysis Assistant</h1>
            <p><i>Comprehensive guide for BA concepts - {Config.APP_VERSION}</i></p>
            <p style='font-size:0.9em; color:#666;'>🟢 LOCAL KNOWLEDGE BASE | 100+ BA Concepts | No API Required</p>
        </div>
        """)
        
        with gr.Row():
            with gr.Column(scale=2):
                question = gr.Textbox(
                    label="Ask your BA question",
                    placeholder="e.g., What is KPI? Explain RACI matrix, How to create a data dictionary?",
                    lines=3
                )
                submit_btn = gr.Button("🔍 Get Guidance", variant="primary", size="lg")
                
            with gr.Column(scale=3):
                output = gr.Textbox(
                    label="Response",
                    lines=25,
                    interactive=False,
                    show_copy_button=True
                )
        
        # Quick reference section
        with gr.Accordion("📋 Quick Reference - Click to expand", open=False):
            gr.Markdown("""
            ### Popular Topics by Category
            
            | **Category** | **Sample Topics** |
            |--------------|-------------------|
            | **Core Concepts** | KPI, ROI, SLA, MVP, UAT, CRUD, RACI Matrix, Change Request, Risk Assessment |
            | **Methodologies** | Agile, Scrum, Kanban, Waterfall, Lean, Six Sigma, DMAIC, Kaizen |
            | **Analysis** | SWOT, PESTLE, Gap Analysis, Root Cause Analysis, Five Whys, Fishbone |
            | **Modeling** | Process Mapping, DFD, Decision Tables, Story Mapping, UML, BPMN, Use Cases |
            | **Data** | ETL, Data Dictionary, Metadata Management, Benchmarking, Data Modeling |
            | **Design** | Wireframes, UI/UX, IA, Screen Flows, Accessibility, Design Systems |
            | **Testing** | Usability Testing, A/B Testing, Heuristic Evaluation |
            | **Technical** | POC, Pilot, Technical Debt, System Integration, Scalability |
            
            *Type any of these terms to get detailed explanations!*
            """)
        
        gr.Examples(
            examples=[
                ["What is KPI and how to define it?"],
                ["Explain RACI matrix with example"],
                ["How to create a data dictionary?"],
                ["What is the difference between Agile and Waterfall?"],
                ["Explain the DMAIC process"],
                ["How to conduct root cause analysis with Five Whys?"],
                ["What is ETL?"],
                ["Explain UAT process"],
                ["What is a change request?"],
                ["How to do risk assessment?"],
                ["Explain CRUD operations"],
                ["What is MVP?"],
                ["What are wireframes and prototypes?"],
                ["Explain BPMN notation"],
                ["How to create use case diagrams?"],
                ["What is technical debt?"]
            ],
            inputs=question,
            outputs=output,
            fn=ask_ba_assistant,
            cache_examples=False
        )
        
        # Footer
        gr.Markdown("""
        <div style='text-align:center; margin-top:20px; font-size:0.8em; color:#999;'>
            <p>Professional IT Business Analysis Assistant | Local Knowledge Base | No API Required</p>
            <p>Based on BABOK Guide and Industry Best Practices</p>
        </div>
        """)
        
        submit_btn.click(fn=ask_ba_assistant, inputs=question, outputs=output)
        question.submit(fn=ask_ba_assistant, inputs=question, outputs=output)
    
    return demo

# ---------------------------
# Launch
# ---------------------------
if __name__ == "__main__":
    print("=" * 50)
    print("📊 Professional IT Business Analysis Assistant")
    print("=" * 50)
    print(f"Version: {Config.APP_VERSION}")
    print(f"Mode: LOCAL KNOWLEDGE BASE (No API Required)")
    print(f"Keywords loaded: {len(ALL_KEYWORDS)}")
    print(f"Categories: {len(BA_KEYWORDS)}")
    print("=" * 50)
    print("\n🚀 Starting application...")
    
    demo = build_app()
    
    # Launch with local settings
    demo.launch(
        server_name="0.0.0.0",  # Listen on all interfaces
        server_port=7860,
        share=False,
        show_error=True
    )