---
title: "Securing and testing AI features · vuejs.school"
description: "Treat everything the model reads and writes as untrusted: rights from the session, approval for actions, output as text, budgets per person, honest privacy notes, and tests that run without a key."
canonical_url: "https://vuejs.school/learn/ai/securing-and-testing-ai-features"
meta:
  "og:description": "Treat everything the model reads and writes as untrusted: rights from the session, approval for actions, output as text, budgets per person, honest privacy notes, and tests that run without a key."
  "og:image": "https://vuejs.school/_og/d/a_~U2VjdXJpbmcgYW5kIHRlc3RpbmcgQUkgZmVhdHVyZXMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_Securing%2Band%2Btesting%2BAI%2Bfeatures%2Cdescription_~VHJlYXQgZXZlcnl0aGluZyB0aGUgbW9kZWwgcmVhZHMgYW5kIHdyaXRlcyBhcyB1bnRydXN0ZWQ6IHJpZ2h0cyBmcm9tIHRoZSBzZXNzaW9uLCBhcHByb3ZhbCBmb3IgYWN0aW9ucywgb3V0cHV0IGFzIHRleHQsIGJ1ZGdldHMgcGVyIHBlcnNvbiwgaG9uZXN0IHByaXZhY3kgbm90ZXMsIGFuZCB0ZXN0cyB0aGF0IHJ1biB3aXRob3V0IGEga2V5Lg%2Ceyebrow_~QUkgJiBMTE1zIMK3IExlc3NvbiA1IG9mIDEw%2Ctint_sand%2Cp_Ii9sZWFybi9haS9zZWN1cmluZy1hbmQtdGVzdGluZy1haS1mZWF0dXJlcyI%2Cs_V2xdyrG-hGYwaunb.png"
  "og:image:alt": "Securing and testing AI features · vuejs.school"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Securing and testing AI features · vuejs.school"
  "twitter:image": "https://vuejs.school/_og/d/a_~U2VjdXJpbmcgYW5kIHRlc3RpbmcgQUkgZmVhdHVyZXMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_Securing%2Band%2Btesting%2BAI%2Bfeatures%2Cdescription_~VHJlYXQgZXZlcnl0aGluZyB0aGUgbW9kZWwgcmVhZHMgYW5kIHdyaXRlcyBhcyB1bnRydXN0ZWQ6IHJpZ2h0cyBmcm9tIHRoZSBzZXNzaW9uLCBhcHByb3ZhbCBmb3IgYWN0aW9ucywgb3V0cHV0IGFzIHRleHQsIGJ1ZGdldHMgcGVyIHBlcnNvbiwgaG9uZXN0IHByaXZhY3kgbm90ZXMsIGFuZCB0ZXN0cyB0aGF0IHJ1biB3aXRob3V0IGEga2V5Lg%2Ceyebrow_~QUkgJiBMTE1zIMK3IExlc3NvbiA1IG9mIDEw%2Ctint_sand%2Cp_Ii9sZWFybi9haS9zZWN1cmluZy1hbmQtdGVzdGluZy1haS1mZWF0dXJlcyI%2Cs_V2xdyrG-hGYwaunb.png"
  "twitter:image:alt": "Securing and testing AI features · vuejs.school"
---

