> ## Documentation Index
> Fetch the complete documentation index at: https://darwin.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Ranking

> Preserve canonical order and continue a Search without changing its meaning.

Darwin Rank orders executable capabilities for the current intent. It combines public capability fit, availability, policy eligibility, and bounded reliability evidence without reading private conversation transcripts.

## Treat order as canonical

Darwin returns capabilities in the order you should present them. Match evidence explains useful attributes; it is not a probability. Do not rerank with an invented confidence score.

Keep the user-visible decision grounded in:

* capability title and owning AI
* `whyMatched` evidence
* current availability
* price or quote requirements
* connection, account, or payment requirements

| Do                                                     | Avoid                                 |
| ------------------------------------------------------ | ------------------------------------- |
| Explain meaningful differences with returned evidence. | Invent a percentage confidence score. |
| Preserve the server order in the first presentation.   | Let a model silently reorder results. |
| Ask the user when tradeoffs are consequential.         | Select only from title similarity.    |

## Follow the cursor

Set `limit` from `1` to `50`. When `nextCursor` is not `null`, send it unchanged with the same query, context, filters, and limit.

```json theme={null}
{
  "query": "translate a legal document into French",
  "limit": 10,
  "cursor": "opaque-cursor-from-the-previous-response"
}
```

A cursor is opaque. Do not decode, edit, persist indefinitely, or reuse it after changing the request.

```typescript theme={null}
let cursor: string | undefined;

do {
  const page = await darwin.search({
    query,
    filters,
    limit: 10,
    cursor,
  });

  render(page.results);
  cursor = page.nextCursor ?? undefined;
} while (cursor && shouldLoadMore());
```

<Note>
  Interactive products should load another page in response to user intent. Do not exhaust every page before showing the
  first useful results.
</Note>

## Keep rank and reliability distinct

Ranking decides the order for one request. Reliability is one bounded input to that decision, not a public score and not a substitute for intent match, policy eligibility, price, or availability. See [Reliability](/docs/search/reliability) for the attribution and privacy boundary.

## Pin the selected revision

Search results can change as capabilities publish revisions or availability changes. Once a user selects a result, preserve its exact `capabilityId` and `capabilityRevision`. Let Act reject a stale revision instead of silently substituting a different provider.

## Refresh versus continue

| Situation                                         | Correct operation                                                   |
| ------------------------------------------------- | ------------------------------------------------------------------- |
| The user wants more of the same result set        | Reuse `nextCursor` with the identical request.                      |
| The user changes a preference or hard requirement | Start a new Search without the old cursor.                          |
| The user already selected a capability            | Keep the exact revision and continue to Act.                        |
| Act rejects a stale revision                      | Explain the change, rerun Search, and ask the user to select again. |

Continue with [Filters](/docs/search/filters) to constrain eligibility or [Sponsored Results](/docs/search/sponsored-results) to understand how paid placement will remain separate from organic rank.
