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 an 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

  • Prompts run on GPT models powered by Azure OpenAI Service.
  • This capability is limited to some regions.
  • This capability might be subject to usage limits or capacity throttling.
  • Inputs can't contain instructions. Any such instructions are forbidden for security reasons.

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. Actions available include text summarization, text classification, extracting text information, sentiment analysis of text, text generation.

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, files passed to be prompt must total less than 25 MB for all files.
  • For image or document input, file types are generally limited to PNG, JPG, JPEG, and PDF. However, Word, Excel, and PowerPoint files are supported as document inputs for analysis when code interpreter is turned on in prompt settings. Learn more in Use code interpreter in a prompt to generate and execute Python code.
  • For image or document input, information extracted from large documents might be inaccurate or incomplete, especially for table lines.
  • Image or document processing is restricted to a maximum of 100 seconds. If this limit is exceeded, the operation terminates with a timeout error.
  • Documents must have fewer than 50 pages.
  • Image or document input isn't yet supported for prompts added as tools in Copilot Studio agents.
  • Depending on the model you select for your prompt, the number of input and output tokens you're allowed in each exchange with the model varies. Different models also have different levels for billing. Learn more in Change the model version and settings.