Codele / LLMs, RAG and agentic AI
Testing and guardrails
How do you trust an agent? You test it with the same questions after every change, and you put rails around it. Switch the guardrails on and off and watch a hidden order.
- An eval is a fixed list of test questions with expected answers. Run it after every change to catch what broke.
- Prompt injection: text inside a document or web page that tries to give the model orders. Treat such text as data, never as instructions.
- More guardrails: validate inputs (check them before use), limit tools (give the agent only the powers it needs), and ask a person for a human yes before risky actions such as refunds.
- No guardrail is perfect. Prompt injection has no complete fix, so use several layers and keep powers small.
- This toy uses simple rules instead of a model, so the lesson shows the mechanism, not how real models behave.
Loading the playable lesson…