Back to prompt library
Define Pydantic AI LEI Audit Agent
Linked challenge: Build an LEI Verification Guardrail using Pydantic AI and GPT-5 Pro
Prompt source
implementation12 lines4 sectionsNo variables0 checklist items
from pydantic import BaseModel, Field
from pydantic_ai import Agent
class LEIAuditResult(BaseModel):
parent_lei: str = Field(description="20-character parent LEI code")
status: str
audit_pass: bool
lei_agent = Agent(
'openai:gpt-5-pro',
result_type=LEIAuditResult,
system_prompt='Analyze corporate filing text and determine parent LEI ownership status.'
)
# Implement run execution with context dependencies...