Skip to main content
All CollectionsPromptsInputs & Snippets
Input Variable: Document Type
Input Variable: Document Type

Learn how to effectively use the Input Variable Document Type in Promptitude for seamless prompt management.

Promptitude Team avatar
Written by Promptitude Team
Updated this week

If you're not familiar with input variables and their function, we recommend reviewing them before proceeding. ;-) Input Variable "Document" Type allows you to upload documents or link to files, enabling the platform to extract and utilize the text within your prompts.

Whether you're looking to generate summaries, extract quotes, or even create content based on document uploads, understanding how to effectively use this input can greatly enhance your productivity and creativity.

What is the Input Variable Document Type?

The Input Variable Document Type is a tool that lets you upload various document formats or provide a public link to a file. The text from these documents is then extracted and parsed within your prompts, giving you the context you need for your tasks. This is particularly useful for incorporating detailed information into your prompts without having to manually input everything.

Supported Formats

  • Word Documents

  • TXT Files

  • PDF Files

- More formats like Presentations, HTML, Markdown, CSV, and TSV will be supported soon.

  • Single File Upload: Each input variable can currently handle the upload of one document at a time.

    • File Size Limit: The maximum file size allowed is 5MB.
      ​

  • Add link: If your document is already published, simply enter its URL and assign a name for quick identification (ensure it is a public link with SSL certificate).

- You can add as many document-type variable inputs to a prompt as you wish.

πŸ“Œ Basic Fields: Required Information

When setting up your document input, you’ll need to fill out some basic fields:

  • Label: This is how you identify the field.

  • Type: Select "Document" as the variable type.

  • Name: This is the ID in double brackets that places the variable within your prompt (e.g., {{document_name}}).

  • Default Document: This is a placeholder document that will be visible in the app and can be used for testing.

  • Content Limit: Set a maximum word count for the input. Since documents can be lengthy, it’s advisable to allow a high word limit to capture the entire content.

πŸ“Œ Advanced Fields: Optional Enhancements

You can also configure some optional fields to enhance your document input:

  • Help Text: Provide additional guidance for users.

  • Display: Choose whether the document input is mandatory or optional.

πŸ‘ŒπŸ» Tips for Using Document Inputs

  • Separate Large Text: If your document contains a lot of information, consider separating it into its own section. You can use quotes to highlight the extracted text, like this: β€œβ€β€{{input_name}}”””.

  • Check URL Validity: Ensure that any URL you provide is public and has an SSL certificate. If you encounter issues, use the Preview Prompt functionality to verify that the text has been extracted correctly.

✏️ Example in Action

To get a feel for how this works, try using a simple prompt example from our inspiration library. For instance, you can Generate a Work Plan to see the document input in action.

Practical Use Cases

  • Internal Summaries: Create a prompt for your team to upload documents that need quick summarization, saving time and effort in manual reviews.

  • Generate Quotes: Share a prompt publicly where partners can upload briefs in PDF format, and quickly generate tailored quotes or responses.

  • Professional Profiles: Offer a tool in the Promptitude community where users can upload their resumes in DOC format to generate polished texts for their LinkedIn profiles.

⚠️ Important Considerations

  • Token Limitation: Remember that the content of your uploaded document counts towards the token limit of the AI model used. Select models with a large context window to avoid errors or incomplete processing.

Practical example

The Claude family from Anthropic offers a context window of 200K tokens. However, if your prompt includes 3 document-type variable inputs with the following token counts:


​Content 1: 50K tokens | Content 2: 100K tokens | Content 3: 60K tokens.
Prompt = 210K tokens ❌

You may encounter errors or hallucinations. This is because your content exceeds the token limit, which, along with the tokens used by your prompt text, may lead to issues.

Additionally, adding more inputs of this kind will further increase the token count. Therefore, it's essential to manage your inputs carefully and consider the word count of uploaded documents, even if they are under 5MB in size.

  • Public Accessibility: If you publish your prompt or share it, any document included as a default value will be public. Ensure that no sensitive information is inadvertently shared.

  • Overall Size Limit: The total size of your prompt, after including documents, should not exceed 25MB to ensure smooth operation and compliance with platform limits.

The Input Variable Document Type in Promptitude is a powerful feature that streamlines the way you manage and utilize documents in your prompts. By understanding how to upload files, configure settings, and extract text, you can enhance your productivity and make the most of your experience with the platform.

Happy prompting!

Did this answer your question?