What is an LLM agent, and how is it different from a single LLM call?
What the interviewer wants to hear
- An agent runs the model in a loop and lets it choose actions
- The model requests tool calls; application code executes them
- Tool results are fed back so the model can decide the next step
- The loop ends on a final answer or a step limit
- Agents add flexibility but also cost, latency and failure modes
Model answer
A single LLM call takes a prompt and returns text once. An agent wraps the model in a loop and gives it tools, such as search, a database query or sending an email. On each turn the model either answers or asks for a tool call with arguments. My code runs the tool, appends the result to the conversation, and calls the model again, so it can plan, observe what happened and adjust. The loop stops when the model gives a final answer or when we hit a step or cost limit. Agents are powerful for open-ended tasks, but they are slower, more expensive and harder to test than a fixed workflow, so I only use one when the steps cannot be known in advance, and I trace every step.
Can you answer it under time pressure?
Take a timed easy round and get scored on every answer.
More easy AI Engineer (LLM & Generative AI) questions
- Explain retrieval-augmented generation (RAG) to a new team member. Why do we use it?
- What are embeddings, and what can you build with them besides RAG?
- Why do LLMs hallucinate, and what simple steps reduce it in an application?
- How do tokens affect the cost and speed of an LLM application?
- What do temperature and top-p control, and how would you set them for different tasks?
- How does vector search work, and why is it useful for an AI application?
- Your app starts getting rate-limit errors from the LLM API. How do you handle them?
- What is the difference between zero-shot and few-shot prompting, and when would you use each?
- How do you protect personal data when building a feature on a hosted LLM API?