生成AIパスポート · LESSON 3

Chapter 3: AI Agents19%(当サイト設定) · 6 topics

Learn the definition of AI agents, RAG, how agents work, external integration such as MCP, tools and use cases, and risks, safety and evaluation.

3.1What AI agents are

What AI agents are (definition, workflow vs. autonomous, levels of autonomy)

Concept

An AI agent, given a goal, works out the steps itself and progresses using tools. There are workflow agents that use LLMs within predefined steps, and autonomous agents where the LLM decides its own next action. Levels of autonomy range from assistance acting on each human instruction, through stages with human approval, to fully autonomous execution.

How it works / steps

  1. If the steps are fixed, make it a workflow agent
  2. If the steps change with circumstances, consider an autonomous agent
  3. For high-impact work, use a level with human approval

Workplace example

Invoice processing becomes a workflow of receive → extract fields → check → register, with only questions about unclear points drafted autonomously as emails.

Common confusions and exam tips

Mini quiz

Q1. Which best describes the difference between AI agents and conventional conversational generative AI?

  1. An agent plans toward a goal, acts using tools, observes the results and decides its next action
  2. An agent accepts no human instructions at all and always sets its own goals
  3. An agent does not use LLMs and runs only on rules, so it cannot execute tools or connect externally
  4. An agent cannot generate text and only classifies images
Show answer and explanation

Answer: A An agent plans toward a goal, acts using tools, observes the results and decides its next action

With an LLM at its core, an agent advances through multiple steps in a loop of planning, tool execution, observation and replanning. The goal is given by a person.

Q2. Which best describes the background to the attention AI agents are receiving?

  1. Because using agents makes model usage free of charge
  2. Because law restricted business use of generative AI and required agents instead
  3. Because research has proven that agents make no errors even without human checks
  4. Because LLM reasoning abilities and tool integration mechanisms have improved, making it possible to delegate multi-step work
Show answer and explanation

Answer: D Because LLM reasoning abilities and tool integration mechanisms have improved, making it possible to delegate multi-step work

Developments such as reasoning models, long context windows, Function Calling and MCP are behind it.

Reference links

3.2RAG

RAG (how it works, advanced forms, use cases)

Concept

RAG (retrieval-augmented generation) searches internal documents and the like for information related to the question and passes it to the LLM to answer. It can answer from up-to-date or internal information it did not learn, reducing hallucination and showing sources. Advanced forms include better retrieval (hybrid search, reranking), GraphRAG using knowledge graphs, and agentic RAG where an agent searches repeatedly.

How it works / steps

  1. Split internal documents (chunking), embed them and store them in a vector database
  2. Retrieve documents close to the question and add them to the prompt
  3. Show sources in answers so users can check

Workplace example

An internal rules Q&A bot searches the rules with RAG, answers, and shows links to the relevant articles.

Common confusions and exam tips

Mini quiz

Q1. A chatbot about internal rules gives outdated content or nonexistent clauses. Which is the best reason to introduce RAG?

  1. To search current internal documents as evidence and reduce hallucinations
  2. To encrypt input and prevent leaks of internal documents
  3. To redo pretraining on internal rules to update knowledge
  4. To lower the temperature and stabilize wording
Show answer and explanation

Answer: A To search current internal documents as evidence and reduce hallucinations

RAG searches external knowledge and adds it to the prompt. No retraining is needed, and updating information only requires replacing documents. [Other options] Redoing pretraining is costly and needed at every update. Temperature gives no evidence. Encryption is not RAG's purpose.

Q2. Which best describes chunking in RAG?

  1. Splitting the user's question into words and having each word answered in order; the finer, the more accurate
  2. Displaying the answer text in pieces that fit on the screen; the shorter the pieces, the more accurate the answer
  3. Splitting documents into units of a suitable size for search; too large or too small lowers search accuracy
  4. Splitting documents by department and storing them on separate servers; more storage locations raise search accuracy
