# Using Kernel for prioritization

## Context

Account prioritization is a high-leverage exercise that allows RevOps to separate high-potential accounts from the rest. Prioritization is usually done in one of 4 ways:

* Scoring - Assign numbers and weights to individual data points, aggregate the numbers, and rank from highest to lowest
* Rules - Use logical rules that span across multiple data points (If X and Y are true, then always Z)
* Reasoning - Use large language models to ‘pattern-match’ against a defined ICP
* Hybrid - A combination of the three methods listed above

Kernel recommends starting with a simple Reasoning-based prioritization framework and then maturing to a hybrid model that incorporates logical rules:

\- Rules are simple and easy to explain, but only work in select cases when “there is no doubt”; otherwise, they risk introducing false results

\- Reasoning with language models can be very reliable, but it requires a crystal-clear understanding of what good looks like

{% hint style="info" %}
For workflow automation, Kernel recommends using n8n.io. See [https://docs.n8n.io/video-courses](https://docs.n8n.io/video-courses/) for additional materials not covered in this guide.
{% endhint %}

### Getting started

* [ ] Retrieve an OpenAI API key via platform.openai.com
* [ ] Credentials in n8n: [Authorize Salesforce access](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.salesforce/)
* [ ] (Optional) Credentials in n8n: [Authorize Google Sheets access](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/)
* [ ] (Optional) Credentials in n8n: [Authorize Slack access](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.slack/)

### Level 1 - Setup a simple starter flow (Reasoning-only)

Set up the following nodes:

1. `Salesforce - Get many accounts`
   1. This fetches either a subset or all accounts from your CRM
   2. Start by fetching \~10-20 accounts at first while testing
   3. Replace this later with "Perform a query" in which you can provide a fine-grained SOQL query
2. `Message a model`
   1. In this guide, we use OpenAI's node
   2. Select GPT-5-Mini from the dropdown
3. `Update an account`
   1. This node updates a specific field in Salesforce based on the output

#### Selecting the fields

The critical component is selecting the appropriate fields from your CRM. These should include all Kernel fields that are directly relevant to your ICP. For the `Get many accounts` node, you have to manually specify the fields required.

{% hint style="success" %}
The secret recipe for a successful tiering system is to use high-quality input data that is directly relevant to your ICP.
{% endhint %}

#### Adjusting the OpenAI-node

Adjusting the OpenAI node consists of the following steps:

* [ ] To start off, select GPT-5-MINI as the model (a good balance between performance and costs that you can later change)
* [ ] Add detailed instructions in the System prompt (shown at the top) - see below for guidance
* [ ] Add the relevant data points in the User prompt (shown at the bottom) in a structured list

Regarding the output, Kernel recommends discrete tiers, such as:

* 1 - Target
* 2 - Pursue
* 3 - Explore
* 4 - Ignore

Prefixing the numbers makes them easy to sort in Salesforce. Use a semantic label ("Target", "Explore") that corresponds to the tier's intention, so the rep can easily understand the tier's purpose.

#### Updating data in your CRM

The final step is to connect the output tier back into the tiering field in Salesforce. You should create a dedicated account-level field.

{% hint style="warning" %}
While testing, we recommend you disconnect or disable the Salesforce node that updates data in your CRM
{% endhint %}

### Level 2 - Add evals

Once you've had your first few successful tests, it's important to immediately start evaluating your tiering model's performance, especially when using LLMs.

* [ ] Curate a list of \~30-50 diverse accounts and pre-assign a tier; this is ideally done in a workshop setting with multiple stakeholders involved
* [ ] Read more about how n8n lets you run evals [here](https://docs.n8n.io/advanced-ai/evaluations/overview/#what-are-evaluations).

{% hint style="info" %}
For Evals to work, you need to setup the Google Sheets integration
{% endhint %}

### Cost considerations & optimizations

Prioritizing 100,000+ accounts via 100,000+ executions in n8n would be prohibitively expensive.

However, n8n charges based on the number of workflow executions, not the number of items processed within a single execution.

If the workflow is triggered once and uses the "Get many accounts" node to fetch 50 accounts (or however many per batch), you would be charged for only one workflow execution - not 50 - since all 50 accounts are processed within that single execution.

### Risks

For huge batches, you may risk over-consuming your daily API quota. Either reduce the number of accounts you prioritize in a day or modify the workflow to use the Bulk API.

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kernel.ai/legacy/using-kernel-for-prioritization.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
