Question Answering
Q&A systems
The Problem: Users have questions, and they expect accurate, helpful answers quickly. How can AI provide reliable question-answering at scale?
The Solution: An Expert Hotline
Question-Answering uses LLMs to understand questions and provide accurate, relevant responses. There are two modes: open-book (with RAG) where the model searches real documents and cites sources — best for factual, up-to-date, or domain-specific questions; and closed-book, where the model relies on training data alone — faster but prone to hallucination and outdated information. Chain-of-thought helps with complex reasoning in both modes.
Think of it like an expert hotline:
- 1. User asks a question: "What were the main causes of the 2008 financial crisis?"
- 2. Decide: open-book or closed-book: Does this need retrieved docs (factual, recent, domain-specific) or model knowledge (general, stable)?
- 3. If open-book: search and retrieve: Search documents, chunk relevant sections, retrieve the best matches
- 4. Generate a grounded answer: Synthesize a clear answer with citations pointing to source documents
- 5. Verify accuracy: Cross-check claims against sources — flag anything unsupported as uncertain
Where Is This Used?
- Customer Support: Answering FAQs automatically
- Search Engines: Direct answers instead of just links
- Education: Tutoring and homework help
- Enterprise: Internal knowledge base queries
- Closed-Book Risk: When the model answers from training data alone, it may hallucinate facts, provide outdated info, or confidently state something wrong — always verify critical answers against sources
Fun Fact: The best Q&A systems combine LLMs with retrieval (RAG)! The LLM understands the question and generates natural answers, while retrieval ensures the information is accurate and up-to-date.
Try It Yourself!
Use the interactive example below to ask questions and see how AI formulates accurate, helpful responses.
Product: CloudSync Pro Version: 3.2.1 Release Date: January 2024 Features: - Automatic file synchronization across devices - End-to-end encryption (AES-256) - Maximum file size: 10GB - Supported formats: All file types - Storage limit: 2TB per account Pricing: - Free tier: 15GB storage, 3 devices - Pro: $9.99/month, 500GB, unlimited devices - Enterprise: Custom pricing, 2TB+, priority support Known Issues: - Large files (>5GB) may take longer to sync - Some antivirus software may interfere with sync agent
What encryption does CloudSync use?
CloudSync Pro uses end-to-end AES-256 encryption.
- • Extractive — copies the answer directly from the text. Most reliable, but limited to what’s stated.
- • Abstractive — reasons from context to form a new answer. Flexible, but risk of hallucination.
- • Multi-hop — combines facts from different parts of the document. Powerful, but hardest for the model.
Try it yourself
Interactive demo of this technique
Answer a question strictly based on the provided text
Advantages of solar energy:
- Environmentally clean energy source
- No fuel required
- Quiet operation
- Minimal maintenance
- Reduces grid dependency
- Pays off in 6-8 years in Krasnodar region
- Investment payoff: ["pays off in 6-8 years"]
- Good energy output: ["average output — 1200 kWh/year per 1 kW capacity"]
- Government support: ["the state compensates up to 30% of equipment cost"]
The text does not mention environmental benefits, maintenance costs, or comparison with other energy sources.
Citation requirement and ban on external knowledge transform a hallucinating answer with invented facts into grounded QA anchored to the text.
Create a free account to solve challenges
5 AI-verified challenges for this lesson
This lesson is part of a structured LLM course.
My Learning Path