Implement Custom Language Models
This section of the Microsoft AI-102: Designing and Implementing a Microsoft Azure AI Solution exam covers building and deploying custom language models with Azure AI Language and related services. Below are study notes for each sub-topic, with links to Microsoft documentation, exam tips, and key facts
Create Intents, Entities, and Add Utterances
π Docs: Language Understanding (LUIS) migration to Conversational Language Understanding
Overview
- Intents = user goals (e.g., "BookFlight")
- Entities = data extracted (e.g., "Paris" as destination)
- Utterances = example phrases to train model
Key Points
- Provide diverse utterances to improve accuracy
- Entities can be prebuilt (dates, numbers) or custom
- Used in chatbots, assistants, and task automation
Train, Evaluate, Deploy, and Test a Language Understanding Model
π Docs: Quickstart: Conversational language understanding
Overview
- Training uses labeled intents and entities
- Evaluation ensures performance
- Deployment makes model available via endpoint
Key Points
- Metrics: precision, recall, F1 score
- Deploy models to staging or production slots
- Test with new utterances for real-world accuracy
Exam Tip
Staging slot for testing, production slot for live apps
Optimize, Backup, and Recover Language Understanding Model
π Docs: Back up and recover your conversational language understanding models
Overview
- Optimization involves retraining with new utterances
- Backup ensures models can be restored
- Recovery allows rollback after errors
Key Points
- Export/import projects for portability
- Regular retraining improves accuracy
- Versioning helps track model changes
Consume a Language Model from a Client Application
π Docs: Quickstart: Conversational language understanding
Overview
- Applications call deployed models via REST API or SDKs
- Input: user utterance
- Output: intent + entities + confidence score
Key Points
- Requires endpoint URL and key
- Supports real-time integration into bots and apps
- JSON response can trigger business logic
Use Case
Chatbot calling CLU to extract intent and act on it
Create a Custom Question Answering Project
π Docs: Custom Question Answering overview
Overview
- Custom QnA project enables building a knowledge base
- Uses semi-structured or unstructured data as input
Key Points
- Sources: FAQ docs, URLs, PDFs
- Knowledge base provides structured Q&A pairs
- Supports conversational interaction
Add Question-and-Answer Pairs and Import Sources
π Docs: What is custom question answering?
Overview
- Add manual Q&A pairs
- Import FAQs from documents or URLs
- Supports multiple sources per knowledge base
Key Points
- Automatic extraction generates suggested Q&A pairs
- Manual editing improves accuracy
Train, Test, and Publish a Knowledge Base
π Docs: Create, test, and deploy: CQA knowledge base
Overview
- Training refines extracted Q&A pairs
- Testing validates accuracy
- Publishing exposes an endpoint
Key Points
- Knowledge base must be published to be consumed
- Endpoint integrates with client applications
- Supports iterative improvement
Create a Multi-Turn Conversation
π Docs: Add guided conversations with multi-turn prompts
Overview
- Multi-turn = follow-up questions within context
- Supports contextual conversations
Key Points
- Requires linking related Q&A pairs
- Improves chatbot interactivity
- Maintains conversation state
Add Alternate Phrasing and Chit-Chat to a Knowledge Base
π Docs: Improve quality of response with synonyms
Overview
- Alternate phrasing improves recognition of user queries
- Chit-chat adds casual responses to non-task queries
Key Points
- Reduces fallback to βno answerβ
- Improves conversational flow
- Prebuilt chit-chat sets available
Export a Knowledge Base
π Docs: Create, test, and deploy: CQA knowledge base
Overview
- Knowledge bases can be exported to JSON
- Supports backup, migration, and versioning
Key Points
- Importing restores or replicates KBs
- Useful for moving between environments
Create a Multi-Language Question Answering Solution
π Docs: Create projects in multiple languages
Overview
- Projects can contain multilingual content
Key Points
- Detect language first, then route query
- Translator can pre-process inputs
- Requires maintaining localized KBs
Implement Custom Translation
π Docs: Custom Translator
Overview
- Custom Translator allows domain-specific translations
- Supports training with parallel text corpora
Key Points
- Improves accuracy for industry terms
- Custom models must be trained and published
- Integrated with Azure Translator API
Exam Tip
Translator = general use, Custom Translator = domain-specific
Quickβfire revision sheet
- π Intents = goals, Entities = extracted data, Utterances = examples
- π CLU models trained, evaluated, deployed to endpoints
- π Metrics: precision, recall, F1
- π Custom QnA builds KBs from docs/FAQs
- π Multi-turn conversations = contextual Q&A
- π Alternate phrasing + chit-chat improve coverage
- π Export KB = backup/migration
- π Multi-language QnA + Custom Translator for global solutions