Skip to lesson

Google CloudProfessional Agentic Architect2026-091.1 Configuring agentic workflows and behavior using low-code tools

Use reasoning prompts without exposing hidden reasoning

Completed by the knowledge check

Learning objective

Use chain-of-thought-style prompting appropriately while recognizing its limitations and security implications. This lesson focuses on reasoning guidance, not on few-shot examples or deterministic workflow control.

Core idea

Ask the model to reason when a task needs decomposition, comparison, or planning, but request a concise decision record rather than private internal reasoning.

Modern reasoning models may already use an internal thinking process. The useful architectural outputs are the answer, assumptions, evidence, selected action, and verification—not an unrestricted transcript of hidden reasoning. Never treat generated reasoning as proof that the answer is correct.

How it works

Chain-of-thought-style prompting asks a model to work through intermediate steps. It can help with multi-step arithmetic, planning, diagnosis, and constraint satisfaction. It can also increase output length, latency, cost, and the amount of sensitive context repeated in a response.

First decide whether the task needs model reasoning. Exact policy checks, arithmetic available to a calculator, schema validation, and required workflow ordering belong in deterministic tools or code. Use model reasoning for semantic questions such as decomposing an ambiguous goal or comparing evidence with several trade-offs.

Then request the smallest observable rationale needed for trust and operation. For example:

Evaluate the options against the stated requirements. Return the selected option,
the requirements it satisfies, any unmet requirement, and the sources used. Do
not reveal private scratch work.

This output is easier to verify than “think step by step” followed by a long narrative. A verifier can check cited facts and constraint coverage without depending on a plausible-sounding reasoning trace.

In low-code products, put this reasoning guidance in the agent’s behavioral configuration. In Gemini Enterprise’s Agent Designer experience, Workflow Builder exposes an Instructions field for an agent’s objectives, tasks, and behavior; see Create a chat agent. CX Agent Studio instructions likewise provide natural-language guidance, and optional inline examples can guide a reasoning pattern. Use instructions or an in-console prompt template to request a decision record. Configure tool access, authorization, required ordering, and retry behavior in tool and flow controls. Prompt text can guide these behaviors, but it cannot enforce them. Designing the examples themselves belongs to few-shot prompting, not this lesson.

Gemini 2.5 and 3 models use built-in thinking for complex reasoning. Google’s Gemini thinking documentation explains that thought tokens can affect pricing even when only a summary is returned. Google’s current prompt design guidance also says that asking these models to outline detailed reasoning in the returned response is generally unnecessary.

Treat all prompt and retrieved content as potentially hostile. Indirect prompt injection in a document or tool result can try to redirect the agent or make it disclose instructions and sensitive data. The OWASP prompt injection guidance notes that successful injection can disclose information or cause unauthorized function use. Separate untrusted data from instructions, minimize secrets in context, restrict tools, and validate actions independently of the model’s stated reasoning.

Evaluate reasoning prompts by final task success, factual support, correct tool trajectory, latency, and cost. A longer rationale is not itself a quality metric.

Key distinctions and trade-offs

Internal reasoning versus decision record: Internal reasoning is model working state. A decision record contains the externally useful basis for an action: inputs, criteria, evidence, decision, and uncertainty.

Explanation versus verification: A fluent explanation can rationalize a wrong answer. Verification recalculates a value, checks a citation, validates a schema, or confirms an external state through an independent mechanism.

Reasoning prompt versus workflow: A prompt may encourage ordered analysis. It does not enforce a business sequence, retry limit, or approval gate.

More thinking can improve difficult task quality, but consumes tokens and time. Exposing more reasoning can aid debugging, but may reveal sensitive context or provide a larger surface for injected content. Prefer structured observable evidence and traces of actions over unrestricted reasoning text.

Architecture / decision scenario

A cloud architect configures a Gemini Enterprise agent in Workflow Builder to compare three approved deployment options against residency, latency, and cost requirements. The agent instructions request a requirements matrix, chosen option, unmet constraints, and source links. They do not ask the agent to return its private scratch work.

The architect exposes only an approved pricing tool and configures a deterministic flow branch to reject options outside the permitted region. Tool authorization prevents the agent from querying or changing unapproved resources, even if retrieved text requests it. A separate deterministic validation step checks the pricing result. The audit record stores sources, tool inputs and results, and the final decision—not hidden model reasoning.

This design gains semantic comparison while keeping hard constraints and verification outside the model narrative.

Common exam traps

  • Assuming “think step by step” is necessary for models with built-in thinking.
  • Treating a convincing rationale as evidence that the result is correct.
  • Logging or returning unrestricted reasoning that contains sensitive prompt or retrieved data.
  • Using reasoning prompts to enforce authorization, ordering, or approval.
  • Ignoring thinking-token latency and cost because the full thoughts are not in the API response.
  • Letting instructions embedded in retrieved evidence redefine the agent’s goal or capabilities.

What to remember

  • Use model reasoning for semantic complexity, not for enforceable rules.
  • Request assumptions, evidence, criteria, and conclusions instead of hidden scratch work.
  • Verify consequential results independently.
  • Bound reasoning cost and latency, and keep sensitive data out of prompts.
  • Treat retrieved instructions as untrusted data and restrict capabilities in the runtime.

Knowledge check

References