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...
LLM finetuning is all about taking a pre-trained LLM and training it further on your own domain/task-specific data so it becomes specialized for your use case. In fine tuning, model might haven't seen this type of complex data during pre-training and we would like to tune the model with this complex data. Here we are not talking about changing the model, we are going to use same model where we have less accuracy but we will train it further with this complex set of data to make the model perfect. Generally prompt engineering rely on the current knowledge of LLM, and we will use RAG to get more accuracy in our project specific data. If problem is beyond this, then we end up fine-tuning model itself. Drug discovery companies, Oil and Gas etc. domains use model fine-tuning as data is very rare . What is model fine-tuning is still not enough ? Then we have obviously go for developing a new ML model. Sometime, for some use cases - a combination of fine-tuning model + prompt engin...