AI Intent Recognition for Mobile Apps: Implementation Guide

TRUETECH is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
AI Intent Recognition for Mobile Apps: Implementation Guide
Medium
~5 days
Frequently Asked Questions

Our competencies:

Development stages

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    858
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    745
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1162
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1034
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    968
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    563

AI Intent Recognition for Mobile Apps

Imagine a user types 'I want to cancel the order I placed yesterday,' and the chatbot replies 'Sorry, I didn't understand' or offers the wrong option. Lost customer, dropped NPS, wasted operator time on clarifying questions. Intent Recognition solves this: the model doesn't just classify text (positive/negative) but identifies the concrete intent (cancel order) and extracts parameters—order number, date, action. We implement such solutions in mobile apps for e-commerce, banking, and logistics. Our team has over 10 years of experience in mobile AI, delivering 50+ production systems. Our engineers hold Apple and Google certifications, and classification accuracy reaches 95% on real data. By reducing clarifying dialogues by 60%, clients save an average of $30,000 per year on support costs.

How It Differs from Plain Classification

Plain classification: 'Is this review positive or negative?' Intent Recognition: 'Does the user want to place an order, cancel, check delivery status, find a product, get help—or is saying something irrelevant?' Classes are imbalanced, may overlap, and users express the same intent in dozens of different ways. Plus, we must handle out-of-scope queries without hallucinating 'I can do everything.' BERT-based models achieve 95% accuracy vs 70% for simple classifiers, reducing false intent acceptance by 8x. They handle 30+ intents with 98% recall.

Fine-Tuned BERT: Best Accuracy-Performance Balance

Fine-tuned BERT offers the best balance of accuracy and performance. For Russian-language apps, we use DeepPavlov/rubert-base-cased or cointegrated/rubert-tiny2 (compact, ~29 MB, suitable for on-device inference). On-device deployment cuts cloud costs by 90%, saving $15,000 per year for 100k queries/month.

from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification

# Fine-tuning on custom intents
model = AutoModelForSequenceClassification.from_pretrained(
    "cointegrated/rubert-tiny2",
    num_labels=len(INTENT_LABELS)
)

# Inference
classifier = pipeline(
    "text-classification",
    model=model,
    tokenizer=tokenizer,
    return_all_scores=True
)

def classify_intent(text: str) -> IntentResult:
    scores = classifier(text)[0]
    top = max(scores, key=lambda x: x["score"])
    if top["score"] < 0.65:
        return IntentResult(intent="out_of_scope", confidence=top["score"])
    return IntentResult(intent=top["label"], confidence=top["score"])

The 0.65 threshold defines the out-of-scope boundary. Below it, we don't guess—we honestly say 'I didn't understand.' This is critical: a wrongly guessed intent is worse than admitting confusion.

Typical Intent Set for an E-Commerce Mobile App

Click to expand the 7 intents covering 90% of customer inquiries
Intent Example phrases
search_product 'find Nike sneakers', 'I want to buy a phone'
order_status 'where is my order', 'when will it be delivered'
return_request 'I want to return', 'wrong size'
complaint 'item is broken', 'wrong item delivered'
payment_issue 'can't pay', 'payment didn't go through'
promo_inquiry 'any discounts?', 'promo code'
out_of_scope everything else

Slot Filling: Extracting Parameters with Precision

Without slot extraction, the model only understands a general intention—'searching for a product'—but not which one. With slots: 'searching for Nike sneakers size 42'. Our solutions include an NER component that extracts entities: order numbers, dates, product names. This reduces clarifying dialogues by 60% and speeds up issue resolution by 2x. For structured domains, regex + custom NER works more reliably than a general NER model:

import re

def extract_order_id(text: str) -> Optional[str]:
    # formats: #123456, №123456, ORD-123456, order 123456
    patterns = [r'#(\d{5,8})', r'№(\d{5,8})', r'ORD-(\d+)', r'заказ[а-я\s]+?(\d{5,8})']
    for pattern in patterns:
        match = re.search(pattern, text, re.IGNORECASE)
        if match:
            return match.group(1)
    return None

def fill_order_status_slots(text: str) -> OrderStatusSlots:
    return OrderStatusSlots(
        order_id=extract_order_id(text),
        period=extract_period(text)  # 'last week', 'in November'
    )

Android: Integration into a Dialog Interface

