diff --git a/guides/ai-agents/best-practices.mdx b/guides/ai-agents/best-practices.mdx index 0ff73261..4b5b4f5c 100644 --- a/guides/ai-agents/best-practices.mdx +++ b/guides/ai-agents/best-practices.mdx @@ -227,6 +227,16 @@ Always-included documents make every prompt larger, which uses more tokens and c Because "always include" changes every future response, switching a document *to* always-included asks for confirmation. Switching back to on-demand retrieval takes effect immediately. Deleting a document also asks for confirmation. +### View, edit, or download a document + +You don't need to delete and re-upload a document to fix a typo, refresh guidance, or update frontmatter. In the agent's knowledge documents list, select the document and click the **View and edit document** (eye) icon to open the fullscreen viewer. From there, click **Edit** to make changes or **Download** to save a copy of the current file. + +You can edit the document's name and content. Markdown documents open in an editor with a live preview, while plain-text documents open in a monospace text area. YAML frontmatter remains in the raw Markdown source but isn't shown in the preview. + +- **Unsaved changes.** Closing the editor with pending changes asks for confirmation. Use **Cancel** to discard changes and return to the viewer. +- **Quotas.** The 20KB per-document and 5MB organization limits also apply to edits. The editor shows the document's size and disables **Save** when the content is over the limit or the name is empty. +- **Summary and context.** When the content changes, Lightdash regenerates the document summary. Saved content is available to the agent on its next message, including for documents that are always included in context. + ### What to upload Good candidates are anything a new analyst on your team would need to read before answering questions, but that doesn't belong in the semantic layer itself: