Guide 2026-05-05 · By Julie Derthing, Chief Staff Assistant at Seentio

How Seentio Maps Strategy Names to Templates

When you ask Claude Code "build me Greenblatt's strategy," there's a quiet but important step happening behind the scenes: Claude doesn't compose the strategy spec from training memory. It looks the name up in a curated dictionary first. This guide explains why we built that dictionary, how it works, and what happens when a name doesn't match.

What you'll learn

How the lookup_strategy MCP tool turns fuzzy user requests into precise template references, the alias dictionary that powers it, and the fallback path when nothing matches.

Why a lookup tool exists

Picture two users:

If Claude infers the spec from its training knowledge, it'll pick Greenblatt's version every time (because that's the dominant reference in academic literature). User B will get something they didn't ask for. They might not notice until the backtest comes back looking unfamiliar — or worse, until real money is rebalanced into the wrong portfolio.

This is what we call the name-collision problem. Strategy names are ambiguous; AI inference is non-deterministic; the combination produces silent mistakes. The fix is a deterministic name-to-template lookup with explicit aliases and disambiguation.

How lookup_strategy works

When the user mentions a strategy by name, Claude calls lookup_strategy(query=<their words>) as the first move. The tool hits our backend's /api/strategies/templates-lookup endpoint, which scores each template against the query.

Scoring tiers

Match type Score
Query exactly equals template ID or display name 1.0
Query exactly equals an alias 0.95
Query is substring of name (or name is substring of query) 0.85
Query is substring of an alias 0.75
Token overlap with name + aliases up to 0.7
Description keyword match (length ≥ 4) 0.4

The "confident match" rule

A match is declared confident when: - The top score is ≥ 0.7, AND - No other alternate scores ≥ 0.55 (no near-tie ambiguity)

If both conditions hold, the response shape is:

{
  "query": "Greenblatt",
  "confident_match": { "id": "greenblatt_magic_formula", "name": "...", "score": 0.95 },
  "alternates": [],
  "guidance": "Use confident_match.id with get_template..."
}

Claude reads the confident match and proceeds to fetch the full spec via get_template, then run dry_run_ranking, then create_strategy.

When matches are ambiguous

If the top score is below 0.7, OR there's a near-tie (multiple alternates above 0.55), the response surfaces alternates instead of picking one:

{
  "query": "value quality",
  "confident_match": null,
  "alternates": [
    { "id": "greenblatt_magic_formula", "score": 0.65 },
    { "id": "top_n_large_cap",          "score": 0.55 }
  ],
  "guidance": "Multiple matches — ASK the user which one they meant before creating."
}

The MCP system prompt tells Claude: when there's no confident match, don't guess — ask the user to pick from alternates by name and description. This forces an explicit confirmation rather than a silent inference.

The current alias dictionary

Today (May 2026) we ship four templates with the following aliases:

Greenblatt Magic Formula

Top N Dividend

High Momentum

Top N Large Cap

You can see them all by asking Claude:

What strategy templates are available?

Claude calls list_strategy_templates and returns the catalog with each template's id, name, description, default cadence, factor count, and top_n. Useful for browsing.

What happens when no template matches

If you ask for something exotic — "Build me Piotroski F-score" or "Buffett-style quality"lookup_strategy returns:

{
  "query": "piotroski",
  "confident_match": null,
  "alternates": [],
  "guidance": "No built-in template matches 'piotroski'. Compose a custom ranking block per the cookbook in your MCP system prompt. Restate the strategy intent back to the user before calling create_strategy."
}

Now Claude falls back to custom strategy authoring. It uses the cookbook of factor derivations baked into the MCP system prompt:

Factor user might mention Cookbook expression
Earnings yield (EBIT/EV) 1 / ev_ebitda
ROIC / Return on capital roa
FCF Yield 1 / price_to_cash
Book Yield (Fama-French) 1 / pb
EBITDA Yield ebitda / market_cap
Quality (composite) (roa + operating_margin + gross_margin) / 3
Low Vol 1 / max(beta, 0.01)
12-1 Momentum ret_1y - ret_1m
Trend Strength sma_20_pos + sma_50_pos + sma_200_pos
GARP 1 / max(peg, 0.1)
Dividend Safety max(1 - payout_ratio, 0)

Claude composes a ranking block using these expressions, then restates its interpretation back to you before calling create_strategy. Something like:

I don't have a built-in Piotroski template. The closest custom version uses three quality components from our snapshot: ROA + operating margin + gross margin, equally weighted. We don't have year-over-year change data needed for the full 9-component F-score. Want me to proceed with the simplified version?

That restate-before-creating pattern is the safety check for the no-match case. The dry-run preview (showing actual tickers) is the second safety check.

What about fields we don't have at all?

Some strategies need data Seentio's snapshot doesn't include. The classic example: debt_to_equity. EODHD's API has the field name in the schema, but it's universally null in our daily snapshot — we'd need a different data feed to populate it reliably. We document these in our field inventory and lookup_strategy will surface a warning if you accidentally try to use one.

When this happens, Claude is instructed to propose a substitute and ask rather than silently failing. For debt_to_equity specifically, the substitute is operating_margin (operational efficiency) or 1/pb (leverage indirectly via book value).

Tips & common questions

What's next

Need more help? Visit our Chat page to ask Seentio's AI assistant, or reach out at contact@app-seentio.com.

Frequently Asked Questions

Why do I need a 'name mapping' tool? Can't Claude just figure out what 'Greenblatt' means?

Sometimes yes — Claude knows famous strategies from its training data. But strategy names are ambiguous. 'Magic Formula' might mean Greenblatt's classic value-quality formulation, or a single-factor low-P/E screen, depending on which source the user read. Letting Claude guess introduces non-determinism. The lookup_strategy tool returns vetted templates with explicit aliases, so the AI picks from a curated catalog instead of inferring from training memory.

What aliases does each template have?

Greenblatt Magic Formula: greenblatt, magic formula, joel greenblatt, little book that beats the market, earnings yield roic, value quality, ebit ev. Top N Dividend: dividend, high yield, income, dividend champions, dividend aristocrats, income strategy. High Momentum: momentum, trend following, jegadeesh titman, 12-1 momentum, price momentum, trend. Top N Large Cap: large cap, mega cap, top n, fama french size, size factor, market cap weighted.

What happens if there's no template match?

lookup_strategy returns confident_match=null and alternates=[]. Claude then falls through to custom-spec authoring per ADR #6 in our generalized algorithm design. It uses the cookbook of factor derivations baked into the MCP system prompt to compose a ranking block, then runs dry_run_ranking to verify. You'll see Claude restate the strategy intent before calling create_strategy — that's your safety check.

How does the matching score work?

Direct ID or name match scores 1.0. Alias match scores 0.95 (substring) or 0.75 (overlap). Token overlap with name+aliases caps at 0.7. Description keyword hit scores 0.4. We declare a 'confident match' when the top score is 0.7 or higher AND no other alternate scores 0.55 or higher (meaning no near-tie ambiguity).

Can I add my own aliases?

Not yet — aliases are hardcoded in our backend's TEMPLATES list. If a strategy alias you'd find natural is missing, please email contact@app-seentio.com or post in our community Slack. We'll add common aliases in batches.

Related Research

Track these stocks in real time

See the data behind the research. Start with Seentio's free tier.

Get started free