Spaces:
Paused
Paused
Commit ·
0bb414f
1
Parent(s): 4ec2da8
Implement platform pricing override rule and expand brand misspelling correction filter
Browse files- app.py +8 -1
- scripts/mintoak/chat_server.py +8 -1
- scripts/mintoak/evaluate_rag.py +1 -1
- scripts/mintoak/prepare_data.py +1 -1
- scripts/mintoak/run_eval_transformers.py +14 -0
app.py
CHANGED
|
@@ -242,6 +242,13 @@ QUERY_ENHANCEMENT_RULES = [
|
|
| 242 |
"prompt_note": "Describe Mintoak's collaborative culture, its team culture, and list its core values (Curiosity, Diversity, Excellence, Empowerment, Integrity, Innovation, Impact).",
|
| 243 |
"top_k": 2
|
| 244 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
{
|
| 246 |
"keywords": ["ceo", "founder", "founders", "founded", "cpo", "leadership", "team", "management", "raman", "khanduja", "sanjay", "nazareth", "rama", "tadepalli", "kabeer", "jain", "rohit", "ramana"],
|
| 247 |
"expansion": "Mintoak co-founders and executive leadership team: Raman Khanduja (CEO), Sanjay Nazareth (COO), Rama Tadepalli (CPO), Kabeer Jain (CTO), and Rohit Ramana (CFO). Nilesh Lonkar is the VP of Engineering.",
|
|
@@ -442,7 +449,7 @@ def clean_response(text: str, allow_lead_capture: bool = True) -> str:
|
|
| 442 |
else:
|
| 443 |
# Programmatic Sanitization Filters (Zero-Tolerance Enforcement)
|
| 444 |
# Brand name correction
|
| 445 |
-
text_no_lead = re.sub(r'(?<![\./])\b(MintOak|MINTOAK|mintoak)\b(?![\./])', 'Mintoak', text_no_lead)
|
| 446 |
|
| 447 |
# Banned words replacement
|
| 448 |
text_no_lead = re.sub(r'\bseamlessly\b', 'efficiently', text_no_lead, flags=re.I)
|
|
|
|
| 242 |
"prompt_note": "Describe Mintoak's collaborative culture, its team culture, and list its core values (Curiosity, Diversity, Excellence, Empowerment, Integrity, Innovation, Impact).",
|
| 243 |
"top_k": 2
|
| 244 |
},
|
| 245 |
+
{
|
| 246 |
+
"keywords": ["pricing", "price", "cost", "charge", "charges", "fee", "fees", "rate", "rates", "pricing plans", "subscription cost", "licensing cost", "kharcha", "costing", "charges list", "fees structure"],
|
| 247 |
+
"expansion": "Mintoak platform pricing is customized and tailored for each bank or merchant acquirer based on deployment model, transaction volume, and integrations.",
|
| 248 |
+
"override": True,
|
| 249 |
+
"prompt_note": "State that Mintoak's platform pricing is customized and tailored based on the deployment scale, transaction volume, and product integration requirements. Request the user to provide their name and email address so that the Mintoak sales team can share a detailed proposal or tailored quote.",
|
| 250 |
+
"top_k": 1
|
| 251 |
+
},
|
| 252 |
{
|
| 253 |
"keywords": ["ceo", "founder", "founders", "founded", "cpo", "leadership", "team", "management", "raman", "khanduja", "sanjay", "nazareth", "rama", "tadepalli", "kabeer", "jain", "rohit", "ramana"],
|
| 254 |
"expansion": "Mintoak co-founders and executive leadership team: Raman Khanduja (CEO), Sanjay Nazareth (COO), Rama Tadepalli (CPO), Kabeer Jain (CTO), and Rohit Ramana (CFO). Nilesh Lonkar is the VP of Engineering.",
|
|
|
|
| 449 |
else:
|
| 450 |
# Programmatic Sanitization Filters (Zero-Tolerance Enforcement)
|
| 451 |
# Brand name correction
|
| 452 |
+
text_no_lead = re.sub(r'(?<![\./])\b(MintOak|MINTOAK|mintoak|Mentoak|mentoak|Mintoack|mintoack)\b(?![\./])', 'Mintoak', text_no_lead)
|
| 453 |
|
| 454 |
# Banned words replacement
|
| 455 |
text_no_lead = re.sub(r'\bseamlessly\b', 'efficiently', text_no_lead, flags=re.I)
|
scripts/mintoak/chat_server.py
CHANGED
|
@@ -169,6 +169,13 @@ QUERY_ENHANCEMENT_RULES = [
|
|
| 169 |
"prompt_note": "Describe Mintoak's collaborative culture, its team culture, and list its core values (Curiosity, Diversity, Excellence, Empowerment, Integrity, Innovation, Impact).",
|
| 170 |
"top_k": 2
|
| 171 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
{
|
| 173 |
"keywords": ["ceo", "founder", "founders", "founded", "cpo", "leadership", "team", "management", "raman", "khanduja", "sanjay", "nazareth", "rama", "tadepalli", "kabeer", "jain", "rohit", "ramana"],
|
| 174 |
"expansion": "Mintoak co-founders and executive leadership team: Raman Khanduja (CEO), Sanjay Nazareth (COO), Rama Tadepalli (CPO), Kabeer Jain (CTO), and Rohit Ramana (CFO). Nilesh Lonkar is the VP of Engineering.",
|
|
@@ -352,7 +359,7 @@ def clean_response(text: str, allow_lead_capture: bool = True) -> str:
|
|
| 352 |
else:
|
| 353 |
# Programmatic Sanitization Filters (Zero-Tolerance Enforcement)
|
| 354 |
# Brand name correction
|
| 355 |
-
text_no_lead = re.sub(r'(?<![\./])\b(MintOak|MINTOAK|mintoak)\b(?![\./])', 'Mintoak', text_no_lead)
|
| 356 |
|
| 357 |
# Banned words replacement
|
| 358 |
text_no_lead = re.sub(r'\bseamlessly\b', 'efficiently', text_no_lead, flags=re.I)
|
|
|
|
| 169 |
"prompt_note": "Describe Mintoak's collaborative culture, its team culture, and list its core values (Curiosity, Diversity, Excellence, Empowerment, Integrity, Innovation, Impact).",
|
| 170 |
"top_k": 2
|
| 171 |
},
|
| 172 |
+
{
|
| 173 |
+
"keywords": ["pricing", "price", "cost", "charge", "charges", "fee", "fees", "rate", "rates", "pricing plans", "subscription cost", "licensing cost", "kharcha", "costing", "charges list", "fees structure"],
|
| 174 |
+
"expansion": "Mintoak platform pricing is customized and tailored for each bank or merchant acquirer based on deployment model, transaction volume, and integrations.",
|
| 175 |
+
"override": True,
|
| 176 |
+
"prompt_note": "State that Mintoak's platform pricing is customized and tailored based on the deployment scale, transaction volume, and product integration requirements. Request the user to provide their name and email address so that the Mintoak sales team can share a detailed proposal or tailored quote.",
|
| 177 |
+
"top_k": 1
|
| 178 |
+
},
|
| 179 |
{
|
| 180 |
"keywords": ["ceo", "founder", "founders", "founded", "cpo", "leadership", "team", "management", "raman", "khanduja", "sanjay", "nazareth", "rama", "tadepalli", "kabeer", "jain", "rohit", "ramana"],
|
| 181 |
"expansion": "Mintoak co-founders and executive leadership team: Raman Khanduja (CEO), Sanjay Nazareth (COO), Rama Tadepalli (CPO), Kabeer Jain (CTO), and Rohit Ramana (CFO). Nilesh Lonkar is the VP of Engineering.",
|
|
|
|
| 359 |
else:
|
| 360 |
# Programmatic Sanitization Filters (Zero-Tolerance Enforcement)
|
| 361 |
# Brand name correction
|
| 362 |
+
text_no_lead = re.sub(r'(?<![\./])\b(MintOak|MINTOAK|mintoak|Mentoak|mentoak|Mintoack|mintoack)\b(?![\./])', 'Mintoak', text_no_lead)
|
| 363 |
|
| 364 |
# Banned words replacement
|
| 365 |
text_no_lead = re.sub(r'\bseamlessly\b', 'efficiently', text_no_lead, flags=re.I)
|
scripts/mintoak/evaluate_rag.py
CHANGED
|
@@ -207,7 +207,7 @@ def clean_response(text: str, allow_lead_capture: bool = True) -> str:
|
|
| 207 |
else:
|
| 208 |
# Programmatic Sanitization Filters (Zero-Tolerance Enforcement)
|
| 209 |
# Brand name correction
|
| 210 |
-
text_no_lead = re.sub(r'(?<![\./])\b(MintOak|MINTOAK|mintoak)\b(?![\./])', 'Mintoak', text_no_lead)
|
| 211 |
|
| 212 |
# Banned words replacement
|
| 213 |
text_no_lead = re.sub(r'\bseamlessly\b', 'efficiently', text_no_lead, flags=re.I)
|
|
|
|
| 207 |
else:
|
| 208 |
# Programmatic Sanitization Filters (Zero-Tolerance Enforcement)
|
| 209 |
# Brand name correction
|
| 210 |
+
text_no_lead = re.sub(r'(?<![\./])\b(MintOak|MINTOAK|mintoak|Mentoak|mentoak|Mintoack|mintoack)\b(?![\./])', 'Mintoak', text_no_lead)
|
| 211 |
|
| 212 |
# Banned words replacement
|
| 213 |
text_no_lead = re.sub(r'\bseamlessly\b', 'efficiently', text_no_lead, flags=re.I)
|
scripts/mintoak/prepare_data.py
CHANGED
|
@@ -286,7 +286,7 @@ def generate_synthetic_dialogue(chunks_db):
|
|
| 286 |
text = re.sub(r'\b(?:software|tool|app) Mintoak\b', 'Mintoak platform', text, flags=re.I)
|
| 287 |
|
| 288 |
# Force Mintoak capitalization
|
| 289 |
-
text = re.sub(r'(?<![\./])\b(MintOak|MINTOAK|mintoak)\b(?![\./])', 'Mintoak', text)
|
| 290 |
return text
|
| 291 |
|
| 292 |
# 1. Generate Positive Examples (grounded QA)
|
|
|
|
| 286 |
text = re.sub(r'\b(?:software|tool|app) Mintoak\b', 'Mintoak platform', text, flags=re.I)
|
| 287 |
|
| 288 |
# Force Mintoak capitalization
|
| 289 |
+
text = re.sub(r'(?<![\./])\b(MintOak|MINTOAK|mintoak|Mentoak|mentoak|Mintoack|mintoack)\b(?![\./])', 'Mintoak', text)
|
| 290 |
return text
|
| 291 |
|
| 292 |
# 1. Generate Positive Examples (grounded QA)
|
scripts/mintoak/run_eval_transformers.py
CHANGED
|
@@ -96,6 +96,20 @@ QUERY_ENHANCEMENT_RULES = [
|
|
| 96 |
"prompt_note": "State that Kabeer Jain is Mintoak's Chief Technology Officer (CTO) and Co-founder.",
|
| 97 |
"top_k": 2
|
| 98 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
{
|
| 100 |
"keywords": ["ceo", "founder", "founders", "founded", "cpo", "leadership", "team", "management", "raman", "khanduja", "sanjay", "nazareth", "rama", "tadepalli", "kabeer", "jain", "rohit", "ramana"],
|
| 101 |
"expansion": "Mintoak co-founders and executive leadership team: Raman Khanduja (CEO), Sanjay Nazareth (COO), Rama Tadepalli (CPO), Kabeer Jain (CTO), and Rohit Ramana (CFO). Nilesh Lonkar is the VP of Engineering.",
|
|
|
|
| 96 |
"prompt_note": "State that Kabeer Jain is Mintoak's Chief Technology Officer (CTO) and Co-founder.",
|
| 97 |
"top_k": 2
|
| 98 |
},
|
| 99 |
+
{
|
| 100 |
+
"keywords": ["culture", "work culture", "life at mintoak", "work environment", "mintoak's culture", "values", "core values", "team culture"],
|
| 101 |
+
"expansion": "About Us | Mintoak | SaaS | FinTech. Mintoak values: Curiosity (Fostering learning), Diversity (Embracing differences), Excellence (Striving towards the highest standards), Empowerment (Fostering confidence, autonomy, and growth), Integrity (Honoring commitments), Innovation (Challenging status quo), Impact (Driving meaningful outcomes). Collaboration is at the heart of our culture. We encourage networking, emotional intelligence, and cross-functional teamwork to drive growth and success together.",
|
| 102 |
+
"override": True,
|
| 103 |
+
"prompt_note": "Describe Mintoak's collaborative culture, its team culture, and list its core values (Curiosity, Diversity, Excellence, Empowerment, Integrity, Innovation, Impact).",
|
| 104 |
+
"top_k": 2
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"keywords": ["pricing", "price", "cost", "charge", "charges", "fee", "fees", "rate", "rates", "pricing plans", "subscription cost", "licensing cost", "kharcha", "costing", "charges list", "fees structure"],
|
| 108 |
+
"expansion": "Mintoak platform pricing is customized and tailored for each bank or merchant acquirer based on deployment model, transaction volume, and integrations.",
|
| 109 |
+
"override": True,
|
| 110 |
+
"prompt_note": "State that Mintoak's platform pricing is customized and tailored based on the deployment scale, transaction volume, and product integration requirements. Request the user to provide their name and email address so that the Mintoak sales team can share a detailed proposal or tailored quote.",
|
| 111 |
+
"top_k": 1
|
| 112 |
+
},
|
| 113 |
{
|
| 114 |
"keywords": ["ceo", "founder", "founders", "founded", "cpo", "leadership", "team", "management", "raman", "khanduja", "sanjay", "nazareth", "rama", "tadepalli", "kabeer", "jain", "rohit", "ramana"],
|
| 115 |
"expansion": "Mintoak co-founders and executive leadership team: Raman Khanduja (CEO), Sanjay Nazareth (COO), Rama Tadepalli (CPO), Kabeer Jain (CTO), and Rohit Ramana (CFO). Nilesh Lonkar is the VP of Engineering.",
|