Skip to main content
Loading navigation
Back to prompt library

Develop OpenAI o4-mini Classification and Extraction

Linked challenge: Automate FOIA Request Processing

Prompt source

implementation1 lines1 sectionsNo variables0 checklist items
Within your AI SDK API route, use OpenAI o4-mini to classify the parsed FOIA request text into 'Legitimate', 'Spam', or 'Ambiguous'. Additionally, for 'Legitimate' requests, extract key entities such as `requesting_party`, `subject_matter`, and `date_range`. Design a Zod or TypeScript interface for the structured output from the OpenAI call. Provide the prompt engineering and function call definition for `o4-mini`.