Summary: Clear, short answers to the 25 GenAI questions freshers are asked most: LLM basics, prompting, embeddings, RAG, vector databases, LangChain, agents, LangGraph, safety, evaluation and deployment.
How to use this list
Read each question, answer it out loud in your own words, then compare. Interviewers care less about textbook wording and more about whether you can connect the idea to something you have built. Where you can, add "In my project, I…".
The 25 questions
What is a large language model (LLM)?
A neural network, usually a Transformer, trained on large amounts of text to predict the next token. That simple objective lets it write, summarise, translate, answer questions and write code.
What is a token?
The unit of text a model reads and writes: a word, part of a word or a symbol. Context limits and API costs are measured in tokens.
What is a context window?
The maximum number of tokens the model can consider at once, including your prompt, any retrieved documents, the conversation so far and its own answer.
What does temperature control?
Randomness when choosing the next token. Low values (close to 0) give focused, repeatable output for extraction or code; higher values give more varied output for brainstorming.
What is prompt engineering?
Designing the input so the model does the task reliably: a clear role and instruction, relevant context, examples, the exact output format, and what to do when unsure.
Zero-shot vs few-shot prompting?
Zero-shot gives only the instruction. Few-shot adds a handful of input-output examples, which usually improves format and accuracy on specific tasks.
What is a hallucination and how do you reduce it?
A confident but wrong or invented answer. Reduce it with RAG over trusted sources, instructions to say "I don't know", low temperature, structured outputs and evaluation.
What are embeddings?
Vectors that represent the meaning of text, so similar texts have nearby vectors. They power semantic search, clustering and RAG retrieval.
What is cosine similarity?
A measure of how closely two vectors point in the same direction, commonly used to compare embeddings. 1 means identical direction, 0 means unrelated.
What is RAG?
Retrieval-augmented generation: retrieve relevant passages from your documents and give them to the model with the question, so it answers from your data and can cite sources.
Why do we chunk documents in RAG?
Whole documents are too large and too broad to match a specific question. Chunks of a few hundred words, with some overlap, make retrieval precise and fit in the context window.
What is a vector database? Name a few.
A store optimised for finding the nearest vectors to a query. Examples: FAISS (a library), Chroma, Pinecone, Qdrant, and pgvector for PostgreSQL.
What is hybrid search?
Combining keyword search (good for exact terms such as IDs and names) with vector search (good for meaning), then merging the results.
What is re-ranking?
A second pass that scores the retrieved chunks more carefully, often with a cross-encoder model, and keeps only the best few for the prompt.
RAG vs fine-tuning?
RAG adds knowledge at question time and is easy to update. Fine-tuning changes model behaviour, such as style or format, and needs retraining for every change.
What is LangChain?
A Python and JavaScript framework of components for LLM apps: model wrappers, prompt templates, document loaders, retrievers and output parsers, joined into chains with LCEL.
What is LCEL?
LangChain Expression Language: composing steps with the | operator (prompt | model | parser), with built-in streaming, batching and async.
What is an AI agent?
An LLM that decides which actions to take, such as calling a tool, searching or querying a database, observes the results, and repeats until the task is done.
What is tool (function) calling?
The model returns a structured request to call a function you defined, with arguments matching its schema. Your code runs the function and sends the result back.
What is the ReAct pattern?
Reason + Act: the model alternates between reasoning about what to do and taking an action with a tool, using each observation to decide the next step.
What is LangGraph and when do you need it?
A library for building agent workflows as graphs with explicit state. You need it for loops, branching, human-in-the-loop approval, persistence and multi-agent systems.
What is prompt injection?
Malicious instructions hidden in user input or retrieved content that try to override your system prompt. Mitigate with least-privilege tools, input and output checks, and confirmation for risky actions.
How do you evaluate an LLM app?
With a fixed test set and metrics: retrieval quality (did we fetch the right chunks?), answer faithfulness to sources, correctness, latency and cost, plus tracing with a tool such as LangSmith.
How do you reduce LLM cost and latency?
Use smaller models where they suffice, shorten prompts, cache repeated answers, retrieve fewer but better chunks, stream responses and batch background work.
How would you deploy a GenAI app?
Wrap it in an API (for example FastAPI), keep secrets in environment variables, containerise with Docker, add logging and tracing, then deploy to a server or cloud with a simple front end such as Streamlit or React.
Prepare beyond the definitions
- Be ready to draw your RAG or agent architecture on a whiteboard.
- Know one thing that went wrong in your project and how you fixed it.
- Practise Python basics and simple data-structure problems as well; most interviews still include them.
FAQ
Are Python questions asked in GenAI interviews?
Usually, yes. Expect Python fundamentals and simple coding problems alongside GenAI concepts.
Do I need projects to clear a GenAI interview?
Projects make a big difference. Being able to explain a RAG app or agent you built is the strongest evidence of skill.