Skip to main content

Posts

Showing posts with the label Prompt Engineering

(AI #16) Prompt Engineering - Defensive Techniques & Versioning

Prompt engineering defensive techniques are methods used to protect LLM applications from malicious, unsafe, or misleading inputs. These techniques help prevent issues like prompt injection, jailbreaks, data leakage, hallucinations, and unauthorized actions by enforcing input validation, role isolation, output filtering, guardrails, and secure context handling in AI systems. We are going to discuss about two thing in Prompt engineering in this blog. Prompt Defense Prompt Versioning Prompt Defense  Following 8 techniques comes under Prompt defense. Please concentrate carefully. Direct Prompt Injection Indirect Prompt Injection Jail Breaking Role-Play & Persona Exploits Token Smuggling Input Sanitization Prompt Firewall Adversarial Hardening  Lets go through one by one. 1) Direct Prompt Injection Prompt Injection is a type of attack where a user (or a external data source) tries to manipulate an LLM by inserting malicious or misleading instructions into the input so that the...

(AI #15) Prompt Engineering

Prompt Engineering focuses on how we instruct an AI model, while Context Engineering determines what information the model receives. Although well crafted prompts can guide responses, the quality and relevance of context ultimately drive meaningful, accurate outputs. In modern AI systems, true intelligence emerges from combining both - clear instructions supported by right data. Prompt Engineering : Prompt Engineering is about how your write instructions to the model to get desired output.  Focus will be on : Wording of the input Structure of instructions Examples(few-shot learning) Tone, format, constraints etc. Example : You are helpful AI assistant. Summarize following text in 3 bullet points. Techniques : Zero/Few shot prompting Chain-of-thought prompting Role prompting(ex: You are a dev-ops expert.) Output formatting(output, table etc.) Goal : Get better responses by improving the prompt itself. Context Engineering : Context Engineering is about what information you provi...