Edit

Share via


Add inputs to your prompt

You can enhance your prompts by allowing users or systems to input text, images, or documents at prompt runtime, whether in an app, a flow, or a copilot agent. By providing these input modalities, you enable the prompt to act on a diverse range of data types, which expands the usability of the prompt.

Important

Add an input to a prompt

To include an input object:

  1. On the navigation pane, select AI hub > Prompts

  2. Select the prompt you want to add an input to, or create a new one.

  3. In the Instructions panel, type / or select Add content.

  4. in the Input section of the dropdown menu, select Text, Image or document, or Power Fx.

    Screenshot of adding input.

Text input

When you use text inputs, you can perform actions on text content that dynamically pass to the prompt at runtime, such as text summarization, text classification, extracting text information, sentiment analysis of text, text generation, and more.

Screenshot of summarizing with a text input.

If you're satisfied with your prompt, select Text input in the prompt instructions to add Sample data. You can also change the input name from Text input to the value of your choice in the Name field.

Screenshot of changing the input name and adding sample data.

Image or document input

When you use image or document inputs, you can perform actions on file content that dynamically pass to the prompt at run time, such as file summarization, file categorization, extracting file information (both textual and visual), asking questions on file, and many more. It's also possible to combine both text and document or image inputs in the same prompt.

Screenshot of extracting information from a document.

If you're satisfied with your prompt, select Document input in the prompt instructions to add Sample data. You can also change the input name from Document input to the value of your choice in the Name field.

Screenshot of changing the input name and uploading sample data.

File types supported with image or document input are PNG, JPG, JPEG, and PDF.

Power Fx input

When you use Power Fx inputs, you augment your prompt with formulas. You perform operations like retrieving the current date, formatting or searching text, performing calculations, or working with memory tables. You can use any Power Fx functions that aren't related to connectors. You can use your prompt inputs as arguments for the function with this syntax: Input.'Your input name'.

For example, you can get the current date and apply formatting provided as a prompt input with this syntax: Text(Now(), Input.'Date Format').

Screenshot of using Power Fx formulas in a prompt.

Learn more in Power Fx formula reference overview about the functions available.

Limitations

  • For image or document input, size limitation for the files passed to be prompt is 25 MB in total for all files.
  • For image or document input, you can't pass a file with a type other than PNG, JPG, JPEG, and PDF.
  • For image or document input, extracting information from large documents might not be accurate and skip information, especially for table lines.
  • There's a limitation of processing documents with fewer than 50 pages.
  • Image or document input isn't yet supported for prompts in Microsoft Copilot Studio.