Optimize Decisions
You have a decision to make under fixed rules and known costs, such as which technician services which machine on which day. You want the plan that costs least. The Alchemist, the optimization agent in C3 Intelligence, turns your request into an optimization model and solves it.
An optimization model lists the choices to make, the rules every plan must follow, and the cost to minimize. The Alchemist calls this its decision process. A solver, a program built for optimization, then finds the lowest-cost plan that follows every rule.
Optimize a decision in five steps:
- Describe the decision and approve the agent's plan.
- Review the formulation and the assumptions the agent states.
- Choose a solver.
- Review the schedule and its cost, then correct any assumption you reject.
- Rerun the plan as a what-if scenario and compare the results.
The habit that matters most is reading the assumptions the agent states, because the solver follows them exactly. The same habits apply to any decision you optimize.
Before you start
The Alchemist needs the parts of your decision: what you schedule, who or what does the work, the costs, and your rules. Give them in files or in the request itself. Start in either of two ways:
With the Smart Factory example: continue the conversation from Get Started with C3 Intelligence, where these sample files are already loaded. Compare your results with this page:
- machines.csv: the eight machines, their type, and how critical each one is.
- planning_inputs.csv: for each machine, the required technician skill, the maintenance hours, and the downtime cost per hour on weekdays and on weekends.
- technicians.csv: the ten technicians, each with a specialization, shift, and hourly rate.
In a new conversation, attach the three files with the request. To create them, see Generate the Sample Data.
With your own data: attach files that list what you schedule, who does the work, and the costs. Then describe the decision and its rules in your own words. Use the prompts on this page as patterns.
In the example data, each machine's required skill is CNC, General, or Hydraulic. Each technician has one specialization: CNC, General, Hydraulic, or Electrical. The lathes are the machines that require the General skill, and three technicians specialize in General work.
Your run produces its own formulation, schedule, and costs, and each step ends with what to look for, so you can check your own result. To learn how conversations, agents, and plans behave, see Conversation Features.
Describe the decision
State the outcome, the scope, and the rules in plain words, and leave the method to the agent. This request names what to plan, for which machines and dates, what to minimize, and the two rules each assignment must follow:
Plan preventive maintenance for every machine over the two weeks starting July 1, 2025, at the lowest total cost. Assign each job to a technician with the right skills and an available shift.The request names no solver and no model type, because the Alchemist chooses them and you check the result. It has no explicit checkpoint, but the agent proposed a plan before any work in this run. To make sure it does, add "Show me your plan first."
The orchestrator, the agent that reads each request and routes it, is shown as C3 Intelligence. It recognized a scheduling problem and proposed a five-step plan. The steps upload the three files, formulate the problem, recommend a solver, solve it, and chart the results. The plan also restates the rules and the cost to minimize.
Read how the plan defines the cost, because the formulation follows it. In this run the plan defined the total cost as technician labor plus machine downtime.

Select Yes, go ahead with Steps 1 & 2 now to start the formulation. To change a rule or the cost before any work starts, select I want to adjust the objective/constraints first... instead.
Review the formulation
The formulation is your problem restated in the terms the solver uses. Read it closely, because the solver follows it exactly, including any assumption the agent added. It arrives after several minutes and has three parts:
- Decision variables: the choices the solver makes. Here each choice is yes or no: does technician t service machine m on day d? Eight machines, ten technicians, and 14 days give 1,120 such choices.
- Constraints: the rules as conditions. Here they are one job per machine, a skill match, an available shift, and at most one job per technician per day.
- Objective: the cost to minimize. Here it is labor cost plus downtime cost.
The agent named the model type as a mixed-integer linear program (MILP), a model where some choices must be whole numbers or yes-or-no decisions.

