Back to Prompt Library
planning

Initial Agent Configuration and Tool Definition

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

Linked challenge: Global Tax & Legal Compliance Advisor Agent

Format
Code-aware
Lines
18
Sections
4
Linked challenge
Global Tax & Legal Compliance Advisor Agent

Prompt source

Original prompt text with formatting preserved for inspection.

18 lines
4 sections
No variables
1 code block
You are setting up an OpenAI Assistant for tax and legal compliance. Define an initial Assistant named 'GlobalTaxAdvisor'. Create a custom tool, 'query_legal_database', that takes 'country' and 'keywords' as arguments and returns relevant legal document snippets. Provide the Python code for defining this tool and integrating it with your OpenAI Assistant.

```python
from openai import OpenAI
client = OpenAI()

# Define the tool's function
def query_legal_database(country: str, keywords: str) -> str:
    # This will be replaced by actual Pinecone search
    if country == "Germany" and "corporate tax" in keywords:
        return "According to German Corporate Tax Act §23, the corporate tax rate is 15%."
    return "No relevant information found for the query."

# Add tool to Assistant (conceptual)
# assistant = client.beta.assistants.create(
#     name="GlobalTaxAdvisor",
#     instructions="You are an expert tax and legal advisor...",
#     model="gpt-4o",
#     tools=[{"type": "function", "function": query_legal_database}]
# )
```

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 role framing, objective, and reporting structure so comparison runs stay coherent.

Tune next

Swap in your own domain constraints, anomaly thresholds, and examples before you branch variants.

Verify after

Check whether the prompt asks for the right evidence, confidence signal, and escalation path.