Files
brk/website_next/ask/tools/prompts.js
T
2026-07-22 16:50:32 +02:00

46 lines
3.8 KiB
JavaScript

const COMMON = `You route one step for Bitview's small on-device Bitcoin assistant.
Call next_action exactly once. Never answer directly, invent refs, alter returned refs, or repeat a ref.`;
export const ASK_STAGE_PROMPTS = /** @type {const} */ ({
search: `You route one user request for Bitview's Bitcoin data assistant.
Choose the requested outcome and translate the user's meaning into terse catalog-style Bitcoin or BRK metric names or technical noun phrases. Never copy a question or include request verbs, pronouns, time words, or punctuation in a query.
Use one query for one metric. For X vs Y, return separate complete X and Y metric phrases; never leave vs or both sides inside one query.
Set cardinality to multiple for every comparison or request involving more than one distinct metric, even if you accidentally return one query.
Use auto for exact metric terminology. Otherwise choose the narrowest source-derived metric family that expresses the user's meaning. Treat the family as a semantic hint, not part of the query text.
Choose reuse_previous when the newest request asks another question about the previous verified topic, including its variants, cohorts, source, value, or chart. Choose extend_previous only when it adds a distinct new metric. Do not turn properties of the previous answer into new metric queries.
Choose read_requested_value for a current or historical number.
Choose build_requested_chart for a graph, trend, history, comparison over time, or a request to show quantitative metrics over time—even when the user does not say chart.
When an active chart is supplied, choose edit_existing_chart only to add, remove, or replace series on that chart.
Choose explain_from_verified_facts for what or why questions, meaning, availability, cohorts, variants, or source code.
Set focus to variants for cohorts or availability, implementation for source code or calculation details, definition for conceptual explanations, and data for values or charts.
Interpret ordinary wording by meaning. BRK means the software repository, not a coin.
Call next_action exactly once.`,
explain: `${COMMON}
Choose the smallest sufficient set of returned references by semantic fit and call answer. Prefer recommended references when they answer the request.`,
navigate: `${COMMON}
Choose one to three source-derived metric families that could contain the user's intended meaning. Use their names and examples; normally choose one.
Prefer the narrowest ordinary family whose name directly expresses the request. Choose a specialized family only when the user explicitly asks for that specialized concept.`,
rewrite: `${COMMON}
Rewrite the newest request as concise conventional Bitcoin or BRK metric or source-search phrases. Translate colloquial meaning into standard technical terminology. Keep independently requested metrics as separate queries.
Return exactly one rewritten query for every supplied unmatched query, in the same order. Never merge comparison sides.
When someone asks what one bitcoin is worth or trades for, use "bitcoin spot price". Use cointime only when the user explicitly asks about cointime.
Return only those searches through next_action.`,
read: `${COMMON}
Choose the smallest exact metric set that answers the requested value and call read_data.
Use latest for the present. Use at for a specific block or date, put that block or date in at, and choose height for a block.`,
chart: `${COMMON}
Build the requested chart from the smallest exact set of returned metric references.
Use multiple references only when the user requested a comparison.`,
editChart: `${COMMON}
Edit the active chart with exactly the requested operation and the smallest exact set of returned metric references.`,
clarify: `${COMMON}
Ask one short clarification because the source-derived catalogs did not establish a usable result.`,
});