Agent Architecture and Program Types Interview Questions: Model Answers with a Worked Design
Prepare crisp answers on agent functions, programs, architectures and agent types. Then follow a complete service-recovery design from percepts to a utility-based choice.
KnowledgeGate Team
Exam prep & CS education

A strong answer separates architecture, the agent function and the program, then selects a type from the available information. In the incident-response design, utility values 50 and 69 determine the action. The Resume & Interview Preparation category is the wider route for building related interview skills.
Agent architecture interview question: function, program and architecture
Model answer: An agent perceives through sensors and acts through actuators. The agent function is the abstract mapping from the complete percept sequence to an action. The agent program implements that mapping, while the architecture is the machine or platform that runs it. Therefore, agent = architecture + program, but the two parts are not interchangeable.
For a service-recovery agent, health checks, error metrics and deployment events are sensors. restart, drain traffic and roll back are actuator actions. The program turns current and remembered observations into a command; the architecture supplies the monitored platform and execution interface. health=FAIL is a percept; release v42 is the likely fault is internal state.
A rational agent selects the action expected to maximise its stated performance measure from available evidence and built-in knowledge. It need not know the actual future. The four approaches to AI and rational-agent example explain this foundation.
Agent program types: choose by information and decision rule
Choose a type by asking what information the agent retains and how it selects an action.
Type | Information used | Decision rule | What it adds | Failure mode |
|---|---|---|---|---|
Table-driven | Entire percept sequence | Look up a stored action | Conceptual baseline | Histories grow impractically |
Simple reflex | Current percept | Match a condition-action rule | Fast direct response | Hidden history may require another action |
Model-based reflex | Percepts and internal state | Update state, then match | Handles partial observability | Model can pursue the wrong objective |
Goal-based | Model and goal | Search future goal states | Plans ahead | Successful outcomes are not ranked |
Utility-based | Predicted outcomes | Maximise a utility score | Ranks trade-offs | Scale and weights can mislead |
Learning | Experience and feedback | Update performance | Improves over time | Wrong feedback signal gets optimised |
These labels need not be mutually exclusive. A learning agent may use a model-based, utility-based performance element. A multi-agent system means several interacting autonomous agents, not a sixth decision rule.
Worked design setup: classify an incident-response agent
Consider this constructed scenario. At 10:00, a service-recovery agent observes health=FAIL, error_rate=18%, current_release=v42, v42_deployed_at=09:55 and restart_count_last_15_min=3. Its goal is health=PASS within 10 minutes. Historical training data records recurrence after 7 of 20 in-place restarts and 1 of 20 drain-and-rollback actions, giving illustrative estimates 0.35 and 0.05.
A simple reflex rule, IF health=FAIL THEN restart, ignores deployment and restart history. A model-based agent stores that v42 followed the last healthy state and three restarts occurred. A goal-based agent searches for recovery within ten minutes. A utility-based agent ranks plans by recovery time, recurrence risk and user disruption. A learning agent updates its model or estimates from outcomes.
Table-driven control is unsuitable because five fields create many histories. A separate action for every history cannot generalise to an unseen sequence. The agent then selects action B; the loop then observes health=PASS and error_rate=1% at 10:07.

Goal-based versus utility-based agent: calculate the decision
Action A, restart in place, has recovery time T=2 minutes, recurrence probability R=0.35 and user-disruption score D=8. Action B, drain traffic and roll back v42, has T=7 minutes, R=0.05 and D=3. Both meet the goal because 2 <= 10 and 7 <= 10. A pure success predicate accepts both, so it needs another choice rule. The goal alone does not say which valid plan is better.
For this constructed example, define utility before scoring:
U = 100 - 3T - 80R - 2D
For action A:
U(A) = 100 - 3(2) - 80(0.35) - 2(8) = 100 - 6 - 28 - 16 = 50
For action B:
U(B) = 100 - 3(7) - 80(0.05) - 2(3) = 100 - 21 - 4 - 6 = 69
The utility-based agent chooses B because 69 > 50, although it takes five minutes longer.
The choice is sensitive to the risk weight. Replace 80 with risk weight w. The actions tie when 22 + 0.35w = 27 + 0.05w, so 0.30w = 5 and w = 16.67 approximately. Above that weight, B wins; below it, A wins. Changing weights can change the rational choice because rationality follows the declared performance measure, not a universal preference for rollback.