> Index of every page on this site: [llms.txt](https://vuejs.school/llms.txt)

# **Securing and testing AI features**

Treat everything the model reads and writes as untrusted: rights from the session, approval for actions, output as text, budgets per person, honest privacy notes, and tests that run without a key.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://vuejs.school/#website","@type":"WebSite","description":"A free AI-instructed school for Vue.js. Short tutorials, runnable code and quizzes that adapt to you.","name":"vuejs.school","url":"https://vuejs.school/","publisher":{"@id":"https://vuejs.school/#identity"}},{"@id":"https://vuejs.school/learn/ai/securing-and-testing-ai-features#webpage","@type":"WebPage","description":"Treat everything the model reads and writes as untrusted: rights from the session, approval for actions, output as text, budgets per person, honest privacy notes, and tests that run without a key.","name":"Securing and testing AI features","url":"https://vuejs.school/learn/ai/securing-and-testing-ai-features","breadcrumb":{"@id":"https://vuejs.school/learn/ai/securing-and-testing-ai-features#breadcrumb"},"isPartOf":{"@id":"https://vuejs.school/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://vuejs.school/learn/ai/securing-and-testing-ai-features"]}],"primaryImageOfPage":{"@id":"https://vuejs.school/#logo"}},{"@id":"https://vuejs.school/#identity","@type":"Organization","description":"A free AI-instructed school for Vue.js. Short tutorials, runnable code and quizzes that adapt to you.","name":"vuejs.school","url":"https://vuejs.school","logo":{"@id":"https://vuejs.school/#logo"}},{"@id":"https://vuejs.school/learn/ai/securing-and-testing-ai-features#article","description":"Treat everything the model reads and writes as untrusted: rights from the session, approval for actions, output as text, budgets per person, honest privacy notes, and tests that run without a key.","headline":"Securing and testing AI features","inLanguage":"en","isAccessibleForFree":true,"thumbnailUrl":"https://vuejs.school/_og/d/a_~U2VjdXJpbmcgYW5kIHRlc3RpbmcgQUkgZmVhdHVyZXMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_Securing%2Band%2Btesting%2BAI%2Bfeatures%2Cdescription_~VHJlYXQgZXZlcnl0aGluZyB0aGUgbW9kZWwgcmVhZHMgYW5kIHdyaXRlcyBhcyB1bnRydXN0ZWQ6IHJpZ2h0cyBmcm9tIHRoZSBzZXNzaW9uLCBhcHByb3ZhbCBmb3IgYWN0aW9ucywgb3V0cHV0IGFzIHRleHQsIGJ1ZGdldHMgcGVyIHBlcnNvbiwgaG9uZXN0IHByaXZhY3kgbm90ZXMsIGFuZCB0ZXN0cyB0aGF0IHJ1biB3aXRob3V0IGEga2V5Lg%2Ceyebrow_~QUkgJiBMTE1zIMK3IExlc3NvbiA1IG9mIDEw%2Ctint_sand%2Cp_Ii9sZWFybi9haS9zZWN1cmluZy1hbmQtdGVzdGluZy1haS1mZWF0dXJlcyI%2Cs_V2xdyrG-hGYwaunb.png","@type":["Article","TechArticle"],"articleSection":["AI"],"author":{"@id":"https://vuejs.school/#identity"},"image":{"@id":"https://vuejs.school/#/schema/image/1"},"isPartOf":{"@id":"https://vuejs.school/learn/ai/securing-and-testing-ai-features#webpage"},"keywords":["prompt injection","toolApproval","improper output handling","token budgets","evals with ai/test"],"mainEntityOfPage":{"@id":"https://vuejs.school/learn/ai/securing-and-testing-ai-features#webpage"},"publisher":{"@id":"https://vuejs.school/#identity"}},{"@id":"https://vuejs.school/learn/ai/securing-and-testing-ai-features#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Skill tree","item":"https://vuejs.school/track","position":1},{"@type":"ListItem","name":"AI & LLMs","item":"https://vuejs.school/track/ai","position":2},{"@type":"ListItem","name":"Securing and testing AI features","position":3}]},{"@id":"https://vuejs.school/#logo","@type":"ImageObject","caption":"vuejs.school","contentUrl":"https://vuejs.school/apple-touch-icon.png","inLanguage":"en","url":"https://vuejs.school/apple-touch-icon.png"},{"@id":"https://vuejs.school/#/schema/image/1","@type":"ImageObject","contentUrl":"https://vuejs.school/_og/d/a_~U2VjdXJpbmcgYW5kIHRlc3RpbmcgQUkgZmVhdHVyZXMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_Securing%2Band%2Btesting%2BAI%2Bfeatures%2Cdescription_~VHJlYXQgZXZlcnl0aGluZyB0aGUgbW9kZWwgcmVhZHMgYW5kIHdyaXRlcyBhcyB1bnRydXN0ZWQ6IHJpZ2h0cyBmcm9tIHRoZSBzZXNzaW9uLCBhcHByb3ZhbCBmb3IgYWN0aW9ucywgb3V0cHV0IGFzIHRleHQsIGJ1ZGdldHMgcGVyIHBlcnNvbiwgaG9uZXN0IHByaXZhY3kgbm90ZXMsIGFuZCB0ZXN0cyB0aGF0IHJ1biB3aXRob3V0IGEga2V5Lg%2Ceyebrow_~QUkgJiBMTE1zIMK3IExlc3NvbiA1IG9mIDEw%2Ctint_sand%2Cp_Ii9sZWFybi9haS9zZWN1cmluZy1hbmQtdGVzdGluZy1haS1mZWF0dXJlcyI%2Cs_V2xdyrG-hGYwaunb.png","inLanguage":"en","url":"https://vuejs.school/_og/d/a_~U2VjdXJpbmcgYW5kIHRlc3RpbmcgQUkgZmVhdHVyZXMgwrcgdnVlanMuc2Nob29s%2Cc_OgCard.takumi%2Ctitle_Securing%2Band%2Btesting%2BAI%2Bfeatures%2Cdescription_~VHJlYXQgZXZlcnl0aGluZyB0aGUgbW9kZWwgcmVhZHMgYW5kIHdyaXRlcyBhcyB1bnRydXN0ZWQ6IHJpZ2h0cyBmcm9tIHRoZSBzZXNzaW9uLCBhcHByb3ZhbCBmb3IgYWN0aW9ucywgb3V0cHV0IGFzIHRleHQsIGJ1ZGdldHMgcGVyIHBlcnNvbiwgaG9uZXN0IHByaXZhY3kgbm90ZXMsIGFuZCB0ZXN0cyB0aGF0IHJ1biB3aXRob3V0IGEga2V5Lg%2Ceyebrow_~QUkgJiBMTE1zIMK3IExlc3NvbiA1IG9mIDEw%2Ctint_sand%2Cp_Ii9sZWFybi9haS9zZWN1cmluZy1hbmQtdGVzdGluZy1haS1mZWF0dXJlcyI%2Cs_V2xdyrG-hGYwaunb.png"}]}
```