Large Language Models for Machine Learnings
Large language models are transformer models trained on huge text corpora to predict the next token, then adapted to follow instructions. This unit in the NLP and Modern AI stage covers how they work, prompting, context windows, embeddings and retrieval, API usage and their limits, along with multimodal and speech models.
Stage: NLP and Modern AI · Part of the Machine Learning roadmap · Last reviewed 19 November 2026
What to learn in Large Language Models
- Explain next-token prediction, tokens and the context window
- Write a clear prompt with instructions, examples and an output format
- Call an LLM API and handle structured output and errors
- Describe retrieval-augmented generation and when it beats fine-tuning
- Recognise hallucination and plan checks to reduce it
Large Language Models interview questions
Why use retrieval-augmented generation instead of fine-tuning an LLM?
RAG retrieves relevant passages from your own documents, usually through embedding search, and adds them to the prompt so the model answers from that context. It reduces hallucination and keeps knowledge current without retraining the model. Retrieval updates instantly when documents change.
Why do large language models hallucinate?
They generate the most likely continuation of text, not verified facts, so they can produce fluent but false statements, especially on rare or unseen topics. Grounding with retrieval, asking for sources and validating outputs lowers the risk.
Where Large Language Models fits in the Machine Learning roadmap
Large Language Models belongs to the NLP and Modern AI stage (beginner level), which takes about 3 hours. Language and beyond.
Other units in this stage
Back to the full Machine Learning roadmap