Show answer and explanation

Answer: C Splitting documents into units of a suitable size for search; too large or too small lowers search accuracy

Chunks that are too large mix in unrelated content, and chunks that are too small lose context. Techniques include splitting by heading or adding overlap.

Reference links

3.3How AI agents work

How AI agents work (task decomposition and planning, tool execution, memory, context engineering, feedback loops)

Concept

An agent breaks a goal into small tasks and plans, runs tools (search, calculation, APIs), observes the results and decides its next action (feedback loop). Memory includes short-term memory within a conversation and long-term memory across conversations. Context engineering is the craft of selecting and assembling the information passed to the LLM (instructions, history, search results, tool results).

How it works / steps

  1. Break the goal into tasks
  2. Call the needed tools and check results
  3. Revise the plan based on results and repeat until the goal is reached

Workplace example

A travel agent proceeds through checking dates → searching transport → checking rules → drafting a booking, finding another option if a rule is violated.

Common confusions and exam tips

Mini quiz

Q1. Which best describes an AI agent's “short-term memory” and “long-term memory”?

  1. Short-term memory is the context of the current conversation or task; long-term memory stores past interactions, user information and so on for later use
  2. Short-term memory refers only to GPU memory and long-term memory only to hard disks
  3. They are divided by who remembers: short-term is what users remember, long-term is what administrators remember
  4. By rule, short-term memory is deleted automatically after a day and long-term memory after a year
Show answer and explanation

Answer: A Short-term memory is the context of the current conversation or task; long-term memory stores past interactions, user information and so on for later use

An agent puts needed information into its context. Designing what to store, how much, and when to use it is context management.

Q2. An internal Q&A agent loses accuracy as conversations get longer. From a context engineering view, which fix is best?

  1. Switch to a larger context window and keep feeding the whole history
  2. Refine the prompt wording and give instructions more politely
  3. Further train the model on internal documents to store knowledge in weights
  4. Select the instructions, documents, history and tool results the task needs and put them in context
Show answer and explanation

Answer: D Select the instructions, documents, history and tool results the task needs and put them in context

The context window has a limit, and unnecessary information lowers accuracy. Designing what goes in determines performance. [Other options] Feeding all history adds noise and lowers accuracy. Wording alone does not fix what goes in. Further training is a different approach from context design.

Reference links

3.4MCP, Agent Skills and external integration

MCP, Agent Skills and external integration (MCP, A2A, multi-agent)

Concept

MCP (Model Context Protocol) is a standard way to connect AI apps with external tools and data; build an MCP server once and many AI apps can use it. A2A (Agent2Agent) is a way for different agents to collaborate. Agent Skills give an agent packaged procedures and knowledge for specific work. Multi-agent is a configuration where several agents with different roles cooperate.

How it works / steps

  1. Expose internal systems as MCP servers so AI apps can use them
  2. For collaboration among agents with different roles, use A2A or multi-agent configurations
  3. Keep the permissions of connected tools minimal

Workplace example

A sales support agent reads CRM data via MCP and asks a separate specialist agent via A2A to create a quote.

Common confusions and exam tips

Mini quiz

Q1. Which best describes multi-agent?

  1. Adding the weights of multiple models together into one model to improve performance
  2. A configuration where multiple agents with different roles divide and coordinate work on a task
  3. Multiple users using one agent at the same time
  4. Showing the agent's screen on multiple displays
Show answer and explanation

Answer: B A configuration where multiple agents with different roles divide and coordinate work on a task

Roles are divided, such as researcher, writer and reviewer. Some configurations delegate work to subagents.

Q2. Which statement about MCP is NOT appropriate?

  1. It is positioned as a common standard connecting AI apps with external tools and data sources
  2. Once connected to an MCP server, it can be used safely without setting access permissions
  3. Managing which operations are allowed for each connection target becomes important
  4. Once you build an MCP server, multiple compatible AI apps can use it
