Skip to content

AI Engine: More Than Just Translation

Why doesn’t DevLingo just use a dictionary API? Simple API lookups return static, context-free information. DevLingo’s AI engine does three things that dictionaries cannot.

A dictionary says “deploy” means “to deploy.” But developers need to know:

ScenarioMeaningExample
Deploying an appRelease to production”We deployed the new version to production.”
Provisioning resourcesAllocate/enable resources”Deploy additional servers to handle traffic.”
Tactical (military)Spread out, position”The team is deployed across different time zones.”

The DevLingo AI knows you’re reading code in Xcode, so it emphasizes the first meaning. If you see “deploy” in HR software, the third meaning may be more relevant.

{ "sourceApp": "com.apple.dt.Xcode" }
→ AI adjusts response style: technically oriented, code-related examples prioritized
{ "sourceApp": "com.tinyspeck.slackmacgap" }
→ AI adjusts response style: team communication, more conversational

:::tip App Awareness DevLingo obtains the current active app’s Bundle Identifier via NSWorkspace and passes it to Claude. The AI adjusts its response accordingly. :::

A dictionary returns a block of text. The DevLingo AI returns structured JSON:

{
"word": "idempotent",
"ipa": "/ɪˈdɛmpətənt/",
"pos": "adjective",
"definition_en": "Describing an operation that, when applied multiple times, produces the same result as when applied once.",
"meaning_zh": "Idempotent; producing the same result whether applied once or multiple times",
"examples": [
{
"en": "Ensure your API endpoints are idempotent to handle retry requests safely.",
"zh": "Ensure API endpoints are idempotent to safely handle retry requests.",
"context": "API design"
},
{
"en": "This function's idempotent nature makes it safe to call multiple times.",
"zh": "This function's idempotent nature makes it safe to call multiple times.",
"context": "Function design"
}
],
"synonyms": [
{
"word": "repeatable",
"difference": "More generic; refers to any repeatable operation. 'idempotent' is more technical and precise."
}
],
"collocations": [
"idempotent operation",
"idempotent function",
"idempotent API"
],
"grammar_notes": "Adjective, uncountable. Commonly used as an attributive or predicate in technical documentation.",
"l1_tips": {
"zh": "There is no everyday equivalent in Chinese. Remember that 'idempotent' is a mathematical/programming term. In technical discussions, using the English term directly is more common."
},
"tech_pronunciation": {
"ipa": "/ɪˈdɛmpətənt/",
"common_mispronounce": "i-DEM-po-tent (incorrect; stress should be on DEM)",
"correct_stress": "i-**DEM**-pu-tunt",
"etymology": "From mathematical terminology, derived from Latin 'idem' (same) and 'potent' (powerful)"
}
}

Each field corresponds to a different section of the card in the UI. Not a wall of text, but carefully organized learning material.

{
"phrase": "rubber ducking",
"type": "compound (noun phrase)",
"register": "informal / tech culture",
"definition_en": "A debugging method where you explain your code to a rubber duck (or any object), often revealing bugs through the act of articulation.",
"meaning_zh": "A debugging method where explaining code to a rubber duck (or any object) often reveals problems through the process of articulation.",
"stress_pattern": "RUB-ber DUCK-ing",
"usage_patterns": [
{
"pattern": "[Subject] [is/uses] rubber ducking",
"example": "I've been rubber ducking this problem for 10 minutes and just found the issue.",
"zh": "I've been rubber ducking this problem for 10 minutes and found the issue."
},
{
"pattern": "[Let's] do some rubber ducking [on X]",
"example": "Let's do some rubber ducking on this algorithm.",
"zh": "Let's do some rubber ducking on this algorithm."
}
],
"alternatives": [
{
"phrase": "debugging by explanation",
"note": "More formal; lacks the cultural flair of 'rubber ducking'"
},
{
"phrase": "talk it out",
"note": "More colloquial; doesn't specifically refer to a debugging method"
}
]
}

When the input is a developer term, the AI provides additional information:

Word: latency
Standard output: definition, examples, pronunciation...
Additional output (technical terms only):
• Related metrics: milliseconds (ms) / microseconds (μs)
• Contrasting concepts: throughput, bandwidth
• Real-world context: What "P99 latency < 100ms" means
• Industry benchmarks: Typical network latency is 50ms; poor is 500ms+

Not “the cat sat on the mat,” but rather:

Word: concurrent
Examples (from real development):
1. "This function is not concurrent-safe; you need to add locking."
→ Code review scenario
2. "We redesigned the system to handle concurrent requests efficiently."
→ Architecture design scenario
3. "Make sure your HTTP client supports concurrent connections."
→ Performance optimization scenario

Based on the user’s native language, the AI proactively points out common pitfalls:

User: Chinese native speaker
Word: article / the / a
AI tip:
"Common issue for Chinese speakers: Chinese has no articles, but English
distinguishes between the definite article (the) and indefinite article (a/an).
Incorrect: 'I saw cat' → 'I saw a cat' or 'I saw the cat' (depending on context)
Mnemonic: Every countable noun in English typically requires an article.
In Chinese, 'cat' is just 'cat,' but in English you must say 'a cat' or 'the cat.'"

:::note L1 Interference This is what sets DevLingo apart. Standard dictionaries won’t tell you “the reason you might misuse this word is because of your native language background.” :::

Why DevLingo chose Claude:

  1. Strong structured output: Claude excels at generating formatted JSON with high reliability
  2. Deep context understanding: Claude can understand app context, code context, and L1 interference
  3. Developer-friendly: Claude’s understanding of technical terms, code, and development workflows surpasses general-purpose LLMs
  4. Controllability: Through prompt engineering, DevLingo can precisely control output format and quality

DevLingo’s Claude calls include a carefully designed prompt template:

You are an English learning assistant for developers.
The user selected: "{selectedText}"
Mode: {mode}
User's native language: {userLanguage}
Current application: {sourceApp}
Surrounding context: "{context}"
Respond with JSON in the following structure:
{
"mode": "word|phrase|sentence|paragraph|express",
... [detailed schema]
}
Important:
1. Examples must be from software development context
2. Provide 2-3 examples per item
3. For native speakers of {userLanguage}, highlight common interference patterns
4. If applicable, note pronunciation and stress patterns
5. Keep definitions concise (< 20 words)

This prompt ensures:

  • Consistent output format
  • Examples from development contexts
  • L1 interference is addressed
  • Results are targeted for learning
FeatureDictionary APIDevLingo AI
Basic definition
Multiple examples✓ (usually generic)✓ (all from tech scenarios)
Context awareness✓ (knows which app you’re using)
L1 interference tips
Structured output✗ (just text)✓ (JSON, UI-friendly)
Technical term enrichment✓ (etymology, industry benchmarks, etc.)
Synonym differentiation✗ (just lists synonyms)✓ (explains differences)
Pronunciation & IPA✓ (partial)✓ (complete + 4 accent variants)

:::note Why Not Use AI for Everything DevLingo’s tiered lookup system ensures:

  • Common vocabulary (local database hit): 0ms AI, 100% fast
  • Cache hit (user has looked it up before): 0ms AI, 100% fast
  • Rare vocabulary (AI call): <2s to complete, still fast

This means 95% of user queries require no API call, reducing costs while improving the experience. :::

DevLingo’s AI engine isn’t designed for “translation” — it’s designed for “understanding and teaching.” It knows what you’re doing, knows your language background, and knows the most effective way to teach you.