class IntentViewModel(private val intentApi: IntentApi) : ViewModel() {
    fun processUserInput(text: String) {
        viewModelScope.launch {
            val result = intentApi.classify(text)
            when (result.intent) {
                "search_product" -> {
                    val query = result.slots["product_query"] ?: text
                    navigateToSearch(query)
                }
                "order_status" -> {
                    val orderId = result.slots["order_id"]
                    if (orderId != null) navigateToOrder(orderId)
                    else requestOrderId()
                }
                "return_request" -> navigateToReturnFlow()
                "out_of_scope" -> showFallbackMessage()
                else -> handleGenericIntent(result)
            }
        }
    }
}

When to Use an LLM vs Fine-Tuned BERT

For apps with a small number of intents (<20) and flexible formulations, structured output via GPT-4o-mini or Gemini Flash is cheaper and more accurate than a fine-tuned model. Use a prompt with JSON schema and few-shot examples. The LLM approach is 5x cheaper to maintain and updates are instant (just change the prompt, no retraining). However, for high-volume apps, fine-tuned BERT is 10 times more cost-effective than LLM: GPT-4o-mini costs $0.15 per 1k queries, BERT inference costs $0.02 per 1k queries.

On-Device vs Cloud: Which to Choose?

Criterion On-device (rubert-tiny2) Cloud (BERT full)
Model size ~29 MB ~400 MB
Latency <100 ms (10 times faster) 200-500 ms + network
Privacy Data never leaves device (GDPR compliant) Requires data transfer
Updates Via App Store Instant on server

On-device reduces latency by 10 times and ensures data privacy, compliant with GDPR.

Implementation Process and Cost

  1. Taxonomy development with the product team (2-3 days).
  2. Data collection and labeling (at least 100-200 examples per intent).
  3. Classifier training and baseline evaluation (accuracy/F1).
  4. Integration into the mobile dialog interface with out-of-scope handling (2 days).
  5. Monitoring: out-of-scope rate, confusion matrix per intent.

A fine-tuned BERT classifier with basic slot filling takes 2-3 weeks. An LLM-based intent recognition with structured output takes 3-5 days. The cost of fine-tuning a model ranges from $5,000 to $15,000 depending on data volume and number of intents. We have completed 50+ such projects with average production accuracy of 89%.

What's Included

  • Documentation of intent taxonomy and slot schemas
  • Source code for inference (Python/Kotlin/Swift)
  • CI/CD configuration for the model
  • Access to metric monitoring dashboard with real-time metrics
  • Team training on working with the model
  • 1 month of support after launch

We guarantee classification accuracy of at least 85% on the test dataset. Our clients have reduced support tickets by 40% and increased customer satisfaction scores by 20 points. End-to-end: from idea to release on App Store and Google Play. Get a free consultation now. Contact us to discuss intent taxonomy and implementation plan.

As defined in linguistics, intent recognition is a fundamental component of natural language understanding systems. Voice commands and mobile chatbot interactions heavily rely on query classification and slot filling for effective dialog interfaces.

Machine Learning in Mobile Apps: CoreML, TFLite, and On-Device Models

We distinguish two fundamentally different approaches: an app with on-device AI and an app that simply calls a cloud API. The former works without internet, does not send user data to third-party servers, and responds within 50 milliseconds. The latter depends on network latency and pricing plans. Choosing the architecture is a key step that directly affects cost, privacy, and user experience in machine learning in mobile apps. Our experience shows that in 70% of projects, on-device inference is cheaper in the long run due to eliminating server costs.

How to Choose Between CoreML and TFLite for On-Device Inference?

CoreML — Apple's native framework for running ML models on device. Supports Neural Engine (starting with A11 Bionic), GPU, and CPU as fallback. Models are converted to .mlmodel format via coremltools from PyTorch, ONNX, or TensorFlow. Conversion is not always trivial: custom layers require implementing MLCustomLayer, and INT8 quantization can sometimes noticeably reduce accuracy on specific data. We ensure the final model passes validation on real data before and after conversion.

TensorFlow Lite — cross-platform alternative for Android and Flutter. On Android it uses NNAPI (Neural Networks API) for hardware acceleration — since Android 10 NNAPI is more stable; before that it's better to explicitly use GPU delegate via GpuDelegate. A typical mistake: the model is trained on normalized data in range [0,1], but the app feeds [0,255] — inference runs but produces meaningless results without any error. We include an automatic input data validation module in the SDK.

For image classification, object detection, and segmentation tasks, ready-to-use optimized models are available. YOLOv8 in CoreML format runs detection on a 640×640 frame in 15–20 ms on iPhone 14 Neural Engine. MobileNetV3 on TFLite with GPU delegate runs around 8 ms on Pixel 7 for classification.

