Key points while writting prompt for AI
1️⃣ Be Clear & Specific Don’t be vague. Say exactly what you want. ❌ “Extract details from this text” ✅ “Extract vehicle registration number, make, and damage details from the text and return JSON” 2️⃣ Define the Role of the AI Tell the AI who it should act as . ✅ “You are a police incident data extractor” ✅ “Act as a senior Python developer reviewing extraction logic” This sets context and improves accuracy. 3️⃣ Specify the Output Format Always mention how the response should look . JSON / Table / Bullet points Field names Yes/No instead of true/false e.g: Return the output in strict JSON with no extra text. 4️⃣ Add Rules & Constraints Very important for consistency. What must be included What must not be done Edge cases Example: Do NOT merge vehicles Capture vehicles even if repeated in different sections 5️⃣ Handle Edge Cases Explicitly AI guesses if you don’t guide it. ✅ “If registration number is missing, set it to null” ...