On This Page
Prompt Engineering for Sortio
Learn how to craft effective prompts to get the best sorting results.
Understanding Sortio Prompts
Sortio uses AI to understand your sorting preferences through natural language prompts. The effectiveness of your file organization depends significantly on how you phrase your instructions.
Available Configuration Options
Content Analysis Toggle
When enabled, Sortio can analyze the actual content inside files, not just their metadata.
Rename Files Toggle
When enabled, allows Sortio to rename files based on their content or your specifications.
Restrict to a Folder List
Locks Sortio to a fixed taxonomy you provide, or to an existing folder structure on disk. The AI cannot invent new folder names. Anything that doesn't fit goes to a fallback folder of your choice.
Important Note on Local Models
Complex prompts may not work well on smaller offline models. If you're using local models and getting poor sorting results, consider using simpler prompts or switching to a larger model for better performance.
Optimal Prompt Strategies
Use these strategies to craft effective prompts that will help Sortio organize your files exactly how you want them.
1 Be Specific and Detailed
Clear, specific prompts work best. Include exactly how you want files organized, what criteria to use, and how to handle special cases.
"Sort my documents into folders by document type (invoices, receipts, contracts), then by year, and place miscellaneous files in an 'Other' folder."
"Sort my documents into categories."
2 Specify Folder Structure
Explicitly mention the folder structure you want. This helps Sortio create organized hierarchies rather than just grouping files.
"Organize my photos into a hierarchy: Year > Season > Event, using the date metadata to determine placement."
"Group my photos by when they were taken."
3 Consider Available Information
Craft your prompt based on which toggles are enabled. Different strategies work best depending on whether content analysis or renaming is available.
"Group spreadsheets based on their content topic. For CSV files, examine headers and first 10 rows to determine if they're financial, inventory, or customer data."
"Group files by type (PDFs, images, documents) and then by creation date, using the month as subfolder names."
"Sort photos into folders by location, and rename them to include the city name followed by a sequential number (e.g., 'Paris_001.jpg')."
Restrict the AI to Your Folder List
By default, Sortio's AI is free to invent any folder names that fit your prompt. Sometimes you want the opposite, a guarantee that the AI will use only a fixed set of folder names you've decided on. The Restrict to a folder list option does exactly that.
Open the Options panel under the prompt box and turn on Restrict to a folder list. You'll see two modes.
1 Explicit list
Type or paste your folder names, one per line (or comma-separated, or a JSON array). Sortio will use only those folders and nothing else.
Example list
Documents Photos Videos Junk
Useful when you already have a personal taxonomy in mind and don't want the AI to invent variations like "Personal Photos" alongside "Photos".
2 Mirror existing folders
Point Sortio at a folder that already has the structure you want, click Refresh, and Sortio uses only the subfolders that already exist there. The AI can place new files into your structure without disturbing what you've already organized.
Useful for adding new files to an existing organized library: a Photos folder you've already split into "Family", "Travel", and "Wallpapers", or a project folder with established subfolders.
The fallback folder
In both modes you pick a "Where to put files that don't fit" fallback. Anything Sortio can't confidently place in one of your allowed folders goes there. The fallback must itself be one of your allowed folders. If you don't pick one, Sortio defaults to "Junk", "Misc", or "Other" if any of those are present, otherwise the last entry.
Allow nested subfolders
When on (default), Sortio may create nested paths like Photos/Family under your allowed folders. When off, only flat top-level folders are used. Turn it off if you want maximum predictability and a fully flat output.
A note on local models
The folder restriction works the same with cloud, BYOK, and local Ollama models. Smaller open source models follow the constraint less reliably than GPT-5 or Claude, so more files may end up in your fallback folder, but the plan stays valid in every case. Sortio post-validates every plan and re-routes anything that strays off your list.
Real-World Examples
These example prompts demonstrate how to effectively use Sortio for different sorting needs.
Document Organization
Prompt:
"Sort all documents into a hierarchical structure. First, categorize by document type (invoices, contracts, receipts, reports). Then within each type, create subfolders by year based on the document date. If a document mentions a specific client or company name in its content, add that as an additional subfolder layer. Rename files to follow the format '[YYYY-MM-DD]_[Doc Type]_[Brief Description].extension' where the description is based on key content."
This prompt creates a comprehensive organization system that leverages both content analysis to understand document types and the ability to rename files for consistent naming.
Photo Collection
Prompt:
"Organize my photos into a Year > Month folder structure based on the photo's creation date metadata. Rename all photos to follow the format 'YYYY-MM-DD_HH-MM-SS' preserving the exact date and time when they were taken. If photos were taken on the same second, add a sequential number at the end."
This prompt focuses on file metadata since content analysis is off, creating a chronological organization system with standardized naming.
Code Project Files
Prompt:
"Analyze my code files and organize them into folders based on their purpose and functionality. Create separate directories for frontend components, backend services, utility functions, tests, and documentation. For JavaScript/TypeScript files, check imports and function definitions to determine their purpose. Keep original filenames but organize them into an appropriate project structure."
This prompt leverages content analysis to understand code functionality without changing filenames, creating a logical project structure.
Troubleshooting & Optimization
If you're not getting the expected results, try these troubleshooting strategies.
Model Capacity Issues
If you're using local models and getting poor results with complex prompts, try:
- Simplifying your prompt to focus on one or two key sorting criteria
- Switching to a larger local model if available
- Using cloud-based models for complex sorting tasks
Refining Your Approach
Split complex tasks
Instead of one complex prompt, consider running multiple sorting operations with simpler prompts.
Be explicit about priority
Indicate which sorting criteria should take precedence when files could be categorized in multiple ways.
Iterate and refine
If you're not satisfied with results, review what worked and refine your prompt accordingly for the next attempt.
