Data Matching
The schema KB finds candidates. This skill decides whether a candidate actually
matches the user's question. A semantically similar table is not automatically
the right metric.
Fetch this skill when introducing a new data source. Do not repeat it when
making a narrow refinement to a previously inspected saved query unless the
metric, source, scope, or interpretation changes.
1. Translate the question into a data contract
Before selecting a source, state the required:
- object — transaction, wallet, holder, position, token, protocol, entity,
or another unit;
- measure — count, balance, supply, volume, price, fees, active wallets,
or a defined derived metric;
- grain — event, block, day, month, wallet-token, protocol-chain, etc.;
- scope — networks, addresses, assets, population, inclusions, and
exclusions;
- time semantics — current state, point-in-time snapshot, activity over a
window, or historical time series;
- freshness and output — realtime lookup, ad-hoc analysis, reusable query,
dashboard, or recurring workflow.
Ask a clarifying question if a missing field could materially change the
source or conclusion. Otherwise state a reasonable assumption before querying.
2. Find and inspect candidates
- Use
search_docs for product, metric, and known-domain terminology.
- Use
search_schemas to find 3–5 candidate tables. Search with the object
and measure, not only the user's project name.
- Fetch the most promising candidates with
search_schemas(id=..., include_content=True).
Read columns, grain, descriptions, and caveats; a search result title alone
is never sufficient for selection.
- Check relevant canonical Terminal results with
search_terminal and
get_terminal_results before recreating a commonly used metric.
Prefer a per-chain table for a single-chain question. Use cross-chain sources
only when the comparison actually spans chains and the source's chain and asset
semantics fit the question. Use Realtime for current state of a known asset or
wallet; use Explorer/SQL for historical, comparative, or aggregated analysis.
If the question falls in a covered sector — real-world assets, stablecoins,
bridges, DEX/AMM trades, or lending — check whether a sector-specific skill
(rwa-analysis, stablecoin-analysis, bridge-analysis, dex-analysis,
lending-analysis) is available before hand-rolling the table choice; those
skills package the recurring table/column pitfalls for that sector and can
save a coverage-probe cycle.
3. Compare candidates against the contract
For each serious candidate, check:
- Does its row grain match the requested unit, or would aggregation/joining
change the meaning?
- Is it a flow, a snapshot, or a cumulative value? Do not substitute one for
another without saying so.
- Does it include the requested networks, dates, assets, and entity universe?
- Are token units, prices, labels, bridged representations, or attribution
fields defined at the required level of certainty?
- Is there a curated metric or canonical dashboard that is safer than deriving
the measure from raw rows?
Do not resolve an ambiguity by choosing the top-ranked hit. Keep alternatives
when they measure different, defensible things and explain the difference.
4. Prove coverage before building the analysis
Run a small, bounded query against the recommended source when the metric is
load-bearing, the chain is newly selected, or coverage is uncertain. Inspect a
few rows plus a short time series or aggregate.
Coverage is not proven merely because a chain or table appears in search. Stop
and rescope if the requested period is empty, thin, stale, or represents a
different economic object. A wrapped or bridged asset is not proof of native
chain coverage.
5. Return a match manifest
Before writing the full query, present the decision in this form:
| Field |
Record |
| Requested meaning |
Object, measure, grain, scope, and time semantics |
| Recommended source |
Table, endpoint, or canonical dashboard/query |
| Why it fits |
Evidence from schema/docs and coverage probe |
| Alternatives rejected |
Candidate and the semantic mismatch |
| Caveats |
Coverage, freshness, attribution, unit, or aggregation limits |
| Decision |
Use / use with caveat / rescope / unavailable |
Carry the selected source, caveats, and coverage result into the query and
final answer. If the result becomes decision-relevant, save it via
create_explorer_query and follow allium-investigation's reproducibility
step before sharing it.
1---2name: data-matching3description: Match an analytical question to the right Allium table, metric, dashboard, or realtime endpoint. Required when selecting a new data source for a query or analysis: define the intended meaning, compare schema candidates, test coverage, and record the fit and caveats before treating a source as correct. Run this before `allium-investigation` or any other analysis.4---56# Data Matching78The schema KB finds candidates. This skill decides whether a candidate actually9matches the user's question. A semantically similar table is not automatically10the right metric.1112Fetch this skill when introducing a new data source. Do not repeat it when13making a narrow refinement to a previously inspected saved query unless the14metric, source, scope, or interpretation changes.1516## 1. Translate the question into a data contract1718Before selecting a source, state the required:1920- **object** — transaction, wallet, holder, position, token, protocol, entity,21 or another unit;22- **measure** — count, balance, supply, volume, price, fees, active wallets,23 or a defined derived metric;24- **grain** — event, block, day, month, wallet-token, protocol-chain, etc.;25- **scope** — networks, addresses, assets, population, inclusions, and26 exclusions;27- **time semantics** — current state, point-in-time snapshot, activity over a28 window, or historical time series;29- **freshness and output** — realtime lookup, ad-hoc analysis, reusable query,30 dashboard, or recurring workflow.3132Ask a clarifying question if a missing field could materially change the33source or conclusion. Otherwise state a reasonable assumption before querying.3435## 2. Find and inspect candidates36371. Use `search_docs` for product, metric, and known-domain terminology.382. Use `search_schemas` to find 3–5 candidate tables. Search with the object39 and measure, not only the user's project name.403. Fetch the most promising candidates with `search_schemas(id=..., include_content=True)`.41 Read columns, grain, descriptions, and caveats; a search result title alone42 is never sufficient for selection.434. Check relevant canonical Terminal results with `search_terminal` and44 `get_terminal_results` before recreating a commonly used metric.4546Prefer a per-chain table for a single-chain question. Use cross-chain sources47only when the comparison actually spans chains and the source's chain and asset48semantics fit the question. Use Realtime for current state of a known asset or49wallet; use Explorer/SQL for historical, comparative, or aggregated analysis.5051If the question falls in a covered sector — real-world assets, stablecoins,52bridges, DEX/AMM trades, or lending — check whether a sector-specific skill53(`rwa-analysis`, `stablecoin-analysis`, `bridge-analysis`, `dex-analysis`,54`lending-analysis`) is available before hand-rolling the table choice; those55skills package the recurring table/column pitfalls for that sector and can56save a coverage-probe cycle.5758## 3. Compare candidates against the contract5960For each serious candidate, check:6162- Does its row grain match the requested unit, or would aggregation/joining63 change the meaning?64- Is it a flow, a snapshot, or a cumulative value? Do not substitute one for65 another without saying so.66- Does it include the requested networks, dates, assets, and entity universe?67- Are token units, prices, labels, bridged representations, or attribution68 fields defined at the required level of certainty?69- Is there a curated metric or canonical dashboard that is safer than deriving70 the measure from raw rows?7172Do not resolve an ambiguity by choosing the top-ranked hit. Keep alternatives73when they measure different, defensible things and explain the difference.7475## 4. Prove coverage before building the analysis7677Run a small, bounded query against the recommended source when the metric is78load-bearing, the chain is newly selected, or coverage is uncertain. Inspect a79few rows plus a short time series or aggregate.8081Coverage is not proven merely because a chain or table appears in search. Stop82and rescope if the requested period is empty, thin, stale, or represents a83different economic object. A wrapped or bridged asset is not proof of native84chain coverage.8586## 5. Return a match manifest8788Before writing the full query, present the decision in this form:8990| Field | Record |91| --- | --- |92| Requested meaning | Object, measure, grain, scope, and time semantics |93| Recommended source | Table, endpoint, or canonical dashboard/query |94| Why it fits | Evidence from schema/docs and coverage probe |95| Alternatives rejected | Candidate and the semantic mismatch |96| Caveats | Coverage, freshness, attribution, unit, or aggregation limits |97| Decision | Use / use with caveat / rescope / unavailable |9899Carry the selected source, caveats, and coverage result into the query and100final answer. If the result becomes decision-relevant, save it via101`create_explorer_query` and follow `allium-investigation`'s reproducibility102step before sharing it.