Under Key modeling decisions it flagged for your review, the agent lists the choices it made that your request did not settle. In this run the agent listed five:
- Each technician's shift follows from the technician and the day, so the model has no separate shift choice.
- The two weeks run from Tuesday, July 1 to Monday, July 14, with weekends on July 5 to 6 and July 12 to 13.
- A technician does at most one job per day, because the data gives job hours but no shift length.
- The daily failure probability and breakdown cost stay out of the cost, because the approved plan defined the cost as labor plus downtime.
- The two Electrical technicians get no jobs, because no machine requires that skill.
Read each one and decide whether it matches your rules. The options let you proceed, add breakdown risk to the cost, or adjust the formulation first.
The reply also comes with a Decision Process Structure card. It summarizes the model size and charts the compatible technicians for each machine, the constraint families, and the parts of the cost. Use it as an overview, and check its counts against your data files when they differ from the chat.
What to look for:
- Every rule you stated appears as a constraint: here, the skill match and the available shift.
- Each modeling decision is one you accept: a decision you reject is easier to fix before the solve than after it.
Choose a solver
After you approve the formulation, the Alchemist ranks the solvers that fit the problem. In this run it ranked Gurobi first, a commercial solver that needs a license, and OR-Tools second, an open-source solver. It also named the solvers it excluded and why.
The environment for these examples held stored Gurobi credentials, so the agent stopped and asked before using them. The question named the stored credentials without showing their values. The agent asks before it uses stored credentials, and it offers an open-source alternative.

Select one of the options:
- Use Gurobi (your available commercial license): choose this when your organization licensed Gurobi for this use.
- Use OR-Tools (free, open-source): choose this when you have no license, or when someone else decides how the license is used.
The example run chose OR-Tools. For a problem of this size, the open-source solver proved its schedule optimal. The Solver Recommendations card compares the solvers by suitability and expected speed, and lists the license each one needs.
To add a solver license, such as Gurobi, see Connectors.
Review the schedule and its cost
The schedule arrives several minutes after you pick a solver. The reply gives a table with the machine, technician, date, shift, labor cost, downtime cost, and total for each job, then the total cost. In this run the total was $19,700: $860 in labor and $18,840 in downtime.

The reply states whether the solver proved the schedule optimal, meaning that no schedule following every rule in the model costs less. It also reports the optimality gap: the most that any other schedule could still save. A gap of 0% proves the schedule is the best possible for the model.
Under Why the solution looks like this, the agent explains its choices. Read this section closely, because it can reveal an assumption that the formulation did not spell out.
The Optimization Results Dashboard card holds the same result in charts and tables. It includes the total cost and solver status, the cost split between labor and downtime, and a Constraint Satisfaction table with one row per rule.
What to look for:
- One row per machine: each machine appears once, within the two weeks.
- The arithmetic holds: check one row. M-01 costs 3 hours at the weekend downtime rate of $720, plus 3 hours at the technician's $37 rate: $2,160 plus $111, or $2,271.
- Each assignment follows your rules: compare the technician on each row with the skill the machine requires.
Check the assumptions the agent states
The schedule is optimal for the model the agent built, and that model can differ from the one you meant. In this run the explanation says that General technicians "are compatible with every machine under the stated rules." The Constraint Satisfaction table confirms it: the skill row reads "technician specialization matches/General."

The General-technician assumption decided the whole schedule. All eight jobs went to two of the three General technicians, T-04 and T-06. The agent cited their lower hourly rates and the cheaper weekend downtime on T-06's shift. The CNC machines and the hydraulic presses got General technicians, and no CNC or Hydraulic specialist got a job.
The sample data has no such rule: planning_inputs.csv requires CNC skills for M-01 to M-03 and Hydraulic skills for M-07 and M-08. A maintenance planner rejects a schedule that sends General technicians to those machines.
The reply's next-step options can point the same way. In this run one option offered a what-if test that forces specialist-only assignments.

Correct the assumption with a follow-up that states the rule exactly. A follow-up such as this one keeps the same scope and goal, and asks for the assumptions before the solve as its checkpoint:
Redo the maintenance plan so that each job goes only to a technician whose specialization matches the machine's required skill exactly. General technicians take only the machines that need General skills. Keep the same two weeks and the lowest total cost. Before you solve, list every assumption you make about skills and shifts. Then show the new schedule, the total cost, and what changed from the previous plan.The example run sent this follow-up in Planning mode, so the agents planned without running any code. The reply, headed Planning Mode — No execution this turn, listed seven assumptions to confirm and warned of a higher cost. Selecting the option to approve the plan switched the conversation to Code mode and started the solve. To learn how the modes work, see Conversation Features.
In this run the conversation had been revived, so the Alchemist built its formulation again from the data. The corrected schedule took close to an hour. The reply listed the assumptions first, as the request asked: an exact skill match, and General technicians on General machines only. The other assumptions kept the two weeks, the shifts, the rates, and the cost to minimize from the first plan.
The new total was $25,525: $1,005 in labor and $24,520 in downtime. That is $5,825, or 29.6%, more than the $19,700 plan:

