Back to Prompt Library
planning|implementation

Agent Setup and Tool Definition

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build an AI-Powered Regulatory Compliance Risk Agent

Format
Text-first
Lines
1
Sections
1
Linked challenge
Build an AI-Powered Regulatory Compliance Risk Agent

Prompt source

Original prompt text with formatting preserved for inspection.

1 lines
1 sections
No variables
0 checklist items
Initialize the OpenAI Agents SDK and define a custom tool named 'legal_database_lookup' that simulates querying a legal database. This tool should accept a 'query' string and return a relevant legal document snippet or summary. Also, define another tool named 'policy_evaluation_tool' that takes a proposed action and a regulation, returning a 'PASS' or 'FAIL' along with a reason. Use Claude Opus 4.1 as your underlying LLM for the agent. Implement Hydra for managing the agent's configuration parameters.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Preserve the source structure until you know which part of the prompt is actually driving the result quality.

Tune next

Change domain facts, examples, and tool context first before you rewrite the instruction scaffold.

Verify after

Validate one failure mode at a time so prompt changes stay attributable instead of getting noisy.