Develop OpenAI o4-mini Classification and Extraction

implementationChallenge

Prompt Content

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`.

Try this prompt

Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.

Usage Tips

Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)

Customize placeholder values with your specific requirements and context

For best results, provide clear examples and test different variations