How does an LLM generate text?
How does a large language model generate text?
The 20 theoretical questions asked most often today. Open a question to read the full answer.
How does a large language model generate text?
What is self-attention, and why did transformers replace RNNs?
What are tokens, and what is a context window? Why do they matter in practice?
What do temperature, top-p and other sampling parameters do, and how do you set them?
What are embeddings, and how does cosine similarity find related content?
What is a vector database, and how do approximate nearest neighbor (ANN) indexes like HNSW work?
How does retrieval-augmented generation (RAG) work end to end?
How do you chunk documents for RAG, and how do you choose chunk size?
What are hybrid search and reranking, and why do they improve RAG?
What prompt engineering techniques actually work in production?
What is context engineering, how is it different from prompt engineering, and how do you give an LLM app memory?
Why do LLMs hallucinate, and how do you reduce it in a product?
When should you use prompting, RAG or fine-tuning?
What are LoRA and parameter-efficient fine-tuning (PEFT), and why are they used?
What is an AI agent, and how does tool calling (function calling) work?
What is the Model Context Protocol (MCP), and when do you need a multi-agent system?
How do you evaluate an LLM application, and can you trust LLM-as-a-judge?
What is prompt injection, and how do you defend an LLM application with guardrails?
How do you reduce the cost and latency of an LLM application?
What are reasoning models, and when are they worth the extra cost and latency?