Apply to my task
arXiv:2510.10331 ★ 90 Oct 11, 2025

ICA (Intent, Context, Action): Pseudocode Instead of Prose for Complex Workflows

Key result

Try describing in plain text the logic "if it's a startup and the salary is +50% but the commute is >45 min unless it's a senior role" — the model will get lost. The ICA method lets you structure complex multi-factor decisions (career choices, business processes, personal dilemmas) as explicit if-else logic. Pseudocode instead of text descriptions — the model stops interpreting fuzzy conditions and starts executing a clear algorithm. Accuracy +67%: from 51% to 85% on Mistral-7B.

01

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.

02

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.


03

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".


04

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

05

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.


06

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.


07

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.


08

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 circumstances

ICA 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_refund

Context: 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.


09

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 terms

Then 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.


10

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


Research digest

Key result

Try describing in plain text the logic "if it's a startup and the salary is +50% but the commute is >45 min unless it's a senior role" — the model will get lost. The ICA method lets you structure complex multi-factor decisions (career choices, business processes, personal dilemmas) as explicit if-else logic. Pseudocode instead of text descriptions — the model stops interpreting fuzzy conditions and starts executing a clear algorithm. Accuracy +67%: from 51% to 85% on Mistral-7B.

Principle

Before: "If the customer asks about canceling and the booking is more than 48 hours away, give a full refund, but if it's less than 24 hours only 50%, and if they have VIP status then..." — the model loses track of where a branch starts and what to check first. After: ``` Intent: Booking cancellation if time_until > 48h: Action: Refund 100% elif time_until > 24h: Action: Refund 50% else: if vip_status: Action: Refund 75% ``` Pseudocode makes the logic explicit and sequential. The model follows an algorithm instead of interpreting fuzzy conditions in the text.

Why it works

LLMs have seen millions of lines of code in their training data. Pseudocode feels more familiar to them than complex text with nested conditions. 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 if-else everything is explicit: first check A, if yes require B, then check C. The hard numbers from the study: on Mistral-7B accuracy rose from 51% to 85% (+67% relative improvement). It works especially well on small models: the large model improved by +13%, Mistral-7B by a whopping +54%. Small models suffer more from fuzzy instructions — pseudocode compensates for that limitation.

When to apply

Multi-factor decisions → when you need to weigh 3+ conditions with different priorities (career choices, evaluating startup ideas, medical protocols), especially when the logic is tangled and there are nested "if-then-else" rules. Business processes → ticket-handling rules, support escalations, conditional pricing. NOT a fit for: creative decisions without clear criteria, intuitive choices ("what feels right"), dynamic processes where conditions change during the conversation.

Mini recipe

1. Define the Intent: the goal of the decision in one sentence (for example: "evaluate a job offer") 2. List the Contexts: every factor that affects the decision — salary, commute, company type, role. For each, note the possible values 3. Rank the priorities: what do we check first? What wins when criteria conflict? This sets the order of the if-else branches 4. Build the pseudocode: start with the main criterion in the first `if`, nest the secondary conditions inside, and give each branch a concrete `Action` 5. Check coverage: walk through every combination of factors — each one must lead to a clear action, with no "but what if..." left over

Examples

[BAD]: `Help me decide whether to change jobs. The new salary is $160k (currently $120k), but the commute is 60 min (currently 20). It's a startup; my current company is stable. What should I do?` (The model will give you a fuzzy "it depends on your priorities," "on the one hand... on the other hand...", with no clear recommendation) [GOOD]: `Convert my criteria into ICA format. Intent: Evaluate the offer Contexts: - Salary: $120k → $160k (+33%) - Commute: 20 min → 60 min - Company: stable → startup - Role: mid-level → mid-level My priorities: - Startup only if salary is +50% minimum - Commute >45 min only if the terms are really good - Salary matters most Create if-else pseudocode with a recommendation for this case.` (The model will produce structured logic: "if startup: salary +50% required, current offer is +33% → does NOT pass → recommendation: decline or ask for $180k")

In plain words

Here's the deal: for all their "human" charm, modern AI models are still calculators at heart. Feed them a long wall of text describing your business processes and they start losing the thread of the logic. The ICA (Intent, Context, Action) method translates mushy instructions into a language AI gets instantly — structured pseudocode. Instead of making the model guess what matters more, we hand it a clear road map with if-else structures, where every condition is cut clean like a razor.

It's like giving directions to a cab driver: you can go on and on about "the cute little house with the geraniums, then turn where the dog usually sits," or you can just give exact coordinates and a list of turns. In the first case he may end up in the wrong place because the dog wandered off; in the second, he delivers without a single question. Pseudocode strips the flowery prose out of your communication with AI and leaves only the bare skeleton of logic, which the model doesn't trip over.

It works through a tight trio of elements: Intent (what the user wants), Context (what conditions we're in) and Action (what exactly to do). Where an instruction used to read "try to help the customer with a refund if they're not too angry and it's been less than a week," it now becomes a strict algorithm: if days < 7 and mood != 'angry'. This framing cuts ambiguity off at the root, and the AI stops hallucinating or improvising in places where that could cost the company money.

Although the method was tested on customer support, the principle is universal and applies anywhere a decision has to be made. That could be choosing between job offers, lead scoring, or even your personal rules for life. The moment you turn your gut-feel "on the one hand, on the other hand" into explicit logic, you suddenly discover that even the dumbest model starts delivering senior-level results.

Bottom line: stop writing free-form essays for your AI — it's a waste of tokens and nerves. Switch to structured instructions where every action is tied to a specific condition. Either you give the AI clean code, or you keep getting answers like "well, it depends on many factors." The choice is obvious: structure it or suffer the unpredictability.

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on ICA (Intent, Context, Action): Pseudocode Instead of Prose for Complex Workflows arXiv:2510.10331

Sign in to apply this study New accounts get 50 free credits.