Show answer and explanation

Answer: B Once connected to an MCP server, it can be used safely without setting access permissions

MCP standardizes connections, but safety depends on permission management and the trustworthiness of connection targets.

Reference links

3.5AI agent tools and use cases

AI agent tools and use cases (coding agents, browser operation, deep research)

Concept

Typical uses include coding agents that write, fix and test code; browser-operating agents that operate web browsers to enter data or gather information; and deep research that investigates many sources and compiles a report.

How it works / steps

  1. Start with routine research or development work
  2. People check the results of agent work
  3. Limit the scope of operations (allowed sites and repositories)

Workplace example

For market research, deep research compiles public information on five competitors, and the person in charge checks sources before using it in a report.

Common confusions and exam tips

Mini quiz

Q1. To improve a coding agent, you set up automatic test runs, available tools and permission scope. What is this work called?

  1. Human-in-the-loop
  2. Prompt engineering
  3. Harness engineering
  4. Fine-tuning
Show answer and explanation

Answer: C Harness engineering

For coding agents and the like, designing the “mechanisms that run it,” such as automatic tests and permission control, determines quality. [Other options] Prompt engineering refines instructions. Fine-tuning further trains the model. Human-in-the-loop adds human checks, not the whole execution setup.

Q2. Which best describes deep research?

  1. A function where an agent searches and reads across multiple sources and compiles a research report with citations
  2. A function that digs deep into old data in internal databases and deletes it
  3. A function that estimates image depth to make 3D images or models from flat photos
  4. A function that spends time repeatedly reading and summarizing only one specified web page
Show answer and explanation

Answer: A A function where an agent searches and reads across multiple sources and compiles a research report with citations

Deep research automates investigation, but a person must check whether sources are primary and whether content is correct.

Reference links

3.6AI agent risks, safety and evaluation

AI agent risks, safety and evaluation (least privilege, prompt injection, Human-in-the-Loop, Eval)

Concept

Agent risks include wrong operations, misuse of permissions, prompt injection (behavior hijacked by instructions hidden in external documents and the like) and information leaks. Countermeasures are least privilege (allowing only needed operations), Human-in-the-Loop (a person checks and approves before important operations), operation logs, and evaluation (Eval: measuring quality and safety with test scenarios).

How it works / steps

  1. Keep the permissions given to agents to the necessary minimum
  2. Put human approval before transfers, deletions, external sending and the like
  3. Evaluate regularly with test scenarios and monitor operation logs

Workplace example

An accounting agent can register invoices but cannot execute payments without approval from the person in charge.

Common confusions and exam tips

Mini quiz

Q1. After a file conversion error, an agent finished the task another way. Which mechanism supports this?

  1. Retraining the model on the spot from user ratings
  2. A loop of reasoning, acting, observing results and replanning
  3. Repeating the same step a fixed number of times on errors
  4. A workflow with every step fixed in advance and run in order
Show answer and explanation

Answer: B A loop of reasoning, acting, observing results and replanning

The observe → replan loop lets the agent try another method even if it fails partway. [Other options] Repeating the same step cannot try another way. Models are not retrained on the spot. A fixed workflow does not adjust plans to results.

Q2. Which is the most appropriate way to roll out agents in work?

  1. Roll out to every task company-wide at once and stop wherever problems appear
  2. No need to revisit staff roles; roll out without changing workflows to reduce frontline burden
  3. Do no evaluation or monitoring until results appear
  4. Pilot small with low-impact routine work, evaluate effects and risks, then expand scope
Show answer and explanation

Answer: D Pilot small with low-impact routine work, evaluate effects and risks, then expand scope

It is common to start small, evaluate, and expand while designing role division and approval flows.

Reference links

Lessons are written by this site based on public information and do not guarantee exam content. Product specifications change, so check the latest information at the reference links.

Notes (unofficial, original questions, no pass guarantee)