The AI Generated Cells in Mesh AI can take your natural language descriptions for a type of analysis and create graphs, tables, lists, and other outputs that meet your needs. But it's not a mind reader - it's more like a junior analyst that has just joined your team and needs good descriptions. This article gives some hints to help you describe your needs.
Specify the Type of Output You Want – For example, if you want a graph chart, table, or summary, say so (e.g., "Show a pie chart of... " or "Create a list of... ").
Be Specific About Your Analysis Needs – Instead of "Show shift data," try "Show a bar graph of how many shifts each associate has."
Include Key Details – If your analysis deals with specific jobs, request types, positions, or others, mention them and how they're used (e.g., "only for Night shifts", or "only for weekend shifts").
Tell the AI How Your Team Uses the System – The AI understands Mesh AI concepts like Shifts, Requests, and Associates, but it doesn’t know the specific ways your team uses them. If your team has unique workflows or definitions, include them. (Example: “Having a 'Conference' request doesn't lower the number of shifts that person can have.”)
Describe Your Thought Process – If you usually follow certain steps to analyze data, explain them in your prompt. (Example: “First, gather all approved requests, then calculate the total days per associate.”) This helps the AI match your approach instead of guessing.
Mention Relevant Rules – The AI doesn’t know your team’s scheduling rules unless you include them. If a rule matters to your analysis, spell it out. (Example: “List any cases where a doctor has more than four night shifts in a row.”)
If It’s Wrong, Refine It – If the result isn't quite right, tweak your request instead of starting over (e.g., changing "A pie chart of shifts" to "A pie chart of shifts but only for associates with the ER position").
Examples
❌ Unclear Prompt | ✔️ Clear & Effective Prompt |
Show shifts numbers. | Create a graph of the number of shifts each associate has. |
Who works too much? | Show a list of the people who have more than 9 shifts. |
Show max shifts per week. | For each week, calculate the number of shifts each associate has that week; then show a table of the maximum number of shifts that associate has in any one week. |
Find weeks where people are overbooked. | Give me a list of times that people have more than 2 shifts in any week, along with the shifts that contribute in order by start date. |
Break down shifts by job. | Show a stacked bar graph of the number of shifts each associate has, separated by job. |
Find out if scheduling rules are broken. | List all shifts where someone is scheduled for more than 5 consecutive days, along with the shift details. |
Tell me the percentage of Prefer On - Day requests that were honored | Show the percentage of Prefer On - Day requests being honored. Having a Prefer On - Day request means the associate wants a shift that starts between 8am and 4pm during that request. |
Shifts for each person vs. GME limit. | List the amount of shifts each person has worked compared to the GME limits. The GME limits for our team are: no more than 1 in 4 'In Hospital Call' days and no more than 1 in 3 'Home Call' days, and no more than two weekends in a 28 day period. |
Information for Coders
If necessary or required, the code for an AI cell can be directly created or modified. The code has access to several arrays of date that are provided for analysis: 'shifts', 'requests', 'tours', 'associates', 'jobs', 'positions', 'requestTypes', 'holidays', and 'specialDates'. Below is the schema for each of these entities for reference.
Associate: Represents a person, user, employee, resident, doctor, nurse, etc.
Field | Type | Description |
id | integer | Links associate to shifts or requests |
name | string | Name of the person |
string | Account owner’s email | |
organization_email | string | Organization-specific email |
contact_info | object | Object with |
role | string | Role in organization; blank = 'N/A' |
Shift: A job done for a specific period of time by one Associate.
Field | Type | Description |
id | integer | Unique identifier |
job | string | Job name this shift is linked to |
start | string | Start datetime (with offset) |
end | string | End datetime (with offset) |
allDay | boolean | True if all-day shift |
weight_modifier | integer | — |
has_issues | boolean | True if breaking rules |
cluster | string | Common strings define clusters |
view_priority | integer | — |
metadata | object | Object of key-value pairs |
associate_id | integer | Linked associate (null = unassigned) |
cached_position_ids | array | IDs of positions held |
is_special | boolean | True if holiday/special |
specialness_cache | string | Name of holiday/special date |
associate_name | string | Cached associate name |
changed_since_publish | boolean | — |
team_metadata | array | — |
Request: Period of time that an associate asks to be specifically on or off work.
Field | Type | Description |
id | integer | Unique identifier |
request_type | string | Type of request |
start | string | Start datetime (with offset) |
end | string | End datetime (with offset) |
allDay | boolean | True if all-day request |
show_to_team_associates | boolean | True if visible to non-admins |
metadata | object | Object of key-value pairs |
associate_id | integer | Linked associate |
all_teams | boolean | Applies to all teams |
cached_position_ids | array | IDs of positions during the request |
team_ids | array | — |
request_targets | array | — |
approval_state | enum | 0=pending, 1=approved, 2=denied, 3=acknowledged |
Job: The task type of a shift
Field | Type | Description |
id | integer | Unique identifier |
name | string | Job name |
team_id | integer | Linked team |
weight_modifier | integer | — |
color | string | — |
can_take | integer | — |
view_priority | integer | — |
can_be_empty | boolean | — |
postcall_period | integer | — |
positions | array | Positions qualifying for this job |
Position: A tag or group indicator for an associate through a tour.
Field | Type | Description |
id | integer | Unique identifier |
name | string | Position name |
team_id | integer | Linked team |
jobs | array | Jobs qualified for this position |
Tour: A period of schedulability for an associate, including job qualifications, positions, and metadata
Field | Type | Description |
id | integer | Unique identifier |
associate_id | integer | Linked associate |
start_date | string | YYYY-MM-DD (nullable) |
finish_date | string | YYYY-MM-DD (nullable, inclusive) |
job_ids | array | Qualified jobs |
position_ids | array | Held positions |
metadata | object | Extra key-value data |
weight_modifier | integer | Workload/FTE (0–1) |
tour_block_name | string | Block name |
Holiday: A predefined country-based holiday
Field | Type | Description |
id | integer | Unique identifier |
name | string | Holiday name (e.g., “Christmas”) |
date | string | YYYY-MM-DD |
SpecialDate: A date label
Field | Type | Description |
id | integer | Unique identifier |
description | string | Label name |
date | string | YYYY-MM-DD |
is_holiday | boolean | True if holiday |