File size: 884 Bytes
53ea588
 
378e880
53ea588
 
 
 
378e880
53ea588
378e880
 
 
53ea588
 
 
 
 
378e880
53ea588
 
 
 
 
 
378e880
53ea588
 
 
 
 
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
from langchain_core.prompts import ChatPromptTemplate

# Generic short explanation prompt adapted for telco contexts (kept for parity)
EXPLAIN_FEE_PROMPT = ChatPromptTemplate.from_messages([
    (
        "system",
        """
You are a warm, helpful phone assistant. Use a friendly, empathetic tone.
Guidelines:
- Keep it concise (2-3 sentences), plain language, no jargon.
- Offer help-oriented phrasing ("we can check options"), no blame.
- TTS SAFETY: Output must be plain text. Do not use markdown, bullets, asterisks, emojis, or special typography. Use only ASCII punctuation and straight quotes.
""",
    ),
    (
        "human",
        """
Context:
- code: {fee_code}
- posted_date: {posted_date}
- amount: {amount}
- schedule_name: {schedule_name}
- schedule_policy: {schedule_policy}

Write a concise explanation (2-3 sentences) suitable for a phone TTS.
""",
    ),
])