Under What changed vs. the previous ($19,700) plan, the agent explained the rise:
- Three of the ten technicians do all the work: the cheapest specialist for each skill. T-02 takes the CNC machines, T-06 the lathes, and T-07 the hydraulic presses.
- The Electrical technicians get no jobs: no machine requires the Electrical skill.
- Only the lathe jobs move to the weekend: General is the only skill with weekend shifts, so only the lathes get the cheaper weekend downtime rate.
- The hydraulic jobs cost the most: each takes four hours at the highest weekday downtime rate, and together they make up 45% of the total.
This time the Alchemist solved with OR-Tools, the open-source solver, so it used no stored credentials and asked no license question.
The Optimization Results — Strict Skill-Match Schedule card shows the same result as charts, with the total, the solver status, and the technicians used:

Your corrected plan has its own dates and totals. Check it for these points:
- The stated assumptions match your rule: no technician covers a skill other than their own.
- Specialists get the specialist machines: CNC technicians on M-01 to M-03, Hydraulic technicians on M-07 and M-08, and General technicians on the lathes.
- The arithmetic holds: here, M-01 costs 3 hours at the weekday downtime rate of $1,200. Add 3 hours at T-02's $47 rate: $3,600 plus $141, or $3,741.
- The reply explains the cost change: it compares the new total with the previous plan and names what drove the change.
A later question can also bring an assumption to the surface. Asking which results the agent is least confident in led it to name the General-technician rule as an input to check. See Generate Code.
Rerun the plan as a what-if scenario
A what-if scenario changes one condition and solves again, so you can see what the change costs. This request states the change, asks what moves in the schedule, and asks for the cost difference:
Rerun the plan assuming one technician is unavailable for the first week. Show what changes in the schedule and how much the total cost increases.The request does not say which technician, so the orchestrator asked instead of guessing. It suggested the technician whose absence changes the most.

Check the reasons for a suggestion against the schedule before you pick. In this run the option labels gave T-06 five of the eight jobs and T-04 three, but the schedule gave each of them four. The example run picked T-06.
The new result arrived after several more minutes. The total rose to $22,586, an increase of $2,886 or about 15%. Only M-01 and M-02 cost more, $1,443 each. Both lost their weekend slot with T-06 and moved to T-04 on weekdays, when CNC downtime costs $1,200 an hour instead of $720.
The other six machines kept the same technician and the same cost. Their dates changed, because several dates cost the same and the solver picked different ones.
The agent saved the scenario as a separate version, v1, and kept the original plan, v0, unchanged for comparison. The Updated Optimization Results card compares the two.

What to look for:
- The jobs that moved are named: the reply says which jobs changed technician or day, and why.
- Equal-cost dates can shift: a date change with no cost change reflects a tie, not a new rule.
- Earlier assumptions carry over: this scenario still let General technicians work on every machine. Correct an assumption before you build what-if scenarios on top of it.
Get the most from the Alchemist
The Alchemist solves the problem it is given, so most of the work is making that problem match yours:
- State every rule, including who can do what: the solver enforces only the rules in the model.
- Ask for the assumptions before the solve: "List every assumption you make" turns hidden choices into a list you can check.
- Read the modeling decisions and the explanation: an assumption can appear in either one, or in the Constraint Satisfaction table.
- Check a row and the totals: confirm that one row's cost adds up and that the totals match the table.
- Name the change in a what-if: say exactly what differs, and the agent keeps the baseline for comparison.
To chart the latest results at any time, select the Visualize optimization results card or type @visualize_optimization_results in the message box. To check the cost of a plan you describe without a new optimization, ask the Alchemist to simulate it.
Where to go next
With an optimal plan, pick the next step for your goal:
- To share the plan with its costs in a report, see Generate Code.
- To predict which machines need maintenance first, see Build ML Models.
- To look up the maintenance rules in your procedures, see Build a RAG Knowledge Base.
- To add a Gurobi license for the Alchemist, see Connectors.
- To choose another agent for your goal, see Use Data Science Agents.