natalieac03/MIni-Assistente — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a simple Jupyter Notebook project for a mini legal office message classifier in Portuguese.

I want to type a short WhatsApp style message into an interactive console, and the notebook should call an LLM through OpenRouter, then return only a small JSON with the message category and a short reason. The possible categories should be Processual, Financeiro, Comercial, and Invalida.

Please include setup for reading the OpenRouter API key from a .env file, a clear prompt that forces the model to answer only valid JSON, a few example messages to make the classification more stable, and basic validation so weird model output doesn’t break everything. If the model adds extra text, try to extract the JSON anyway.

Make it easy to run in Jupyter, using Python, requests, and python dotenv. Add sample test messages like prazo de intimação, honorários, proposta de contrato, and emoji or kkkkk as invalid. The console should keep asking for messages until I type sair.

Want more depth? Deep Reverse