Teach the AI your naming convention

Some filename values are not printed on the document, like ISO week numbers, customer codes, or date-derived prefixes. Teach the rule in your Custom Prompt, not just the format.

3 min readUpdated Jun 25, 2026Guides

Use this when your filenames include values that are not printed directly on the document, such as week numbers, internal abbreviations, customer codes, project phases, document types, or date-derived codes.

Some filename formats are obvious once you know the business convention, but hard for the AI to infer from the document alone.

For example, a code like 2526 may mean "ISO week 25 of 2026" to your team. But unless the Custom Prompt explains that rule, the AI only sees a compact number. It cannot know whether 2526 is a week code, job number, batch code, document reference, or part of another internal system.

The main lesson: do not just show the filename format. Teach the naming convention behind it.

Show the rule, not only the shape#

Instead of only writing the pattern:

Terminal
WWYY_customer_date

explain what the code means:

Terminal
WWYY means ISO calendar week plus two-digit year, calculated from the work order date.
ISO weeks start on Monday.
For example, 2026-06-15 to 2026-06-21 = 2526.

That gives the AI both the structure and the rule behind the filename.

Example prompt#

Terminal
Rename weekly work orders using ISO week, work order number, customer name, and work order date.

Return the filename exactly like this:
[ISO week + two-digit year]_[work order number]-[customer name]-[work order date]

Extract:
- Work order date: use the field labeled DATE or the clearest job/work date.
- Work order number: use the prominent work order, job, ticket, or reference number near the top.
- Customer name: use the customer, client, or company field.

Rules:
- Use the work order date for both the final date and the week prefix.
- Format the work order date as YYYY-MM-DD.
- The prefix is WWYY, where WW is the ISO 8601 calendar week and YY is the last two digits of the work order date year.
- ISO weeks start on Monday. Week 01 is the week containing the first Thursday of the ISO year.
- For 2026, use these anchors:
  - 2026-06-01 to 2026-06-07 = 2326
  - 2026-06-08 to 2026-06-14 = 2426
  - 2026-06-15 to 2026-06-21 = 2526
  - 2026-06-22 to 2026-06-28 = 2626
- If your files use a different year, update the anchors for that year before saving the prompt.
- Convert the customer name to ALL CAPS.
- Remove spaces from the customer name unless you define a specific abbreviation.
- Return only the final filename.

Why this works#

The AI is usually good at reading visible document fields. The weak spot is hidden meaning: conventions your team understands but the document does not explain.

By defining the convention and giving a few anchor examples, you reduce ambiguity. The AI no longer has to guess what 2526 means. It can follow the rule you provided and apply it consistently to new documents.

This approach works especially well for:

  • calendar week numbers
  • internal abbreviations
  • customer or project codes
  • date-derived prefixes
  • document type codes
  • naming rules that depend on business context

Key takeaway#

If the value appears directly on the document, tell the AI where to find it. If the value must be derived from a business rule, tell the AI the rule and give a few examples.

For a worked invoice example that combines fields, rules, and edge cases in one prompt, see Custom Prompts.

Related guides

Try it yourself

Self-managed: 7 days and 50 renames in the app. Managed trial starts in checkout.

★★★★★
Joinhappy customers