Skip to content

[Built-in] Add Dos and Don'ts for AI implementation#893

Open
tomayac wants to merge 1 commit into
mainfrom
tomayac-patch-1
Open

[Built-in] Add Dos and Don'ts for AI implementation#893
tomayac wants to merge 1 commit into
mainfrom
tomayac-patch-1

Conversation

@tomayac

@tomayac tomayac commented May 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@paulirish

Copy link
Copy Markdown
Member

It'd be nice if the agent fetched this but i suspect they would rarely. (i didn't try though)
I think it'd be better if we inlined those do/donts into this guide.

Alternatively we could add evals to see if the dos and donts are followed.. in which case this reference is effective enough.

@tomayac

tomayac commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

In my experience, the agent was fetching the resource, especially when hinted to follow best practices. So based on this, I'd say let's merge and revisit if we get negative feedback?!

- **Aborting Tasks**: Use `AbortController` to allow users to stop long-running generations. Pass the `signal` to `prompt()` or `promptStreaming()`, not to `LanguageModel.create()`.
- **Security**: Use Permission Policies to control access in iframes: `<iframe src="..." allow="language-model"></iframe>`.
- **Design**: Review the [People + AI Guidebook](https://pair.withgoogle.com/guidebook/) to ensure responsible AI implementation.
- **Dos and Don'ts**: See this collection of [technical and UX considerations to help you avoid common pitfalls](https://developer.chrome.com/docs/ai/built-in-ai-dos-donts).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to @paulirish's comment, my preference would be to inline any important and relevant points directly into this guide.

If that's not possible for whatever reason, we could link to the agent-optimized version of the doc: https://developer.chrome.com/docs/ai/built-in-ai-dos-donts.md.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants