DialNexa agents are powered by LLMs that handle many languages. This means you can write a prompt in English and have the agent respond in Hindi, Spanish, or another language — but native-language prompts produce better results. This page covers the tradeoffs, how to write prompts for specific languages, and how to handle code-switching scenarios like Hinglish.
English prompts vs. native-language prompts
| Approach | Pros | Cons |
|---|
| English prompt | Easier to write and review, familiar tooling, LLM translates automatically | Output may sound formal or unnatural, idiomatic expressions may not translate well, harder to control tone |
| Native-language prompt | Precise tone and register control, idiomatic phrasing, culturally appropriate formality level | Requires native speaker review, harder to maintain, LLM may mix languages if prompt is inconsistent |
Recommendation: write prompts in the language your callers speak. The quality difference is significant for languages where formal/informal register matters (Hindi, French, Spanish, Arabic). An English prompt that instructs the agent to “be friendly and conversational” does not reliably translate that register into Hindi — you need to write the prompt in Hindi with appropriate informal vocabulary.
Writing prompts in Hindi
Hindi has a formal/informal distinction that directly affects how callers perceive the agent. Most voice agents should use informal (तुम/आप with colloquial phrasing) rather than highly formal (शुद्ध हिंदी) phrasing, unless the use case demands it (e.g., government services, formal banking).
Common mistakes:
- Forcing Shuddha Hindi (pure Hindi) vocabulary: callers in urban India expect words like “appointment”, “booking”, “confirm” in their natural English forms — translating these to Sanskrit-derived Hindi equivalents sounds unnatural. Write
अपॉइंटमेंट (transliterated) rather than the formal Hindi equivalent.
- Wrong level of formality: use
आप (formal you) as the default for customer-facing agents unless your product targets a very young or casual demographic.
- Inconsistent script: pick Devanagari and stay consistent. Do not mix Romanized Hindi and Devanagari in the same prompt — it confuses the LLM and produces inconsistent output.
Prompt structure example:
आप DialNexa के लिए एक helpful customer service agent हैं।
आपका काम callers की booking और appointment related queries solve करना है।
हमेशा polite और professional रहें।
अगर caller कोई जानकारी मांगे जो आपके पास नहीं है, तो clearly बताएं कि आप इसमें help नहीं कर सकते।
Note how this example naturally mixes Hindi and English — this is Hinglish, which is how urban Indian callers actually speak and how agents should respond.
Writing for code-switching (Hinglish)
Hinglish is a blend of Hindi and English used naturally by hundreds of millions of speakers. It is not inconsistent prompting — it is a legitimate register. When writing Hinglish prompts:
- Use English for technical or product vocabulary: “appointment”, “booking”, “OTP”, “confirm”, “cancel”, “update” — keep these in English
- Use Hindi for connective tissue: sentence structure, conjunctions, conversational phrases
- Use casual Hindi politeness:
please, sorry, theek hai, and ji usually sound more natural than formal Hindi.
- Avoid hyper-formal Hindi:
कृपया अपना विवरण प्रदान करें sounds bureaucratic; please अपना details बताएं is closer to how callers actually speak.
Hinglish Map
The Hinglish Map is a word substitution table configured in Settings > Speech > Hinglish Map. It replaces formal Hindi words with natural code-switched alternatives at the text normalization layer, before TTS synthesis.
When the map is configured, DialNexa also tracks the caller’s current language style during the call. The runtime can distinguish English, Devanagari Hindi, Romanized Hindi, and mixed Hinglish, then asks the LLM to answer in the same style and script. The map still matters because it softens formal Hindi wording before the response reaches the voice provider.
How to configure:
Open Hinglish Map settings
Go to your agent’s Settings > Speech > Hinglish Map.
Add substitution pairs
Each entry has a Source (formal Hindi word or phrase) and a Replacement (natural Hinglish alternative).| Source | Replacement |
|---|
| कृपया | please |
| धन्यवाद | thank you |
| प्रतीक्षा करें | wait करें |
| जानकारी | information |
| सहायता | help |
Save and test
Save the map. Place a test call and verify that the replaced words sound natural in context.
Start with 5 to 10 high-frequency formal words. Adding too many substitutions at once makes it hard to diagnose which replacement caused unnatural output. Expand the map incrementally.
Testing multilingual prompts
Use real callers from your target population. Linguistic quality assessment requires native speakers — automated testing cannot reliably detect unnatural phrasing or register mismatches.
Check Session History for LLM responses. In Monitor > Session History, inspect the LLM output events. The raw LLM output shows you exactly what text was generated before TTS. If the output has unexpected language mixing or formal vocabulary, the prompt needs revision.
Watch for language drift. Long conversations can cause LLM output to drift toward English, especially if the prompt has English sections. Reinforce language requirements explicitly in the prompt:
हमेशा Hinglish में respond करें। कभी भी pure English में respond न करें।
Test edge cases:
- What happens when the caller uses formal Hindi but your agent is configured for Hinglish?
- What happens when the caller switches to English mid-call?
- Does the agent maintain register consistency across a long call?
Common mistakes to avoid
- Using English-only persona descriptions: “You are a friendly assistant” works for English agents; translate the persona description to the target language
- Mixing scripts in prompts: do not alternate between Devanagari and Roman script for Hindi within the same sentence in the prompt
- Ignoring cultural formality norms: Arabic and formal Hindi both have politeness conventions that differ from English; research the appropriate register for your use case
- Over-relying on the LLM to translate formality: the LLM will translate content correctly but may not match the intended register without explicit guidance in the prompt
- Not testing with phone audio: text-based testing misses pronunciation issues that only appear in TTS output over a phone call