Learning agent interview question: map the four components
Model answer: The performance element selects external actions. The learning element modifies it from experience. The critic evaluates behaviour against that measure. The problem generator proposes informative exploration rather than repeating the preferred action.
Here, the performance element selects B from utility scores 50 and 69. The critic checks whether health stays passing for 30 minutes and records the disruption score. If B has no recurrence in the new incident, the naive empirical estimate changes from 1/20 = 0.05 to 1/21 = 0.0476. If recurrence occurs, it becomes 2/21 = 0.0952. The learning element updates the estimate before the next decision.
The problem generator must not explore risky recovery actions blindly on live traffic. It can propose a sandbox replay, simulation or bounded canary with approval and rollback rules built into the architecture. Learning describes improvement over time; goal or utility describes how the current action is chosen.
Agent architecture design round: pseudocode, state and test cases
A whiteboard program can follow this order:
percept = sense()
state = update_state(state, percept)
candidates = plan(state, goal)
predicted = model(state, candidates)
action = argmax(utility(predicted))
execute(action)
feedback = critic(observe_outcome())
learn(feedback)The abstract agent function is not this listing. This program approximates the mapping. Persistent state stores the last healthy release, recent actions and outcomes. Sensors validate missing or stale telemetry. Actuators expose only authorised restart, drain and rollback operations. Decision logs retain the percept, state version, candidate scores, chosen action and result for audit.
Test three boundaries. With the exact values above, the program must choose B. If both plans take more than 10 minutes, it must return no goal-satisfying plan and escalate. If recurrence estimates are missing, it must not substitute zero risk; use a declared conservative fallback or human approval. A complete design also handles partial observability, failed actuators and stale state instead of assuming every command succeeds.
Service-style and product-style follow-ups: strong answers and traps
These are preparation modes, not rules followed by every employer. Fundamentals-heavy rounds may emphasise definitions, components and quick classification. Deeper design rounds may ask about state, utility, weight sensitivity, safe learning, failed actuators and observability. Give the definition first, then state assumptions.
Weak answer | Why it fails | Stronger repair |
|---|---|---|
Architecture is the algorithm | Confuses platform and logic | Separate architecture from program |
Model-based means goal-based | State and objective differ | Name model and goal separately |
Utility-based always learns | Fixed utilities can exist | Current choice differs from learning |
A rational agent always succeeds | The future is unknown | Maximise expected performance from evidence |
Multi-agent means many learning models | Learning is not required | Say interacting autonomous agents |
Use the AI Agent Architecture and Program Types MCQs for focused retrieval practice on these distinctions.
Agent architecture interview answers: the short version and next step
Use this recall ladder: current percept suggests simple reflex; hidden history calls for a model; desired future states introduce goals; trade-offs introduce utility; feedback over time introduces learning. Architecture hosts the program that implements the choice.
For a ten-minute drill, give the core definition in 45 seconds, redraw the loop, recompute U(A)=50 and U(B)=69, derive w=16.67, then explain why a learning agent can also be utility-based. Artificial Intelligence (AI) is an optional structured route for broader AI and placement preparation.
Keep learning
Agent Architecture and Program Types in AI: A Worked Warehouse Example and Exam Traps
Separate architecture, program and agent function, then compare four program types through one fully worked warehouse routing problem.
AI Agent Architecture and Program Types MCQs: 11 Solved Questions
Eleven solved AI agent MCQs with the trap in each one named: current-percept rules, sensor versus actuator, goal versus utility scoring, and what counts as learning.
DBMS Data Models, Architecture and Components MCQs: 12 Solved Questions
Test whether you can separate data models, abstraction levels, catalogs, schemas and metadata. These 12 MCQs include concise explanations and a diagnostic review plan.
Compiler Design Semester Guide: Trace One Program from Tokens to Target Code
Follow one assignment through lexical analysis, parsing, semantic checks, TAC, optimization and abstract target instructions, with every hand-off made visible.





