> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formai.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Add context from a PDF or web page

> Give FormAI a PDF document or a web page to draft questions from, instead of describing everything yourself.

Add context when you already have source material, such as a report, a training document, or an article. FormAI uses it to draft your questions.

You add context in the **Create a new form** dialog, next to the topic field. There are two sources.

| Source | What it does |
| - | - |
| **PDF document** | "Upload a PDF — questions are extracted into a draft" |
| **Web page** | "Paste any URL — FormAI drafts questions from its content" |

<Frame caption="Add context from the Create a new form dialog, using a PDF or a web page.">
  <video autoPlay muted loop playsInline className="w-full" src="https://mintcdn.com/formai-app/XBaZxbZCaxkDZx0d/videos/add-context.mp4?fit=max&auto=format&n=XBaZxbZCaxkDZx0d&q=85&s=9452dc4ffa69d8adf251a35c2c8969cb" aria-label="The Create a new form dialog with the Add context menu opening to show the PDF document and Web page options" data-path="videos/add-context.mp4" />
</Frame>

## Draft from a PDF or web page

<Steps>
  <Step title="Open the New form dialog">
    On the **Dashboard**, click **New form**, then choose **Survey**, **Quiz**, or **Live** and a workspace.
  </Step>

  <Step title="Describe your form">
    Enter a topic in the field marked "Draft your survey topic". The field is marked as required, so describe what you want to ask even when you add context.
  </Step>

  <Step title="Open the Add context menu">
    Click **Add context**. The menu is titled "ADD CONTEXT FROM" and lists **PDF document** and **Web page**.
  </Step>

  <Step title="Choose a source">
    * For a **PDF document**, upload your PDF.
    * For a **Web page**, paste the page's URL.
  </Step>

  <Step title="Choose a question count and generate">
    Pick a size from the question count menu, then click **Generate**. The editor opens with your draft. See [Generate with AI](/user-guide/create/generate-with-ai) for what to expect.
  </Step>
</Steps>

## Tips

<Tip>
  If your source covers many subjects, try mentioning in the topic field which part you want questions about, along with your audience and goal.
</Tip>

* Treat the result as a first draft. Compare the questions with your source and edit anything that is off.
* Only use documents and pages you are allowed to use. For how FormAI handles your data, see [Security and privacy](/user-guide/security-and-privacy).

<Note>
  AI can make mistakes. Review the generated questions before you publish. Generating from context uses AI credits like any other generation. See [Plans and AI credits](/user-guide/account/plans-and-ai-credits).
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Generate with AI" icon="sparkles" href="/user-guide/create/generate-with-ai">
    Write a prompt and pick a question count.
  </Card>

  <Card title="Question types" icon="list-check" href="/user-guide/editor/question-types">
    Learn what each question type collects.
  </Card>

  <Card title="Edit with FormAI Agent" icon="wand-magic-sparkles" href="/user-guide/editor/edit-with-ai-agent">
    Ask the agent to adjust the draft.
  </Card>

  <Card title="Preview" icon="eye" href="/user-guide/editor/preview">
    See how the draft looks on desktop and mobile.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.