A lot of LLM and prompt use cases involve external data stored in PDF files. Previously, if you wanted to test with files like PDFs in PromptHub, you’d have to manually parse the document and input it as a variable. Not anymore!
While we’ve long supported uploading image files, we’re excited to introduce PDF File Support. With this feature, you can upload documents directly into the Playground (chat and completion), and we’ll automatically parse them so you can start testing with your data immediately.
This update is perfect for teams and users who want to skip the hassle of using external parsers and jump straight into testing prompts.
Key points
- Upload PDFs directly into the Playground for prompt testing
- The parsed text is appended to your prompt
- Use it with any model, with the only limitation being the context window. Check out our model directory for info on different model context windows
- File upload is available in completion projects, chat projects, and chains.
- Files are versioned as a part of our prompt versioning system
Benefits
- Versatility: Supports files in multiple project types and no strict limit on file size
- Accessibility: Available on all plans, no added cost
- Efficiency: Simplifies handling large documents, saving time
How it works
- Upload your file: Click the upload icon in the completion, chat, or chain playground
- Parse and integrate: The document is automatically parsed and added to your prompt.
- Mind the context window: If the file exceeds the model’s token limit, you’ll receive an alert to switch models.
Demo video
Here’s a quick demo where I run through file uploads in completion and chat projects, as well as in chains
Notes
- File support currently includes PDFs, in addition to image files
- Images have been supported for some time and continue to be available
- The only limitation is the model’s token context window.