Use document context in your prompt
Provide the generative AI with your document content to define more detailed instructions, or to set a context so the AI can expand a paragraph while taking into account other elements in the document.
Prerequisites
- Create a Google document or open a document that you own.
- You have launched GPT for Docs by selecting Extensions > GPT for Sheets and Docs > Launch.
Use the whole document as context
Select Write custom prompt and write a prompt. We are writing a thank you note.
Write all the necessary context in your Google document if there is none present yet.
Select Use selection or document as context and click Submit.
GPT for Docs includes your document's context to the prompt, allowing ChatGPT to leverage the context to write the note.

Use a selection as context to expand your content
Select Write custom prompt and write a prompt. We want GPT for Docs to expand on an important theme in our letter.
Select the content to expand.
Select Use selection or document as context and click Submit.
GPT for Docs includes your selection to the prompt, allowing ChatGPT to leverage the context to expand your content.

Use multiple selections as context
Select Write custom prompt and write a prompt. We want GPT to expand on a paragraph.
Select multiple paragraphs. We are selecting the paragraph to be expanded and the context to take into account, like the teacher's name.
Select Use selection or document as context and click Submit.
GPT for Docs includes your selections to the prompt, allowing ChatGPT to leverage multiple contexts to expand your content.
