Skip to main content

Use document context in your prompt

Provide the model with your document content to define more detailed instructions, or to set a context to expand a paragraph while taking into account other elements in the document.

Prerequisites
You have opened a Google document and selected Extensions > GPT for Sheets and Docs > Launch.

Use the whole document as context

  1. Select Write custom prompt and write a prompt. We are writing a thank you note.

  2. Write all the necessary context in your Google document if there is none present yet.

  3. Select Use selection or document as context and click Submit.

GPT for Docs adds the context of your document to the prompt, enabling the model to generate a note based on that context.

A thank you note reponse appeared in the document using the whole document as context

Use a selection as context to expand your content

  1. Select Write custom prompt and write a prompt. We want GPT for Docs to expand on an important theme in our letter.

  2. Select the content to expand.

  3. Select Use selection or document as context and click Submit.

GPT for Docs adds your selection to the prompt, enabling the model to generate expanded content based on that context.

Use multiple selections as context

  1. Select Write custom prompt and write a prompt. We want GPT for Docs to expand on a paragraph.

  2. Select multiple paragraphs. We are selecting the paragraph to be expanded and the context to take into account, like the teacher's name.

  3. Select Use selection or document as context and click Submit.

GPT for Docs adds your selections to the prompt, enabling the model to generate expanded content based on those multiple contexts.