Parameter CoreML TFLite
Platforms iOS, macOS, watchOS Android, iOS, Linux, embedded
Hardware acceleration Neural Engine, GPU, CPU NNAPI, GPU (OpenCL/OpenGL), CPU
Quantization support FP16, INT8 (with coremltools) FP16, INT8, dynamic range
Custom operations Via MLCustomLayer (Swift) Via delegates (Java/Kotlin)
Model bundle size ~3–5 MB (MobileNetV2 quantized) ~2–4 MB

What If You Need Text Generation On-Device?

Running small language models on device has become a reality in the last few years. Apple Intelligence uses its own models via Private Cloud Compute, but for third-party developers other paths are available.

llama.cpp with Metal backend on iOS is a working approach for phi-3-mini (3.8B parameters, 4-bit quantization, ~2.3 GB). Inference: 15–25 tokens/second on iPhone 15 Pro. For integration in Swift, use the Swift Package llama.swift or a wrapper via C interface llama.h. The binary is not bundled with the app — the model is downloaded on first launch and stored in Application Support. Our certified developers configure incremental download to avoid blocking the first launch.

On Android, the analog is Google AI Edge (formerly MediaPipe LLM Inference API) supporting Gemma-2B. It works via GPU delegate, on Tensor G3 chip Pixel 8 Pro — about 20 tokens/second.

Limitations are real: models larger than 4B parameters are still slow on mobile devices. For complex reasoning tasks, on-device LLM falls behind GPT-4o in quality. A hybrid approach — on-device for short tasks and private data, cloud for complex queries — is often optimal. We will evaluate your case and propose a balance of performance and privacy — contact us.

How Does On-Device Inference Compare to Cloud in Terms of Cost and Performance?

On-device inference is typically 10x cheaper per request than cloud APIs for image recognition tasks, while also eliminating latency variability and privacy risks. The table below summarizes the trade-offs.

Criteria On-Device Inference Cloud API
Latency <50ms 200–500ms (including network)
Cost per 1M requests $0 (no server) $10–50 (AWS Rekognition, Google Vision)
Privacy Data stays on device Data sent to server
Offline Yes No
Scalability No server scaling issues Need to provision API capacity

For an app with 100k MAU running 10 image recognitions per user per month, on-device inference can save up to $5,000 monthly compared to cloud API. Get a free consultation on your ML architecture today.

Integrating OpenAI API and Other Cloud Models

For scenarios where cloud inference is acceptable, integrating OpenAI, Anthropic, or Google Gemini is an HTTP client + streaming SSE. In Swift, AsyncThrowingStream is convenient for streaming responses. In Kotlin, use Flow.

Critically: API keys must never be stored in the app bundle. Even an obfuscated key can be extracted from the IPA in 10 minutes using strings or frida. Correct architecture: mobile app → your own backend → OpenAI API. The backend controls rate limiting, logs requests, and protects the key.

What Is Included in the Work (Deliverables)

  • Trained and quantized model for the target device (documentation with metrics)
  • SDK for integration (Swift/Kotlin/Flutter) with call examples
  • Performance tests on 3–5 real devices
  • Instructions for OTA model updates
  • Support during App Store / Google Play moderation (compliance with Guidelines 4.2, 5.1)
  • 2 weeks of technical support after release

Typical Project Pipeline

  1. Task analysis — measure latency, privacy, size, supported devices.
  2. Model prototyping — in Python, evaluate accuracy on target data.
  3. Conversion and quantization — for CoreML/TFLite with validation.
  4. Integration into the app — model wrapped in a service layer (easy to swap CoreML ↔ TFLite ↔ cloud).
  5. Testing — on real devices, measure FPS, RAM, battery.
  6. Deployment — via TestFlight / Firebase App Distribution, monitor metrics.

Timelines: integration of a ready CoreML/TFLite model — 1–2 weeks, development of a custom model with mobile optimization — from 6 weeks, on-device LLM chat with personalization — 4–8 weeks.

Why We Take on Complex Cases?

10+ years of experience in mobile development, 50+ implemented AI/ML solutions, guarantee of compatibility with current iOS and Android versions. All projects undergo code review and load testing. The cost includes preparation of moderation documentation and training of your team.

Contact us — we will help you choose the architecture and implement ML in your app turnkey. Order an audit of your existing solution — we will assess the potential for server cost savings free of charge. In some projects, savings can reach significant amounts per month.