YUNOVA · AI Agents

Module 7: Safety and limits

Notes for offline study · 30 November 2026

Hallucination in agents

Key points

  • Hallucination मतलब model का भरोसे से गलत या मनगढ़ंत जानकारी देना।
  • Agent में यह और खतरनाक है, क्योंकि गलत जानकारी पर tool actions भी लिए जा सकते हैं।
  • RAG, tools से असली data, citations और 'नहीं पता' कहने के निर्देश hallucination कम करते हैं।
  • ज़रूरी actions से पहले output की जाँच या human review रखें।

Prompt injection

Key points

  • Prompt injection में कोई input में छिपे निर्देश डालकर model को उसके असली निर्देशों से भटकाने की कोशिश करता है।
  • Direct injection user खुद लिखता है; indirect injection web page, email या document के अंदर छिपा होता है जिसे agent पढ़ता है।
  • Agent के पास जितने ज़्यादा tools और permissions होंगे, injection का नुकसान उतना ज़्यादा हो सकता है।

Permissions: what an agent is allowed to do

Key points

  • Least privilege का नियम अपनाएँ: agent को सिर्फ़ उतनी पहुँच दें जितनी काम के लिए ज़रूरी है।
  • जहाँ हो सके read-only पहुँच दें; delete, भुगतान या भेजने जैसे actions अलग से नियंत्रित रखें।
  • API keys और credentials सीमित scope वाले रखें और उन्हें prompt में न डालें।

Human approval before a risky action

Key points

  • Human-in-the-loop में agent जोखिम वाले action से पहले रुकता है और इंसान से approval लेता है।
  • पैसे भेजना, email भेजना, data delete करना जैसे actions approval के बाद ही होने चाहिए।
  • Approval माँगते समय agent साफ़ बताए कि वह क्या करने वाला है, ताकि इंसान सोच-समझकर हाँ या ना कहे।

Spending limits and rate limits

Key points

  • Agent loop में अटककर बार-बार model या API call कर सकता है, जिससे खर्च तेज़ी से बढ़ सकता है।
  • Spending limit या budget तय करें, और एक run में अधिकतम steps या tokens की सीमा रखें।
  • Rate limit तय समय में requests की संख्या सीमित करता है, ताकि दुरुपयोग और अचानक भार से बचा जा सके।

Privacy of user data

Key points

  • User का निजी data सिर्फ़ उतना ही model को भेजें जितना काम के लिए ज़रूरी हो।
  • नाम, phone या पहचान जैसी जानकारी ज़रूरत न हो तो हटाएँ या mask करें।
  • संवेदनशील data के लिए local या private deployment वाले models का विकल्प भी होता है।
  • Logs और memory में निजी data कितने समय रहेगा, यह तय करें और users को बताएँ।

Free on YUNOVA · yunova.in · Sign in to add your own lesson notes to this sheet.