TL;DR
ICA (Intent, Context, Action) is a way to represent complex workflows as pseudocode with if-else structures instead of long prose descriptions. Instead of "if the customer asks about canceling and the booking is more than 48 hours away, then..." you write if time_until > 48_hours: Action_1.
LLMs struggle with complex workflows written as ordinary text with tables and nested conditions. Rich text with headings, lists and tables takes special training even for humans to follow. Conditions are fuzzy, priorities are implicit, the logic is tangled up in paragraphs. The model loses track of where a branch starts, what to check first, and which conditions matter more.
The fix: rewrite workflows in the form "if Intent X and Context Y then Action Z". Pseudocode removes ambiguity and makes the logic explicit. First check the Intent (the goal of the request), then the Context (the surrounding conditions), then output the Action (the concrete step). It's structured like code, and models handle that beautifully.
Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.
Method Blueprint
Intent: [What is the goal of the request]
if [Condition on context 1]:
if [Condition on context 2]:
Action: [What to do]
else:
Action: [Alternative action]
else:
Action: [Another action]Everything runs in a single prompt. The model reads the structure, checks the conditions in order, and outputs the matching action.
Example in Practice
Task: Decide whether to accept a job offer from a new company — turn your decision criteria into explicit logic instead of gut-feel "on the one hand... on the other hand..." musings.
Prompt:
Help me decide whether to switch to a new job.
Turn my criteria into pseudocode in ICA format (Intent, Context, Action).
Intent: Evaluate a job offer
Contexts to check:
- Salary: current $120k, new $160k
- Commute: current 20 min, new 60 min
- Title: current mid-level, new mid-level
- Company: current is stable, new is a startup
- Team: current is familiar, new is unknown
My priorities:
1. Salary matters most if the difference is >30%
2. If it's a startup, there must be significant compensation (+50% minimum)
3. Commute >45 min only if the terms are really good
4. Changing teams only if there are growth opportunities
Convert this into if-else logic with clear recommendations for every scenario.Result: The model organizes the criteria into pseudocode with explicit conditions and branches. Every combination of factors gets a clear recommendation: "accept", "decline", or "negotiate better terms". The logic becomes explicit and easy to audit — you can see at a glance which scenarios lead to which decision, with no fuzzy "it depends".
Why It Works
LLMs handle structured instructions better than logic buried in prose. In a regular description the conditions are fuzzy: "if it's a startup and the pay is great and it's not too far" — it's unclear what matters more and how the factors combine. In pseudocode everything is explicit: first check for a startup, if yes require +50%, then the commute, then the rest.
Pseudocode works as a contract between you and the LLM. Instead of "think about this, considering these factors," you hand over a clear algorithm: "if A and B, then C." LLMs follow instructions like that extremely well — they look like the code the model saw in its training data. No interpretation, just execution.
In the original study, accuracy jumped from 51% to 85% on Mistral-7B just by switching from rich text to the ICA format. That's a +67% relative improvement. The effect is especially strong on small models: the large Model 1 improved by +13%, while the small Mistral-7B gained a whopping +54%.
Control knobs:
- Nesting depth of the if-else: more branches = more precise logic, but harder to read. 2-3 levels for simple tasks, 5+ for complex ones
- Order of condition checks: what you check first shapes the final decision. Put the most important criteria at the top
- Action detail: anything from a terse "Action_1" to a full description of next steps
Prompt Template
Convert {process description} into ICA format (Intent, Context, Action).
Intent: {what goal}
Contexts:
- {factor 1}: {possible values}
- {factor 2}: {possible values}
- {factor 3}: {possible values}
Decision criteria:
{rules and priorities in free form}
Create pseudocode in this format:
Intent: {goal}
if {condition on context 1}:
if {condition on context 2}:
Action: {what to do}
else:
Action: {alternative}
else:
if {another condition}:
Action: {another option}
else:
Action: {final option}
Show the full logic for every combination of factors.Fill in:
{process description}— what you need to structure (a decision, a business process, a procedure){what goal}— the Intent in one sentence{factor N}— the variables that affect the decision{rules and priorities}— your decision-making logic
🚀 Quick start — paste into the chat:
Here is an ICA format template. Adapt it to my task: [your task].
Ask me questions to fill in the fields.
[paste the template above]The LLM will ask which factors matter for your decision and how you rank them — because building an if-else tree requires explicit conditions and their order. It will take the structure from the template and adapt it to your task.
Limitations
⚠️ Complex nonlinear dependencies: If the decision hinges on a combination of factors that's hard to express with if-else (for example, "salary matters, but only if it's not a startup, and if it is a startup it doesn't matter as long as there's equity"), the pseudocode gets bloated and unreadable.
⚠️ Subjective criteria: For tasks without clear rules (creative decisions, emotional judgment, intuitive choices), a rigid if-else structure can stifle the model's natural reasoning.
⚠️ Dynamic contexts: If conditions change mid-conversation or depend on previous steps, static pseudocode has to be updated by hand. Not a fit for iterative processes.
How They Tested It
The Airbnb team took real customer support workflows and converted them from rich text (with tables, lists, headings, hyperlinks) into ICA pseudocode. Then they tested on 4 models — from large proprietary ones (Model 1, Model 2) to small open-source ones (Mixtral-8x7B, Mistral-7B).
Key Result: on Mistral-7B accuracy rose from 16% (rich text without CoT) to 70% (ICA + CoT) — that's more than 4x! Without any fine-tuning. With fine-tuning on synthetic data they reached 85%.
What's especially interesting is that the ICA format helped small models more than big ones. Model 1 improved by +13%, while Mistral-7B gained a full +54%. This shows that a structured format compensates for a model's lack of size — packaging knowledge the right way beats brute-forcing with parameters.
In online tests on 5,000+ real customer inquiries, the fine-tuned Mistral-7B with ICA cut handling time by 13% compared with the baseline approach. Meanwhile, large models with CoT increased handling time because of latency — they generated too many tokens.
The main takeaway for practice: If you have complex workflows in text form, convert them to pseudocode. You'll get a bigger accuracy boost than from switching to a more powerful model.
Original from the Paper
The authors show an example of converting rich text into ICA:
Original workflow (simplified):
Reservation Cancellation Policy
When a guest requests cancellation:
- If reservation is more than 48 hours away:
Check if it's a strict cancellation policy
- If strict: Charge 50% fee
- If moderate: Full refund
- If reservation is less than 48 hours away:
No refund unless extenuating circumstancesICA format:
Intent: Guest requests reservation cancellation
if time_until_reservation > 48_hours:
if cancellation_policy == "strict":
Action: charge_50_percent_fee
elif cancellation_policy == "moderate":
Action: full_refund
else:
if extenuating_circumstances == True:
Action: review_extenuating_circumstances
else:
Action: no_refundContext: In the study, this format was then used to generate synthetic training data and fine-tune models. But the ICA format works without fine-tuning too — just paste it into your prompt.
Adaptations and Extrapolations
💡 Adaptation for personal decision frameworks:
ICA isn't just for business processes — you can also use it to structure personal decision-making systems, from picking an apartment to planning your career.
Help me build a decision framework for {my task}.
Use the ICA format:
Intent: {decision goal}
Variables:
- {factor 1}: {values}
- {factor 2}: {values}
- {factor 3}: {values}
Priorities:
1. {top priority}
2. {second priority}
3. {third priority}
Create pseudocode that produces a clear recommendation for any combination of factors.
Show every possible decision path.🔧 Technique: Visualize the logic → see every decision path
Once you have the pseudocode, add:
Turn this pseudocode into a decision tree diagram in text format.
Show every possible path and its final action.This helps you see the full picture: which combinations of factors lead where, whether any scenarios are missing, and whether the logic contradicts itself.
🔧 Technique: Action IDs → quick comparison of options
Instead of text descriptions of actions, use numbers:
Action_1: Accept the offer
Action_2: Decline the offer
Action_3: Negotiate better termsThen ask the model:
For these three versions of my data:
- Option A: salary +20%, commute +40 min, startup
- Option B: salary +50%, commute +60 min, stable company
- Option C: salary +35%, commute +20 min, startup
Which Action IDs come out? Output a table.This gives you a quick comparison of different scenarios without generating long explanations.
Resources
"LLM-Friendly Knowledge Representation for Customer Support"
Airbnb Inc.
Hanchen Su, Wei Luo, Wei Han, Yu Liu, Yufeng Zhang, Cen Zhao, Joy Zhang, Yashar Mehdad