Using Front-End File Uploads in SmartForms
Last updated
Was this helpful?
Last updated
Was this helpful?
FormWise allows you to enable file uploads in SmartForms, so your end users can upload PDFs, CSVs, and TXT files to be processed by AI in real-time. This is useful for:
✅ Summarizing long documents (contracts, reports, research papers). ✅ Extracting key data from structured files (CSV spreadsheets, customer records). ✅ Generating AI-powered insights based on user-provided information.
However, large files, too many uploads, or combining file uploads with web browsing & web scraping can cause timeouts. This guide covers best practices for setting up SmartForms with file uploads and how AI processes this data.
When a SmartForm includes a file upload field, your end users can: 🔹 Upload PDFs, CSVs, or TXT files directly into the form. 🔹 Have AI process the file’s content and generate a response based on the text. 🔹 Receive a personalized AI-generated output based on their uploaded document.
💡 Example Use Cases:
A legal firm: Uploads a PDF contract and AI extracts key clauses.
A financial advisor: Uploads a CSV with expense data and AI generates a budget plan.
A real estate agent: Uploads a property listing and AI writes a marketing description.
Ensure you actually add the front-end uploaded data source to your prompt instruction. See screenshot below.
📌 Pro Plan – 2MB max per file (multiple files allowed). 📌 Agency Plan – 20MB max per file (multiple files allowed).
🚀 You can attach multiple files, but larger files or too many files can lead to token issues and timeouts.
✅ There is no hard limit on the number of uploaded files. 🚨 However, too many files at once can cause AI to hit token limits, making responses incomplete or failing to generate.
1️⃣ The AI reads the file’s text and extracts key details. 2️⃣ The AI retrieves the most relevant information when responding. 3️⃣ AI does not "train" on the file—it only references the text during that session.
💡 This is called Retrieval-Augmented Generation (RAG)—think of it like a smart document search, where AI pulls out the most relevant data when needed.
🚨 If an uploaded file is too large or contains too much information, AI may struggle to find the most relevant text, leading to slow or incomplete responses.
✅ Files are temporarily stored in the user's browser cookies. ✅ If they refresh the page, their uploaded files will still be there for that session (so they don’t need to re-upload). ✅ Once they leave the session, the files are no longer stored.
📌 This improves the user experience, allowing them to navigate within the tool without losing their uploaded data.
🔹 If your SmartForm is timing out: ✅ Reduce file sizes (split large PDFs into sections). ✅ Limit the number of uploaded files per request. ✅ Avoid combining uploads with web browsing or web scraping in the same request. ✅ Ensure smartform prompts are structured to retrieve only necessary information from the file.
📌 Example Fix: ❌ Bad: "Analyze the entire 50-page PDF and provide a full summary." ✅ Better: "Find and summarize the key financial terms from the contract PDF."
🚀 By following these best practices, you ensure AI tools process user uploads efficiently without timeouts.