Skip to main content
Develop a question-answering (QA) solution with Azure AI Language. In this lesson you’ll learn how to build an automated QA system that provides precise, context-aware answers from semi-structured sources such as FAQs, manuals, and document collections. Azure AI Language uses natural language processing to extract concise answers and rank multiple candidate responses so your application can surface the most relevant information.
Question answering (QA) is optimized for retrieving factual answers from documents. It’s ideal for scenarios like knowledge bases, product documentation, and support FAQs where users expect direct, concise responses.
A presentation slide titled "Learning Objectives" that lists three goals: understand question answering in Azure AI Language, differentiate between question answering and conversational AI, and build a knowledge base. The slide has numbered blue markers along a vertical line and a dark left sidebar.
Key topics covered in this module:
  • What question answering (QA) is and how Azure AI Language implements it.
  • Differences between QA and conversational AI systems.
  • How to construct, test, publish, and maintain a knowledge base.
  • Adding multi-turn (contextual) support and implementing active learning for continuous improvement.

QA vs Conversational AI

Understanding the differences helps you choose the right architecture.
CapabilityQuestion AnsweringConversational AI (Dialog)
Primary goalRetrieve factual answers from documentsManage interactive dialogues and tasks
Best forFAQs, manuals, knowledge basesVirtual assistants, task flows, open-ended chat
Context handlingTypically query → answer; can add multi-turn contextDesigned for turn-taking, slot-filling, complex context
Success metricsAnswer precision and coverageTask completion, user satisfaction, conversation flow

Build a Knowledge Base — Step-by-step

Follow these high-level steps to create a robust QA solution:
  1. Collect and prepare sources
    • Gather FAQs, manuals, support docs, and structured Q&A pairs.
    • Clean or redact sensitive data (PII) before ingestion.
  2. Ingest content into the knowledge base
    • Upload documents and define metadata to improve retrieval.
    • Use embeddings and semantic ranking where available.
  3. Configure retrieval and scoring
    • Tune retrieval parameters (top-K, similarity thresholds).
    • Adjust answer ranking and confidence thresholds.
  4. Enable multi-turn context
    • Store conversational history and link follow-up queries to prior turns.
    • Use context-aware retrieval to resolve pronouns and references.
  5. Test, refine, and iterate
    • Preview responses, inspect low-confidence answers, and refine sources.
    • Update or split documents, add canonical Q&A pairs, and republish.
Testing and refinement are crucial: iterate on source quality, tune scoring, and improve phrasing to reduce ambiguity and increase answer relevance.

Multi-turn Conversations

Multi-turn capabilities allow the QA system to maintain context across follow-up questions. Implement context windows that include a configurable number of prior turns (queries and answers), then:
  • Use context to re-run retrieval with augmented prompts.
  • Resolve referents (e.g., “it”, “that”) by including prior user utterances.
  • Limit context length to manage latency and cost.

Publish and Integrate

When your knowledge base is polished:
  • Publish it to generate REST endpoints and API keys or use SDKs for your preferred language.
  • Secure access with proper authentication, role-based access, and key rotation.
  • Integrate the published KB into web apps, mobile apps, or bots using the provided endpoints.
When publishing and exposing a knowledge base, ensure sensitive or personally identifiable information (PII) is removed or handled according to your organization’s data policies. Review access controls and rotate keys as needed.
A presentation slide titled "Learning Objectives" with a dark left panel and a light right background. It lists three numbered items: "05 Test and deploy a knowledge base," "06 Utilize a published knowledge base," and "07 Implement active learning."

Active Learning and Continuous Improvement

Active learning closes the loop between real user behavior and knowledge base updates:
  • Capture telemetry: log low-confidence answers, unanswered queries, and user feedback.
  • Human-in-the-loop review: surface candidate queries for content authors to review and label.
  • Update sources: add new Q&A pairs, rephrase answers, or include additional document excerpts.
  • Republish: push updates and continue monitoring performance.
A regular cadence of telemetry analysis plus human review ensures your QA system stays current and accurate.
Resource TypeUse CaseExample
DocumentationLearn core concepts and APIsAzure AI Language
TutorialsStep-by-step KB creationQuestion Answering quickstart
SecurityKeys, roles, and policiesAzure security best practices
By the end of this module you should be able to design, build, publish, and maintain a question-answering knowledge base using Azure AI Language, with strategies for multi-turn context and active learning to keep answers accurate over time.

Watch Video