DolphinDB Answer Discipline
The Rule
NEVER answer DolphinDB questions from memory alone. Ground every claim in a verifiable source.
Model training data is outdated and frequently wrong about DolphinDB (function names, signatures, division operator, window semantics). Without a retrieval tool available, the only safe sources are:
- Official DolphinDB documentation the user has linked or pasted
- Local docs / scripts the user has in this workspace (read them with the file tools)
- Verified behavior from executing a minimal probe script on the DolphinX platform
- The schema / pitfalls notes shipped with
dolphindb-daily-factor (references/schema.md, references/pitfalls.md)
Anything else is a guess. Mark it as a guess or refuse.
Scope of This Skill
This skill is answer discipline for DolphinDB questions:
- ✅ Explaining DolphinDB syntax / functions when you can cite a concrete source
- ✅ Diagnosing error messages by either matching them to local docs or running a reproducer on the DolphinX platform
- ✅ Recommending a pattern, with the source the recommendation came from
Out of scope:
- ❌ Generating daily-frequency factor code → use the
dolphindb-daily-factor skill (it owns the template, schema, and execution loop)
- ❌ Inventing a function signature because it "feels right" → STOP, say you're not sure and ask the user for the doc page, or run a probe on the platform
When in Doubt — Verify Before You Answer
In order of preference:
- Ask the user to paste / link the relevant doc section if they have it. One sentence: "I want to verify X — do you have the doc page for
<function> handy?"
- Read local files — if the workspace has DolphinDB scripts, modules, or docs, search them with the file tools before answering.
- Probe the DolphinX platform — run the smallest possible script that reveals the answer (e.g. call the function on a tiny vector and inspect the result / error). Cheaper than wrong answers.
- Say "I'm not sure" — explicitly. Do not paper over uncertainty with confident prose.
If the question is about live cluster state (does a DB exist? what tables? what columns?), always go to option 3 — see dolphindb-daily-factor/references/probing.md for the catalog commands.
Workflow
For a typical DolphinDB question:
- Identify what needs verification — list the function names, operators, and behaviors the answer depends on.
- For each item, pick a source:
- User-provided doc → cite it
- Local file → read and cite path + line range
- Probe script → run on the DolphinX platform, cite the observed output
- None of the above → flag as unverified, ask the user or refuse
- Compose the answer from verified pieces only. No filler from memory.
- If the answer is a runnable script, the user can execute it directly on the DolphinX platform.
If the user reports an error message:
- Match the verbatim error against local docs / scripts first
- If no match, build a minimal reproducer and run it on the DolphinX platform, then diagnose from the observed behavior
Response Format
[Answer composed from verified sources only.]
来源 / Sources:
- <doc title or local file path> (L<start>-<end> if applicable)
- DolphinX 平台执行结果: <one-line summary of what was run and what came back>
If a part of the answer could not be verified, say so explicitly:
⚠️ 以下内容未在本会话中验证: <claim>
建议: <how the user can verify — paste doc, run on platform, etc.>
Checklist (before sending the answer)
Red Flags — You're Doing It Wrong
- "据我所知 DolphinDB..." / "DolphinDB should support..." without a source → STOP, verify or flag
- Guessing the cause of an error message without reproducing it → STOP, build a minimal probe
- Making up DolphinDB syntax from Python / SQL / Java intuition → STOP, DolphinDB syntax is different (
\ vs / division being the canonical trap)
- "Basic syntax is common knowledge" → WRONG, verify it
- Confidently stating a function signature you have not seen this session → STOP
- Skipping the source citation → STOP, every claim needs a source
- Answering "does this database/table/field exist?" from memory → WRONG, run
existsDatabase / getTables / schema on the DolphinX platform (see dolphindb-daily-factor/references/probing.md)
- Trying to run / verify a generated factor script here → WRONG skill, hand off to
dolphindb-daily-factor
1---2name: dolphindb-rag3description: MUST use before answering any DolphinDB question — enforces source-grounded answers (no fabrication from memory) when no retrieval tool is available. Code execution happens on the DolphinDB.4---56# DolphinDB Answer Discipline78## The Rule910```11NEVER answer DolphinDB questions from memory alone. Ground every claim in a verifiable source.12```1314Model training data is outdated and frequently wrong about DolphinDB (function names, signatures, division operator, window semantics). Without a retrieval tool available, the only safe sources are:15161. Official DolphinDB documentation the user has linked or pasted172. Local docs / scripts the user has in this workspace (read them with the file tools)183. Verified behavior from executing a minimal probe script on the DolphinX platform194. The schema / pitfalls notes shipped with `dolphindb-daily-factor` (`references/schema.md`, `references/pitfalls.md`)2021Anything else is a guess. Mark it as a guess or refuse.2223## Scope of This Skill2425This skill is **answer discipline** for DolphinDB questions:2627- ✅ Explaining DolphinDB syntax / functions when you can cite a concrete source28- ✅ Diagnosing error messages by either matching them to local docs or running a reproducer on the DolphinX platform29- ✅ Recommending a pattern, with the source the recommendation came from3031Out of scope:3233- ❌ Generating daily-frequency factor code → use the `dolphindb-daily-factor` skill (it owns the template, schema, and execution loop)34- ❌ Inventing a function signature because it "feels right" → STOP, say you're not sure and ask the user for the doc page, or run a probe on the platform3536## When in Doubt — Verify Before You Answer3738In order of preference:39401. **Ask the user** to paste / link the relevant doc section if they have it. One sentence: "I want to verify X — do you have the doc page for `<function>` handy?"412. **Read local files** — if the workspace has DolphinDB scripts, modules, or docs, search them with the file tools before answering.423. **Probe the DolphinX platform** — run the smallest possible script that reveals the answer (e.g. call the function on a tiny vector and inspect the result / error). Cheaper than wrong answers.434. **Say "I'm not sure"** — explicitly. Do not paper over uncertainty with confident prose.4445If the question is about live cluster state (does a DB exist? what tables? what columns?), always go to option 3 — see `dolphindb-daily-factor/references/probing.md` for the catalog commands.4647## Workflow4849For a typical DolphinDB question:50511. **Identify what needs verification** — list the function names, operators, and behaviors the answer depends on.522. **For each item, pick a source**:53 - User-provided doc → cite it54 - Local file → read and cite path + line range55 - Probe script → run on the DolphinX platform, cite the observed output56 - None of the above → flag as unverified, ask the user or refuse573. **Compose the answer from verified pieces only.** No filler from memory.584. **If the answer is a runnable script**, the user can execute it directly on the DolphinX platform.5960If the user reports an error message:61- Match the verbatim error against local docs / scripts first62- If no match, build a minimal reproducer and run it on the DolphinX platform, then diagnose from the observed behavior6364## Response Format6566```67[Answer composed from verified sources only.]6869来源 / Sources:70- <doc title or local file path> (L<start>-<end> if applicable)71- DolphinX 平台执行结果: <one-line summary of what was run and what came back>72```7374If a part of the answer could not be verified, say so explicitly:7576```77⚠️ 以下内容未在本会话中验证: <claim>78 建议: <how the user can verify — paste doc, run on platform, etc.>79```8081## Checklist (before sending the answer)8283- [ ] Every non-trivial claim has a source (user doc, local file, or platform-execution observation)84- [ ] No fabricated function names, signatures, or behaviors85- [ ] Unverified parts are flagged with ⚠️, not buried86- [ ] If the answer is a factor / panel script, told the user to use `dolphindb-daily-factor`87- [ ] Code snippets in the answer are minimal and the user can run them on DolphinX as-is8889## Red Flags — You're Doing It Wrong9091- "据我所知 DolphinDB..." / "DolphinDB should support..." without a source → STOP, verify or flag92- Guessing the cause of an error message without reproducing it → STOP, build a minimal probe93- Making up DolphinDB syntax from Python / SQL / Java intuition → STOP, DolphinDB syntax is different (`\` vs `/` division being the canonical trap)94- "Basic syntax is common knowledge" → WRONG, verify it95- Confidently stating a function signature you have not seen this session → STOP96- Skipping the source citation → STOP, every claim needs a source97- Answering "does this database/table/field exist?" from memory → WRONG, run `existsDatabase` / `getTables` / `schema` on the DolphinX platform (see `dolphindb-daily-factor/references/probing.md`)98- Trying to run / verify a generated factor script here → WRONG skill, hand off to `dolphindb-daily-factor`