Spaces:
Sleeping
Sleeping
Deploy TinyModel1Space from GitHub Actions
Browse files- README.md +19 -21
- scripts/nl_controls.py +0 -0
- scripts/universal_brain_chat.py +58 -8
README.md
CHANGED
|
@@ -11,34 +11,32 @@ pinned: false
|
|
| 11 |
|
| 12 |
# TinyModel1Space
|
| 13 |
|
| 14 |
-
**Universal Brain
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
| 17 |
| --- | --- |
|
| 18 |
-
| **
|
| 19 |
-
| **
|
| 20 |
-
| **
|
| 21 |
-
| **
|
| 22 |
-
| **
|
| 23 |
-
|
| 24 |
-
|
| 25 |
|
| 26 |
-
|
| 27 |
-
- **Source:** [https://github.com/HyperlinksSpace/TinyModel](https://github.com/HyperlinksSpace/TinyModel)
|
| 28 |
|
| 29 |
### Secrets (recommended)
|
| 30 |
|
| 31 |
-
- `HF_TOKEN` —
|
| 32 |
-
- `GOOGLE_CSE_API_KEY`
|
| 33 |
|
| 34 |
-
### Optional environment
|
| 35 |
|
| 36 |
-
- `HORIZON2_MODEL` —
|
| 37 |
-
- `
|
| 38 |
-
- `GOOGLE_CSE_NUM` — results per request, 1–10 (default 5).
|
| 39 |
-
- `GOOGLE_CSE_SAFE` — optional safe-search level for Google `cse.list` (e.g. `off`, `active`).
|
| 40 |
-
- `NO_AUTO_WEB` — set to `1` / `true` / `on` to disable **automatic** chat→web upgrades (router + `/web` unchanged).
|
| 41 |
|
| 42 |
-
###
|
| 43 |
|
| 44 |
-
First CPU
|
|
|
|
| 11 |
|
| 12 |
# TinyModel1Space
|
| 13 |
|
| 14 |
+
**Universal Brain** is a **text** chat demo: plain-language **routing**, a small **instruct LM** (default **SmolLM2-360M-Instruct**, override **`HORIZON2_MODEL`**), **TinyModel1** encoder ([model card](https://huggingface.co/HyperlinksSpace/TinyModel1) · `HyperlinksSpace/TinyModel1`), **FAQ hybrid RAG**, **scoped SQLite memory**, optional **Google web search**, plus **40+ embedded prompt signals** detected from long messages.
|
| 15 |
|
| 16 |
+
**Try it:** type naturally or **`/help`** · say **Show the brain trace** · scroll below the chat to **Testing embedded prompt signals**.
|
| 17 |
+
|
| 18 |
+
| What you can do | How |
|
| 19 |
| --- | --- |
|
| 20 |
+
| **Chat & tools** | Summarize, rewrite, grounded Q&A, FAQ search, classify (4 topics), similarity, embeddings, nearest match, memory — via routing or **`/summarize`**, **`/retrieve`**, **`/web`**, … |
|
| 21 |
+
| **Web (optional)** | **`GOOGLE_CSE_API_KEY`** + **`GOOGLE_CSE_CX`** secrets → live snippets with **[Web n]** cites |
|
| 22 |
+
| **Memory** | Remember / list / export notes; *Start a new private session* for demo isolation |
|
| 23 |
+
| **Session controls** | Short phrases: *Be brief*, *Strict FAQ*, *Use bullet points*, *Reset reply style*, … (persist; see **`/help`**) |
|
| 24 |
+
| **Embedded signals** | Long questions: *pros and cons*, *in Spanish*, *code only*, *rank options*, *Mermaid diagram*, *STAR format*, *don't mention X*, … → footer **`prompt_signals:`** |
|
| 25 |
+
|
| 26 |
+
Full reference: [https://github.com/HyperlinksSpace/TinyModel/blob/main/texts/universal-brain-capabilities.md](https://github.com/HyperlinksSpace/TinyModel/blob/main/texts/universal-brain-capabilities.md) · Repo: [https://github.com/HyperlinksSpace/TinyModel](https://github.com/HyperlinksSpace/TinyModel) · App: [https://hyperlinksspace-tinymodel1space.hf.space](https://hyperlinksspace-tinymodel1space.hf.space)
|
| 27 |
|
| 28 |
+
**Not supported:** images/audio/video; guaranteed factual accuracy on hard reasoning; private multi-tenant auth on the public demo scope.
|
|
|
|
| 29 |
|
| 30 |
### Secrets (recommended)
|
| 31 |
|
| 32 |
+
- **`HF_TOKEN`** — reliable Hub downloads for generative + encoder weights.
|
| 33 |
+
- **`GOOGLE_CSE_API_KEY`** + **`GOOGLE_CSE_CX`** — Google Custom Search (web in chat).
|
| 34 |
|
| 35 |
+
### Optional environment
|
| 36 |
|
| 37 |
+
- **`HORIZON2_MODEL`** — generative instruct model id.
|
| 38 |
+
- **`NO_AUTO_WEB`** — `1` / `true` / `on` disables automatic chat→web upgrades (router + `/web` still work).
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
### Startup
|
| 41 |
|
| 42 |
+
First **CPU** boot may take several minutes (two models). Use a **GPU** Space or a smaller **`HORIZON2_MODEL`** for faster replies.
|
scripts/nl_controls.py
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|
scripts/universal_brain_chat.py
CHANGED
|
@@ -112,7 +112,7 @@ from rag_faq_smoke import _pick_model, hybrid_retrieve, load_chunks # noqa: E40
|
|
| 112 |
from tinymodel_runtime import TinyModelRuntime # noqa: E402
|
| 113 |
|
| 114 |
HELP_TEXT = """**How to use**
|
| 115 |
-
- **Normal language:** ask in plain English (or mixed); the app **infers** what you want (summarize, search FAQ, save a note, etc.). Longer prompts may also **imply** reply shape for that turn only (for example trade-off questions → Pros/Cons layout or flowing prose comparison, “in a table” → markdown table preference, “answer in Spanish” → reply language, **code only** → code-first output, **in under N words** → length cap, **hints only / don’t give the full solution** → guided discovery, **red team / sanity check my plan** → challenge-style pushback, **be supportive / assume good intent on my plan** → supportive coaching, **don’t remember this / off the record** → ephemeral hint, **screen reader friendly / WCAG** → accessibility layout hint, **ELI5 / lay audience in a long question** → beginner audience, **assume I'm technical / expert depth in prose** → technical audience, **board-ready / Slack-casual wording** → formal or casual register, **valid JSON / return JSON in prose** → JSON output mode, **don’t guess / stick to facts in prose** → strict speculation, **brainstorm freely / wild ideas in prose** → creative speculation, **TLDR first / BLUF in prose** → summary-first open, **answer directly / skip the summary in prose** → direct opening, **FAQ direct quotes vs paraphrase-only in prose** → quote style for excerpts, **emoji ok vs no emoji in prose** → emoji style, **FAQ-only vs FAQ-plus-general-knowledge in prose** → FAQ grounding, **show work vs final-answer-only in prose** → math detailing, **state assumptions / limitations / caveats** in prose → transparent confidence tone, **be decisive / don’t hedge in prose** → assertive confidence tone, **curl/bash/kubectl in prose** → runnable commands, **conceptual only / no commands in prose** → conceptual actionability, **bullet points vs plain paragraphs in prose** → reply format, **step-by-step vs continuous procedure prose in long prompts** → step style, **concrete / worked / toy example in prose** → richer examples, **example-free / skip examples in prose** → sparser examples, **define terms first / intuition or big-picture first in prose** → explanation order, **no questions at the end / suggest next steps in prose** → closing style, **ask questions before answering / answer without clarifiers in prose** → clarify-first mode, **markdown section headings vs flat prose in long prompts** → section layout, **analogy vs literal-only in long prompts** → analogy style, **bold key terms vs minimal bold in long prompts** → term emphasis, **spell out acronyms vs terse acronyms in long prompts** → acronym style, **err on the side of safety vs ship-fast pragmatism in long prompts** → risk posture, **fenced code blocks vs inline-only snippets in long prompts** → code block style) — see *Brain trace* **`prompt_signals:`** when detected.
|
| 116 |
- **Session controls (say it in chat, no slash command):**
|
| 117 |
- *What is my current scope?*, *Show my session settings* -> prints scope + toggles (FAQ context, routing, trace)
|
| 118 |
- *Start a new private session*, *Begin a fresh scope* -> generates a **new memory scope key** so notes are isolated from the shared default demo scope
|
|
@@ -174,7 +174,7 @@ If routing misfires, try rephrasing or use a slash command; **`--no-smart-route`
|
|
| 174 |
# Shown under the chat + controls in the Gradio UI (Hugging Face Space and local).
|
| 175 |
GRADIO_INSTRUCTIONS_MARKDOWN = """### About this Space
|
| 176 |
|
| 177 |
-
**Universal Brain** is a **text** assistant
|
| 178 |
|
| 179 |
#### What it can do (summary)
|
| 180 |
|
|
@@ -184,7 +184,8 @@ GRADIO_INSTRUCTIONS_MARKDOWN = """### About this Space
|
|
| 184 |
| **Encoder** | Soft **topic hint** + trace line **`classify:…`**; **`/classify`** for full label probabilities. |
|
| 185 |
| **RAG** | Injects top FAQ **chunks**; tune strictness with phrases like *Strict FAQ* (see `/help`). |
|
| 186 |
| **Memory** | Long-term + session notes; **scope** isolation phrases for demos; export / forget from chat. |
|
| 187 |
-
| **
|
|
|
|
| 188 |
| **Limits** | Small models can **hallucinate** or miss nuance; FAQ/web only **constrain** answers when relevant snippets exist. **Not multimodal** here. Shared default **memory scope** is not private auth. |
|
| 189 |
|
| 190 |
---
|
|
@@ -199,18 +200,54 @@ GRADIO_INSTRUCTIONS_MARKDOWN = """### About this Space
|
|
| 199 |
|
| 200 |
### Testing embedded prompt signals (this Space)
|
| 201 |
|
| 202 |
-
These behaviors apply when your line is handled as **normal chat** (not a short dedicated control like *Be brief*). The app scans your wording and adds **one-turn** system hints.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
|
| 204 |
| Goal | What to type (examples) | What to look for |
|
| 205 |
| --- | --- | --- |
|
| 206 |
| Comparison: pros/cons | In a **long** message, ask for **tradeoffs**, **pros and cons**, **compare X vs Y**, or **advantages and disadvantages** between concrete options (avoid mixing with **no pros and cons** / **flowing prose comparison** in the same line). | **`comparison_frame=pros_cons`** in **`prompt_signals:`**; reply should use **Pros** / **Cons** sections |
|
| 207 |
| Comparison: narrative prose | In a **long** comparison question, ask for **flowing prose**, **narrative comparison**, **prose comparison only**, or **no pros and cons sections** (avoid mixing with **pros and cons** / **tradeoffs** layout cues in the same line). | **`comparison_frame=narrative`** in **`prompt_signals:`**; reply should weave the comparison in continuous prose |
|
| 208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
| Code-only | Ask for a tiny snippet and add **code only, no explanation** (or **just the code**). | **`code_only`** in **`prompt_signals:`**; reply should be mostly a fenced code block |
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
|
| 211 |
| Numbered steps vs continuous prose | In a **long** how-to message, ask **step by step**, **walk me through**, **numbered steps**, or a **how to install/configure** style question. **Or** say **no numbered steps**, **continuous prose only**, **prose without steps**, **explain as connected paragraphs** (avoid mixing both in one line). | **`step_style=numbered`** or **`step_style=continuous`** in **`prompt_signals:`**; reply should use numbered steps or flowing prose accordingly |
|
| 212 |
| Bullets vs prose | In a **long** message, ask for **bullet points**, **use bullets**, **bulleted list**, **format as bullets**, etc. **Or** say **no bullets**, **plain paragraphs**, **prose only**, **avoid bullet lists** (avoid mixing both in one line). | **`reply_format=bullets`** or **`reply_format=prose`** in **`prompt_signals:`**; reply should list points or stay in paragraphs accordingly |
|
| 213 |
-
|
|
|
|
|
|
|
|
| 214 |
| Red-team / critique | In one paragraph, describe a **plan or design** and ask for a **red team**, **sanity check**, **what am I missing**, or **devil’s advocate** review (not a one-line control). | **`counterpoint_tone=challenge`** inside **`prompt_signals:`**; reply should stress-test assumptions |
|
| 215 |
| Supportive coaching | In one paragraph, describe a **plan, pitch, or idea** and ask to **be supportive**, **assume good intent**, **encourage my proposal**, **gentle feedback**, or **avoid harsh criticism** (not a one-line control; avoid mixing with red-team wording in the same line). | **`counterpoint_tone=supportive`** in **`prompt_signals:`**; reply should coach with constructive next steps, not harsh critique |
|
| 216 |
| Ephemeral / no memory | Say **off the record**, **don’t remember this**, **no memory for this**, or **don’t log this** in the same message as your question (demo: shared Space scopes are not true secrecy). | **`ephemeral`** in **`prompt_signals:`**; assistant should avoid pushing `/remember` for that content |
|
|
@@ -218,17 +255,29 @@ These behaviors apply when your line is handled as **normal chat** (not a short
|
|
| 218 |
| Beginner / ELI5 in context | In a **longer** question (not a one-line control), ask for **ELI5**, **explain like I'm five**, **total beginner**, **lay audience**, **no technical background**, etc., plus a normal **what/why/how** ask. | **`audience=simple`** in **`prompt_signals:`**; reply should use plain language and minimal jargon |
|
| 219 |
| Technical / expert audience | In a **longer** question (not a one-line control), say you're a **technical audience**, **assume I'm technical**, want a **deep technical** or **internals-focused** explanation, **skip the basics**, **staff-engineer level**, etc., plus a normal **what/why/how** ask (avoid mixing with ELI5/beginner wording in the same line). | **`audience=technical`** in **`prompt_signals:`**; reply may use domain jargon and skip hand-holding |
|
| 220 |
| Formal vs casual register | Ask for a **board-ready** / **client-facing** / **formal memo** / **for regulators** write-up, **or** say you want a **Slack message**, **keep it casual**, **water cooler** tone (one dominant style per message). | **`register_tone=formal`** or **`register_tone=casual`** in **`prompt_signals:`** |
|
| 221 |
-
| JSON / structured output | In a **long** message, ask for **valid JSON**, **return JSON**, **as a JSON object**, **machine-readable JSON**, etc. (
|
|
|
|
| 222 |
| Strict facts / low speculation | In a **long** message, ask to **not guess**, **avoid hallucinations**, **only high confidence**, **stick to facts**, **if unsure say so**, etc. (avoid mixing with **brainstorm freely** in the same line). | **`speculation=strict`** in **`prompt_signals:`**; reply should label uncertainty clearly |
|
| 223 |
| Creative brainstorming | In a **long** message, ask to **brainstorm freely**, **speculate freely**, welcome **wild ideas**, do **blue-sky thinking**, or **explore hypotheticals** (avoid mixing with **don’t guess** / **stick to facts** in the same line). | **`speculation=creative`** in **`prompt_signals:`**; reply may propose speculative ideas with clear assumption labels |
|
| 224 |
| Summary / BLUF first | In a **long** message, ask to **TLDR first**, **lead with a one-line summary**, **bottom line up front**, **BLUF**, **executive summary first**, etc. (avoid mixing with **answer directly** / **skip the summary** in the same line). | **`answer_lead=tldr_first`** in **`prompt_signals:`**; reply should open with a short summary line |
|
|
|
|
|
|
|
| 225 |
| Direct answer (no TL;DR) | In a **long** message, ask to **answer directly**, **skip the summary**, **no TL;DR**, **jump straight to the answer**, or **omit the opening summary** (avoid mixing with **BLUF** / **summary first** in the same line). | **`answer_lead=direct`** in **`prompt_signals:`**; reply should start in-flow without a standalone TL;DR prelude |
|
|
|
|
| 226 |
| Runnable commands | In a **long** message, ask for **curl one-liner**, **bash snippet**, **kubectl**, **copy-paste into terminal**, **docker run example**, etc. (avoid mixing with **conceptual only** / **no commands** in the same line). | **`actionability=commands`** in **`prompt_signals:`**; reply should include concrete commands where sensible |
|
| 227 |
| Conceptual only (no commands) | In a **long** message, ask for **conceptual only**, **high level only**, **no shell commands**, **focus on concepts and rationale**, or an **architecture overview without command dumps** (avoid mixing with **kubectl** / **copy-paste into terminal** in the same line). | **`actionability=conceptual`** in **`prompt_signals:`**; reply should avoid runnable command dumps |
|
| 228 |
| Assumptions / limitations | In a **long** message, ask to **state your assumptions**, **assumptions and limitations**, **caveats upfront**, **scope and assumptions**, **what we are assuming**, or to **flag key uncertainties** (say **skip assumptions** to opt out; avoid mixing with **be decisive** in the same line). | **`confidence_tone=transparent`** in **`prompt_signals:`**; reply should surface assumptions, limits, and uncertainty clearly |
|
| 229 |
| Decisive / confident tone | In a **long** message, ask to **be decisive**, **don’t hedge**, **give firm answers**, **sound confident**, or **avoid disclaimers** (avoid mixing with **state your assumptions** / **caveats upfront** in the same line). | **`confidence_tone=assertive`** in **`prompt_signals:`**; reply should be direct with minimal hedging |
|
| 230 |
| Concrete examples vs example-free | In a **long** message, ask for a **worked example**, **walk me through a toy example**, **illustrate with a concrete example**, **ground your answer in an example**, etc. **Or** ask to **skip examples**, **theory only**, **keep it abstract**, **example-free** (avoid mixing both in one line). | **`example_density=rich`** or **`example_density=sparse`** in **`prompt_signals:`**; reply should include or omit short illustrative examples accordingly |
|
| 231 |
| Explanation order | In a **long** message, ask to **define terms first**, **definitions before details**, **formal definitions upfront**, **terminology first**, etc. **Or** ask for **intuition before math**, **big picture first**, **motivation before the formal proof**, **start with the high-level sketch** (avoid asking for both orders in one line). | **`exposition_order=definitions_first`** or **`exposition_order=intuition_first`** in **`prompt_signals:`**; reply should lead with definitions or with intuition accordingly |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
| Closing / follow-ups | In a **long** message, ask for **no questions at the end**, **don’t ask if I need anything else**, **finish crisply**, **skip the stock closer**, etc. **Or** ask to **suggest next steps**, **end with actionable next steps**, **what should we do next**, **offer ways to go deeper** (avoid mixing both in one line). | **`followup_close=minimal`** or **`followup_close=suggest`** in **`prompt_signals:`**; reply should omit or include a light optional follow-up line accordingly |
|
| 233 |
| Clarify-first vs answer-first | In a **long** message, ask to **ask clarifying questions before you answer**, **if anything is unclear ask me first**, **confirm my constraints before**, etc. **Or** say **no clarifying questions**, **answer without asking questions first**, **don’t interrogate me first**, **give your best answer without asking** (avoid mixing both in one line). | **`clarify_first=on`** or **`clarify_first=off`** in **`prompt_signals:`**; first reply should ask brief questions first or answer directly |
|
| 234 |
| Section headings vs flat | In a **long** message, ask to **use markdown headings**, **organize with headings**, **structure the answer with clear headings**, **h2 or h3 headings for each topic**, etc. **Or** ask for a **flat answer**, **no section headings**, **avoid markdown headings**, **continuous prose only** (avoid mixing both in one line). | **`section_headings=prefer`** or **`section_headings=avoid`** in **`prompt_signals:`**; reply should use or avoid `##` / `###` title lines accordingly |
|
|
@@ -239,6 +288,7 @@ These behaviors apply when your line is handled as **normal chat** (not a short
|
|
| 239 |
| FAQ quote vs paraphrase | In a **long** message about **FAQ / policy / excerpt** text, ask to **quote the FAQ excerpts**, **include direct quotes from the policy**, **verbatim passages from the excerpt**, etc. **Or** say **paraphrase the FAQ**, **paraphrase only**, **don’t quote the excerpts**, **summarize the policy in your own words** (avoid mixing both in one line). | **`quote_style=quote`** or **`quote_style=paraphrase`** in **`prompt_signals:`**; reply should quote or paraphrase injected excerpts accordingly |
|
| 240 |
| Emoji in replies | In a **long** message, ask to **use a few tasteful emoji**, **include emoji when helpful**, **emoji are ok**, **sprinkle emoji**, etc. **Or** say **no emoji in your reply**, **avoid emoji**, **emoji-free tone**, **don’t use emoji** (avoid mixing both in one line). | **`emoji_style=include`** or **`emoji_style=avoid`** in **`prompt_signals:`**; reply may use sparse emoji or stay emoji-free accordingly |
|
| 241 |
| FAQ grounding (strict vs relaxed) | In a **long** message about **FAQ / policy / excerpt** retrieval, ask to **stick to the FAQ**, **only use the FAQ excerpts**, **if it’s not in the FAQ say so**, **strict FAQ grounding**, etc. **Or** say **FAQ plus general knowledge**, **mix the FAQ with general knowledge**, **supplement the excerpts with brief general context** (avoid mixing both in one line). | **`faq_grounding=strict`** or **`faq_grounding=relaxed`** in **`prompt_signals:`**; reply should stay FAQ-only or allow separated general context accordingly |
|
|
|
|
| 242 |
| Math steps vs final only | In a **long** math-style question, ask to **show your work**, **walk through the derivation**, **prove it step by step**, **show intermediate steps**, etc. **Or** say **final answer only**, **no derivation**, **skip the steps**, **just the result** for the equation (avoid mixing both in one line). | **`math_detail=show_work`** or **`math_detail=final_only`** in **`prompt_signals:`**; reply should include or omit intermediate math steps accordingly |
|
| 243 |
| Code fences vs inline | In a **long** message that includes **code / commands / scripts**, ask for **fenced code blocks**, **markdown code fences**, **triple-backtick fences**, etc. **Or** say **inline code only**, **no triple backticks**, **no fenced code blocks**, **keep snippets inline** (avoid mixing both in one line). | **`code_block_style=fenced`** or **`code_block_style=inline`** in **`prompt_signals:`**; reply should use ``` fences or inline backticks accordingly |
|
| 244 |
|
|
|
|
| 112 |
from tinymodel_runtime import TinyModelRuntime # noqa: E402
|
| 113 |
|
| 114 |
HELP_TEXT = """**How to use**
|
| 115 |
+
- **Normal language:** ask in plain English (or mixed); the app **infers** what you want (summarize, search FAQ, save a note, etc.). Longer prompts may also **imply** reply shape for that turn only (for example trade-off questions → Pros/Cons layout or flowing prose comparison, “in a table” → markdown table preference, **no tables / tabular format in prose** → table style prefer or avoid, “answer in Spanish” → reply language, **code only** → code-first output, **explain the code / not code only in prose** → code with explanation, **pseudocode vs runnable code in prose** → algorithm layout, **cite your sources / no source links in prose** → citation style, **rank options in priority order in prose** → ranked_options, **decision matrix / criteria-as-rows in prose** → decision_matrix, **build vs buy / make vs buy in prose** → build_vs_buy, **one-pager / single-page executive brief in prose** → one_pager, **action plan with owners and due dates in prose** → action_plan, **RACI matrix / role assignment in prose** → raci, **stakeholder map / influence-interest in prose** → stakeholder_map, **exactly N options/alternatives in prose** → options_n=N, **Mermaid/flowchart vs no diagrams in prose** → diagram layout, **risks/downside vs benefits-first section order in prose** → risks_first / benefits_first, **risks and mitigations / risk register in prose** → risks_mitigations, **rewrite/polish my draft in prose** → revise_draft, **write/draft an email in prose** → email_format, **meeting agenda / timeboxed run-of-show in prose** → meeting_agenda, **before/after or track-changes on my draft in prose** → revise_diff, **don’t mention X / avoid discussing Y in prose** → topic_guard, **must cover / include a section on Z in prose** → topic_must, **STAR / PREP / IRAC format in prose** → frame_star / frame_prep / frame_irac, **SWOT analysis in prose** → swot, **PESTLE macro-environment analysis in prose** → pestle, **cost-benefit / CBA in prose** → cost_benefit, **open questions / TBD section in prose** → open_questions, **best/base/worst case scenario analysis in prose** → scenario_cases, **blameless postmortem format in prose** → postmortem, **five whys / 5 whys root cause in prose** → five_whys, **fishbone / Ishikawa cause-and-effect in prose** → fishbone, **checklist / tick-box format in prose** → checklist layout, **in under N words** → length cap, **be brief / more detail in prose** → verbosity brief or detailed, **hints only / don’t give the full solution** → guided discovery, **give me the full solution in prose** → full_solution (not hints), **red team / sanity check my plan** → challenge-style pushback, **be supportive / assume good intent on my plan** → supportive coaching, **don’t remember this / off the record** → ephemeral hint, **screen reader friendly / WCAG** → accessibility layout hint, **ELI5 / lay audience in a long question** → beginner audience, **assume I'm technical / expert depth in prose** → technical audience, **board-ready / Slack-casual wording** → formal or casual register, **valid JSON / return JSON in prose** → JSON output mode, **plain text only / no JSON in prose** → plain output format, **don’t guess / stick to facts in prose** → strict speculation, **brainstorm freely / wild ideas in prose** → creative speculation, **TLDR first / BLUF in prose** → summary-first open, **lead with your recommendation in prose** → recommendation_first, **go/no-go gate verdict in prose** → go_no_go, **summary at the end / closing recap in prose** → summary_last, **answer directly / skip the summary in prose** → direct opening, **FAQ direct quotes vs paraphrase-only in prose** → quote style for excerpts, **emoji ok vs no emoji in prose** → emoji style, **FAQ-only vs FAQ-plus-general-knowledge in prose** → FAQ grounding, **show work vs final-answer-only in prose** → math detailing, **state assumptions / limitations / caveats** in prose → transparent confidence tone, **be decisive / don’t hedge in prose** → assertive confidence tone, **curl/bash/kubectl in prose** → runnable commands, **conceptual only / no commands in prose** → conceptual actionability, **bullet points vs plain paragraphs in prose** → reply format, **step-by-step vs continuous procedure prose in long prompts** → step style, **concrete / worked / toy example in prose** → richer examples, **example-free / skip examples in prose** → sparser examples, **define terms first / intuition or big-picture first in prose** → explanation order, **no questions at the end / suggest next steps in prose** → closing style, **ask questions before answering / answer without clarifiers in prose** → clarify-first mode, **markdown section headings vs flat prose in long prompts** → section layout, **analogy vs literal-only in long prompts** → analogy style, **bold key terms vs minimal bold in long prompts** → term emphasis, **spell out acronyms vs terse acronyms in long prompts** → acronym style, **err on the side of safety vs ship-fast pragmatism in long prompts** → risk posture, **fenced code blocks vs inline-only snippets in long prompts** → code block style) — see *Brain trace* **`prompt_signals:`** when detected.
|
| 116 |
- **Session controls (say it in chat, no slash command):**
|
| 117 |
- *What is my current scope?*, *Show my session settings* -> prints scope + toggles (FAQ context, routing, trace)
|
| 118 |
- *Start a new private session*, *Begin a fresh scope* -> generates a **new memory scope key** so notes are isolated from the shared default demo scope
|
|
|
|
| 174 |
# Shown under the chat + controls in the Gradio UI (Hugging Face Space and local).
|
| 175 |
GRADIO_INSTRUCTIONS_MARKDOWN = """### About this Space
|
| 176 |
|
| 177 |
+
**Universal Brain** is a **text-in / text-out** assistant: (1) **generative instruct LM** (default **SmolLM2-360M-Instruct**, override **`HORIZON2_MODEL`**), (2) **TinyModel1** encoder (**4 topic labels** + **embeddings**), (3) **FAQ hybrid RAG**, (4) **scoped SQLite memory**, (5) **JSON intent routing** (summarize, retrieve, web, memory, classify, …), (6) optional **Google web search** (`GOOGLE_CSE_API_KEY` + `GOOGLE_CSE_CX`), (7) **short session control phrases** + **embedded prompt signals** in long chat (see **`prompt_signals:`** in the brain trace). First CPU start can take several minutes while weights download.
|
| 178 |
|
| 179 |
#### What it can do (summary)
|
| 180 |
|
|
|
|
| 184 |
| **Encoder** | Soft **topic hint** + trace line **`classify:…`**; **`/classify`** for full label probabilities. |
|
| 185 |
| **RAG** | Injects top FAQ **chunks**; tune strictness with phrases like *Strict FAQ* (see `/help`). |
|
| 186 |
| **Memory** | Long-term + session notes; **scope** isolation phrases for demos; export / forget from chat. |
|
| 187 |
+
| **Session controls** | Short phrases (no slash): scope, trace, FAQ/routing toggles, reply style — *Be brief*, *Strict FAQ*, *Start a new private session*, *Reset reply style*; full list via **`/help`**. |
|
| 188 |
+
| **Embedded signals (long chat)** | **40+** one-turn cues from wording: layout (pros/cons, tables, steps, bullets), code modes, decisions (`ranked_options`, `options_n=N`, checklist), diagrams, STAR/PREP/IRAC, risks/benefits order, revise draft, topic guardrails, language, tone, FAQ/web citation style, … — footer **`prompt_signals:`** when trace is on; step-by-step table **below**. |
|
| 189 |
| **Limits** | Small models can **hallucinate** or miss nuance; FAQ/web only **constrain** answers when relevant snippets exist. **Not multimodal** here. Shared default **memory scope** is not private auth. |
|
| 190 |
|
| 191 |
---
|
|
|
|
| 200 |
|
| 201 |
### Testing embedded prompt signals (this Space)
|
| 202 |
|
| 203 |
+
These behaviors apply when your line is handled as **normal chat** (not a short dedicated control like *Be brief*). The app scans your wording and adds **one-turn** system hints.
|
| 204 |
+
|
| 205 |
+
**How to test (two sends):**
|
| 206 |
+
1. Send **Show the brain trace** as its **own short line** (do **not** combine it with your question in one message).
|
| 207 |
+
2. Send your **long** test prompt as a **separate** message.
|
| 208 |
+
3. Scroll to the bottom of the assistant reply and look for **`prompt_signals:`** in the *Brain trace* footer (e.g. **`prompt_signals:stakeholder_map`**).
|
| 209 |
+
|
| 210 |
+
**If you only see** `classify:…` / `RAG:…` **without** `prompt_signals:…`, the live Space may be running an older build — redeploy via GitHub Actions **Deploy versioned space artifact to Hugging Face** after merging, then hard-refresh the Space.
|
| 211 |
|
| 212 |
| Goal | What to type (examples) | What to look for |
|
| 213 |
| --- | --- | --- |
|
| 214 |
| Comparison: pros/cons | In a **long** message, ask for **tradeoffs**, **pros and cons**, **compare X vs Y**, or **advantages and disadvantages** between concrete options (avoid mixing with **no pros and cons** / **flowing prose comparison** in the same line). | **`comparison_frame=pros_cons`** in **`prompt_signals:`**; reply should use **Pros** / **Cons** sections |
|
| 215 |
| Comparison: narrative prose | In a **long** comparison question, ask for **flowing prose**, **narrative comparison**, **prose comparison only**, or **no pros and cons sections** (avoid mixing with **pros and cons** / **tradeoffs** layout cues in the same line). | **`comparison_frame=narrative`** in **`prompt_signals:`**; reply should weave the comparison in continuous prose |
|
| 216 |
+
| Ranked options / priority order | In a **long** decision question naming **options, vendors, tools, or alternatives**, ask to **rank them**, **in order of priority**, **top 3 picks**, **best to worst**, or **which option first** (avoid mixing with **no ranking** / **order doesn’t matter** in the same line). | **`ranked_options`** in **`prompt_signals:`**; reply should order choices with clear 1-2-3 priority, not treat all as equal |
|
| 217 |
+
| Decision matrix (criteria × options) | In a **long** vendor/tool comparison, ask for a **decision matrix**, **comparison matrix**, **feature matrix**, **criteria as rows and options as columns**, or to **score each option against criteria** (avoid mixing with **no decision matrix** / **not a matrix** in the same line). | **`decision_matrix`** in **`prompt_signals:`**; reply should include a markdown table with criteria rows and option columns |
|
| 218 |
+
| Build vs buy (in-house vs vendor) | In a **long** technology decision, ask for a **build vs buy**, **make vs buy**, **build in-house vs vendor/SaaS**, or **custom build vs commercial** analysis (avoid mixing with **no build vs buy** / **skip build vs buy** in the same line). | **`build_vs_buy`** in **`prompt_signals:`**; reply should use **Build (in-house)** and **Buy (vendor/SaaS)** sections plus a short recommendation |
|
| 219 |
+
| One-pager (executive brief) | In a **long** leadership or steering-committee update, ask for a **one-pager**, **one-pager format**, **single-page brief**, or **one-page executive memo** with scannable sections (avoid mixing with **no one-pager** / **skip one-pager**; also avoid **BLUF** / **executive summary first** or **summary at the end** in the same line). | **`one_pager`** in **`prompt_signals:`**; reply should use **Title / Purpose**, **Context**, **Problem / Opportunity**, **Recommendation**, **Key points**, **Next steps**, **Risks / dependencies** |
|
| 220 |
+
| Action plan (owners & dates) | In a **long** rollout or program plan, ask for an **action plan**, **action plan format**, **who does what by when**, or **owners and due dates** for workstreams (avoid mixing with **no action plan** / **skip action plan**; use **checklist** row instead if you want `- [ ]` tick boxes). | **`action_plan`** in **`prompt_signals:`**; reply should use a table with **Action**, **Owner**, **Due / target date** (not checkbox checklists) |
|
| 221 |
+
| RACI matrix (role assignment) | In a **long** project or rollout plan, ask for a **RACI matrix**, **RACI chart**, or **Responsible / Accountable / Consulted / Informed** role table for tasks or workstreams (avoid mixing with **no RACI** / **skip RACI** in the same line). | **`raci`** in **`prompt_signals:`**; reply should include a table with **R**, **A**, **C**, **I** columns |
|
| 222 |
+
| Stakeholder map (influence & interest) | In a **long** change or rollout plan, ask for a **stakeholder map**, **stakeholder analysis**, **influence-interest matrix**, or **power-interest grid** for key groups (avoid mixing with **no stakeholder map** / **skip stakeholder analysis**; use **RACI** if you want task R/A/C/I roles). | **`stakeholder_map`** in **`prompt_signals:`**; reply should include a table with **Stakeholder**, **Interest**, **Influence**, **Key concerns**, **Engagement approach** |
|
| 223 |
+
| Fixed option count | In a **long** decision or brainstorming message, ask for **exactly three options**, **give me 5 alternatives**, **list four distinct approaches**, or **top 2 picks** only (avoid mixing two different counts like **3 options** and **5 options** in one line). | **`options_n=3`** (or another N) in **`prompt_signals:`**; reply should present exactly that many labeled options |
|
| 224 |
+
| Diagram / flowchart | In a **long** architecture or flow question, ask for a **Mermaid diagram**, **flowchart**, **sequence diagram**, or **ASCII diagram**. **Or** say **no diagrams**, **text only**, **without flowcharts**, **don't use Mermaid** (avoid mixing both in one line). | **`diagram`** or **`no_diagram`** in **`prompt_signals:`**; reply should include or omit a visual diagram block |
|
| 225 |
+
| Risks first vs benefits first | In a **long** plan, pitch, or rollout question, ask to **start with risks**, **downsides first**, **what could go wrong first**, or **cons before pros**. **Or** ask for **benefits first**, **upsides first**, **lead with the positives**, **pros before cons** (avoid mixing both in one line; distinct from **risk posture** safe vs pragmatic). | **`risks_first`** or **`benefits_first`** in **`prompt_signals:`**; reply should lead with downsides or upsides accordingly |
|
| 226 |
+
| Risks and mitigations (paired) | In a **long** rollout, security, or change plan, ask for **risks and mitigations**, a **risk register**, **mitigation for each risk**, or **paired risk-mitigation** bullets (avoid mixing with **risks only** / **skip mitigations** in the same line). | **`risks_mitigations`** in **`prompt_signals:`**; reply should pair each key risk with a concrete mitigation step |
|
| 227 |
+
| Revise / polish draft | In a **long** message that includes **your draft** (email, memo, Slack post, etc.), ask to **rewrite**, **polish**, **proofread**, or **make it more professional/concise**—paste the draft in the same line or label it **Draft:** / **here’s my draft** (avoid mixing with **don’t rewrite** / **keep my wording unchanged**). | **`revise_draft`** in **`prompt_signals:`**; reply should return an improved version of your text, not a generic essay |
|
| 228 |
+
| Email format (compose) | In a **long** message, ask to **write an email**, **draft an email to** someone, **compose a follow-up email**, or use **email format** with **Subject** and **Greeting** (avoid mixing with **no email format** / **not as an email**; use **Revise / polish draft** if you are polishing pasted copy). | **`email_format`** in **`prompt_signals:`**; reply should use **Subject:**, **Greeting**, body paragraphs, and **Sign-off** |
|
| 229 |
+
| Meeting agenda (timeboxed) | In a **long** sync or workshop prompt, ask for a **meeting agenda**, **agenda format**, **timeboxed agenda**, or **run-of-show** for an upcoming session (avoid mixing with **no meeting agenda** / **skip agenda format**; use **Action plan** if you want owner/due-date tables). | **`meeting_agenda`** in **`prompt_signals:`**; reply should use **Meeting title**, **Objective**, **Agenda** (timeboxed items), **Pre-reads**, **Decisions needed** |
|
| 230 |
+
| Revise with before/after diff | In a **long** revise message with your draft pasted, also ask for **before and after**, **show what changed**, **track changes**, **side by side**, or **diff format** (avoid mixing with **no diff** / **inline revision only**). | **`revise_diff`** in **`prompt_signals:`** (often with **`revise_draft`**); reply should label **Before** / **After** or mark edits clearly |
|
| 231 |
+
| Topic guardrails (omit subjects) | In a **long** question, say **don’t mention**, **avoid discussing**, **steer clear of**, or **no discussion of** a topic (e.g. pricing, competitors). Avoid mixing with **make sure to mention** / **must cover** mandatory topics in the same line. | **`topic_guard`** in **`prompt_signals:`**; reply should respect the omitted subjects |
|
| 232 |
+
| Required topics (must cover) | In a **long** question, say **make sure to mention**, **must cover**, **include a section on**, **don’t skip discussing**, or **address the topic of** specific subjects (e.g. security, SLA, migration). Avoid mixing with **don’t mention** / **avoid discussing** omit cues in the same line. | **`topic_must`** in **`prompt_signals:`**; reply should include each required topic with clear headings or bullets |
|
| 233 |
+
| Answer scaffold (STAR / PREP / IRAC) | In a **long** interview, case, or writing prompt, ask for **STAR format**, **PREP format**, or **IRAC format** (avoid naming two frameworks in one line). | **`frame_star`**, **`frame_prep`**, or **`frame_irac`** in **`prompt_signals:`**; reply should use that heading scaffold |
|
| 234 |
+
| SWOT analysis | In a **long** strategy or product question, ask for a **SWOT analysis**, **SWOT format**, or **strengths, weaknesses, opportunities, and threats** breakdown for one initiative (avoid mixing with **no SWOT** / **skip SWOT** in the same line). | **`swot`** in **`prompt_signals:`**; reply should use **Strengths**, **Weaknesses**, **Opportunities**, **Threats** headings |
|
| 235 |
+
| PESTLE analysis | In a **long** market-entry or policy question, ask for a **PESTLE analysis**, **PESTLE format**, or **political, economic, social, technological, legal, and environmental** factors (avoid mixing with **no PESTLE** / **skip PESTLE** in the same line). | **`pestle`** in **`prompt_signals:`**; reply should use **Political**, **Economic**, **Social**, **Technological**, **Legal**, **Environmental** headings |
|
| 236 |
+
| Cost-benefit analysis | In a **long** business-case or project question, ask for a **cost-benefit analysis**, **costs and benefits breakdown**, or to **weigh costs against benefits** (avoid mixing with **no cost-benefit** / **skip CBA** in the same line). | **`cost_benefit`** in **`prompt_signals:`**; reply should use **Costs**, **Benefits**, and a brief **Net assessment** |
|
| 237 |
+
| Open questions (TBD / unknowns) | In a **long** plan or memo, ask for an **open questions section**, **list what's still unknown**, **outstanding questions**, **TBD items**, or **information gaps** to flag (avoid mixing with **no open questions** / **skip the open questions section** in the same line). | **`open_questions`** in **`prompt_signals:`**; reply should end with an **Open questions** bullet list of unresolved unknowns—not stock “anything else?” closers |
|
| 238 |
+
| Best / base / worst case scenarios | In a **long** forecast or strategy question, ask for **best case, base case, and worst case**, a **scenario analysis**, or **optimistic / realistic / pessimistic** outcomes (avoid mixing with **no scenarios** / **skip scenario analysis** in the same line). | **`scenario_cases`** in **`prompt_signals:`**; reply should use **Best case**, **Base case**, **Worst case** headings with bullets under each |
|
| 239 |
+
| Length cap | End your question with **in under 80 words** or **at most 3 sentences**. | **`len_cap=80w`** or **`len_cap=3s`** in **`prompt_signals:`** (trace tag); the model should stay near that cap |
|
| 240 |
+
| Reply length (brief vs detailed) | In a **long** message, ask to **be brief**, **keep it short**, **concise replies**, **just the essentials**, etc. **Or** say **more detail**, **go deeper**, **explain thoroughly**, **comprehensive explanation** (avoid mixing both in one line; distinct from an exact **in under N words** cap). | **`verbosity=brief`** or **`verbosity=detailed`** in **`prompt_signals:`**; reply should stay short or go deeper accordingly |
|
| 241 |
| Code-only | Ask for a tiny snippet and add **code only, no explanation** (or **just the code**). | **`code_only`** in **`prompt_signals:`**; reply should be mostly a fenced code block |
|
| 242 |
+
| Code + explanation | In a **long** coding question, ask to **explain what the code does**, **walk me through the snippet**, **code with comments**, **show the code and explain each part**, or **not code only** (avoid mixing with **code only** / **just the code** in the same line). | **`code_explained`** in **`prompt_signals:`**; reply should include a fenced snippet **and** a concise walkthrough |
|
| 243 |
+
| Pseudocode vs runnable | In a **long** algorithm question, ask for **pseudocode**, **language-agnostic algorithm**, or **not runnable code**. **Or** ask for **runnable**, **executable**, **working code**, or **copy-paste code** (avoid mixing both in one line; also distinct from **code only** / **code explained**). | **`pseudocode`** or **`runnable_code`** in **`prompt_signals:`**; reply should stay abstract or be concrete executable code accordingly |
|
| 244 |
+
| Reply language | Ask for the answer **in spanish** (or another language) in the same line as your question. | **`language`** in **`prompt_signals:`** |
|
| 245 |
+
| Tables prefer vs avoid | In a **long** message, ask for a summary **in a markdown table**, **tabular format**, **rows and columns**, etc. **Or** say **no tables**, **avoid tables**, **without a table**, **no markdown tables** (avoid mixing both in one line). | **`table_style=prefer`** or **`table_style=avoid`** in **`prompt_signals:`**; reply should use or skip markdown tables accordingly |
|
| 246 |
| Numbered steps vs continuous prose | In a **long** how-to message, ask **step by step**, **walk me through**, **numbered steps**, or a **how to install/configure** style question. **Or** say **no numbered steps**, **continuous prose only**, **prose without steps**, **explain as connected paragraphs** (avoid mixing both in one line). | **`step_style=numbered`** or **`step_style=continuous`** in **`prompt_signals:`**; reply should use numbered steps or flowing prose accordingly |
|
| 247 |
| Bullets vs prose | In a **long** message, ask for **bullet points**, **use bullets**, **bulleted list**, **format as bullets**, etc. **Or** say **no bullets**, **plain paragraphs**, **prose only**, **avoid bullet lists** (avoid mixing both in one line). | **`reply_format=bullets`** or **`reply_format=prose`** in **`prompt_signals:`**; reply should list points or stay in paragraphs accordingly |
|
| 248 |
+
| Checklist (tick boxes) | In a **long** plan or rollout question, ask for a **checklist format**, **action-item checklist**, **tick-box list**, or **markdown checkboxes** (`- [ ]`). **Or** say **no checklist**, **not a checklist**, **don’t use checkboxes** (avoid mixing both in one line). | **`checklist`** or **`no_checklist`** in **`prompt_signals:`**; reply should use or avoid `- [ ]` task lines |
|
| 249 |
+
| Guided discovery (hints / Socratic) | Ask a **how / why** question and say you want **hints only** or **don’t give me the full solution yet** (keep the message substantive; avoid mixing with **give me the full solution** in the same line). | **`guided`** in **`prompt_signals:`**; first reply should skew toward questions and nudges |
|
| 250 |
+
| Full solution (not hints) | On a **how / why / solve** problem, ask to **give me the full solution**, **complete solution now**, **spell out the full solution**, or **I’m stuck—show the entire solution** (avoid mixing with **hints only** in the same line). | **`full_solution`** in **`prompt_signals:`**; reply should be a complete worked answer, not hint-only |
|
| 251 |
| Red-team / critique | In one paragraph, describe a **plan or design** and ask for a **red team**, **sanity check**, **what am I missing**, or **devil’s advocate** review (not a one-line control). | **`counterpoint_tone=challenge`** inside **`prompt_signals:`**; reply should stress-test assumptions |
|
| 252 |
| Supportive coaching | In one paragraph, describe a **plan, pitch, or idea** and ask to **be supportive**, **assume good intent**, **encourage my proposal**, **gentle feedback**, or **avoid harsh criticism** (not a one-line control; avoid mixing with red-team wording in the same line). | **`counterpoint_tone=supportive`** in **`prompt_signals:`**; reply should coach with constructive next steps, not harsh critique |
|
| 253 |
| Ephemeral / no memory | Say **off the record**, **don’t remember this**, **no memory for this**, or **don’t log this** in the same message as your question (demo: shared Space scopes are not true secrecy). | **`ephemeral`** in **`prompt_signals:`**; assistant should avoid pushing `/remember` for that content |
|
|
|
|
| 255 |
| Beginner / ELI5 in context | In a **longer** question (not a one-line control), ask for **ELI5**, **explain like I'm five**, **total beginner**, **lay audience**, **no technical background**, etc., plus a normal **what/why/how** ask. | **`audience=simple`** in **`prompt_signals:`**; reply should use plain language and minimal jargon |
|
| 256 |
| Technical / expert audience | In a **longer** question (not a one-line control), say you're a **technical audience**, **assume I'm technical**, want a **deep technical** or **internals-focused** explanation, **skip the basics**, **staff-engineer level**, etc., plus a normal **what/why/how** ask (avoid mixing with ELI5/beginner wording in the same line). | **`audience=technical`** in **`prompt_signals:`**; reply may use domain jargon and skip hand-holding |
|
| 257 |
| Formal vs casual register | Ask for a **board-ready** / **client-facing** / **formal memo** / **for regulators** write-up, **or** say you want a **Slack message**, **keep it casual**, **water cooler** tone (one dominant style per message). | **`register_tone=formal`** or **`register_tone=casual`** in **`prompt_signals:`** |
|
| 258 |
+
| JSON / structured output | In a **long** message, ask for **valid JSON**, **return JSON**, **as a JSON object**, **machine-readable JSON**, etc. (avoid mixing with **plain text only** / **no json** in the same line). | **`output_format=json`** in **`prompt_signals:`**; reply should be parseable JSON when practical |
|
| 259 |
+
| Plain text (no JSON) | In a **long** message, ask for **plain text only**, **no JSON**, **no structured output**, or **don’t return JSON** in the reply (avoid mixing with **return JSON** / **valid JSON** in the same line). | **`output_format=plain`** in **`prompt_signals:`**; reply should stay in normal prose, not a JSON blob |
|
| 260 |
| Strict facts / low speculation | In a **long** message, ask to **not guess**, **avoid hallucinations**, **only high confidence**, **stick to facts**, **if unsure say so**, etc. (avoid mixing with **brainstorm freely** in the same line). | **`speculation=strict`** in **`prompt_signals:`**; reply should label uncertainty clearly |
|
| 261 |
| Creative brainstorming | In a **long** message, ask to **brainstorm freely**, **speculate freely**, welcome **wild ideas**, do **blue-sky thinking**, or **explore hypotheticals** (avoid mixing with **don’t guess** / **stick to facts** in the same line). | **`speculation=creative`** in **`prompt_signals:`**; reply may propose speculative ideas with clear assumption labels |
|
| 262 |
| Summary / BLUF first | In a **long** message, ask to **TLDR first**, **lead with a one-line summary**, **bottom line up front**, **BLUF**, **executive summary first**, etc. (avoid mixing with **answer directly** / **skip the summary** in the same line). | **`answer_lead=tldr_first`** in **`prompt_signals:`**; reply should open with a short summary line |
|
| 263 |
+
| Recommendation first | In a **long** decision question, ask to **lead with your recommendation**, **recommendation first**, **state your recommendation upfront**, or **recommendation before the analysis** (avoid mixing with **recommendation at the end** / **no upfront recommendation** in the same line). | **`recommendation_first`** in **`prompt_signals:`**; reply should open with a clear **Recommendation** line, then rationale |
|
| 264 |
+
| Go / no-go gate verdict | In a **long** rollout or approval question, ask for a **go/no-go decision**, **gate review**, **proceed or halt** verdict, or an **explicit go or no-go recommendation** (avoid mixing with **no go/no-go** / **skip go-no-go section** in the same line). | **`go_no_go`** in **`prompt_signals:`**; reply should open with **Go**, **No-go**, or **Conditional go**, then criteria/conditions |
|
| 265 |
| Direct answer (no TL;DR) | In a **long** message, ask to **answer directly**, **skip the summary**, **no TL;DR**, **jump straight to the answer**, or **omit the opening summary** (avoid mixing with **BLUF** / **summary first** in the same line). | **`answer_lead=direct`** in **`prompt_signals:`**; reply should start in-flow without a standalone TL;DR prelude |
|
| 266 |
+
| Summary at end (closing recap) | In a **long** message, ask to **wrap up with a summary**, **TLDR at the bottom**, **executive summary at the end**, or **end with a brief recap** (avoid mixing with **summary first** / **BLUF** / **TLDR first** in the same line). | **`summary_last`** in **`prompt_signals:`**; reply should close with a short Summary / TL;DR line after the main body |
|
| 267 |
| Runnable commands | In a **long** message, ask for **curl one-liner**, **bash snippet**, **kubectl**, **copy-paste into terminal**, **docker run example**, etc. (avoid mixing with **conceptual only** / **no commands** in the same line). | **`actionability=commands`** in **`prompt_signals:`**; reply should include concrete commands where sensible |
|
| 268 |
| Conceptual only (no commands) | In a **long** message, ask for **conceptual only**, **high level only**, **no shell commands**, **focus on concepts and rationale**, or an **architecture overview without command dumps** (avoid mixing with **kubectl** / **copy-paste into terminal** in the same line). | **`actionability=conceptual`** in **`prompt_signals:`**; reply should avoid runnable command dumps |
|
| 269 |
| Assumptions / limitations | In a **long** message, ask to **state your assumptions**, **assumptions and limitations**, **caveats upfront**, **scope and assumptions**, **what we are assuming**, or to **flag key uncertainties** (say **skip assumptions** to opt out; avoid mixing with **be decisive** in the same line). | **`confidence_tone=transparent`** in **`prompt_signals:`**; reply should surface assumptions, limits, and uncertainty clearly |
|
| 270 |
| Decisive / confident tone | In a **long** message, ask to **be decisive**, **don’t hedge**, **give firm answers**, **sound confident**, or **avoid disclaimers** (avoid mixing with **state your assumptions** / **caveats upfront** in the same line). | **`confidence_tone=assertive`** in **`prompt_signals:`**; reply should be direct with minimal hedging |
|
| 271 |
| Concrete examples vs example-free | In a **long** message, ask for a **worked example**, **walk me through a toy example**, **illustrate with a concrete example**, **ground your answer in an example**, etc. **Or** ask to **skip examples**, **theory only**, **keep it abstract**, **example-free** (avoid mixing both in one line). | **`example_density=rich`** or **`example_density=sparse`** in **`prompt_signals:`**; reply should include or omit short illustrative examples accordingly |
|
| 272 |
| Explanation order | In a **long** message, ask to **define terms first**, **definitions before details**, **formal definitions upfront**, **terminology first**, etc. **Or** ask for **intuition before math**, **big picture first**, **motivation before the formal proof**, **start with the high-level sketch** (avoid asking for both orders in one line). | **`exposition_order=definitions_first`** or **`exposition_order=intuition_first`** in **`prompt_signals:`**; reply should lead with definitions or with intuition accordingly |
|
| 273 |
+
| Glossary (key terms & definitions) | In a **long** technical write-up, ask for a short **glossary** or **define key terms** so readers can follow jargon (avoid “definitions first” wording if you specifically want a separate glossary section). | **`glossary`** in **`prompt_signals:`**; reply should include a **Glossary** section with 3-8 terms and brief definitions |
|
| 274 |
+
| UK vs US spelling | In a **long** message, ask for **British English** / **UK spelling** (e.g. colour, organise) **or** **American English** / **US spelling** (e.g. color, organize). Avoid mixing both locales in one line. | **`spelling_uk`** or **`spelling_us`** in **`prompt_signals:`**; reply should use that spelling convention throughout |
|
| 275 |
+
| Chronological timeline | In a **long** history or incident question, ask for **chronological order**, **timeline format**, **what happened when**, or **earliest → latest** (oldest first). **Or** ask for **reverse chronological**, **newest first**, or **most recent event first** (avoid mixing both explicit orders in one line). | **`timeline_chron`** or **`timeline_reverse`** in **`prompt_signals:`**; reply should list dated/phased milestones in that time order |
|
| 276 |
+
| Blameless postmortem | In a **long** incident or outage write-up, ask for **postmortem format**, a **blameless postmortem**, or a **postmortem outline** with summary, impact, timeline, root cause, lessons learned, and action items (avoid mixing with **no postmortem format** / **skip postmortem** in the same line). | **`postmortem`** in **`prompt_signals:`**; reply should use standard postmortem section headings |
|
| 277 |
+
| 5 Whys root-cause analysis | In a **long** incident or defect question, ask for a **five whys**, **5 whys analysis**, **root cause using 5 whys**, or **ask why five times** (avoid mixing with **no five whys** / **skip the why chain** in the same line). | **`five_whys`** in **`prompt_signals:`**; reply should use **Problem statement**, **Why 1–5**, and **Root cause** |
|
| 278 |
+
| Fishbone / Ishikawa diagram | In a **long** quality or incident question, ask for a **fishbone diagram**, **Ishikawa analysis**, **cause-and-effect diagram**, or **fishbone format** with categorized causes (avoid mixing with **no fishbone** / **skip fishbone** in the same line). | **`fishbone`** in **`prompt_signals:`**; reply should use **Problem / Effect** plus category headings (People, Process, Technology, etc.) with sub-causes |
|
| 279 |
+
| Second vs third person voice | In a **long** how-to or doc draft, ask to **address the reader as you**, **use second person**, or **speak directly to me**. **Or** ask for **third person**, **impersonal tone**, or **avoid second person** / **don't use you throughout** (avoid mixing both in one line). | **`voice_second`** or **`voice_third`** in **`prompt_signals:`**; reply should use you/your or neutral third-person phrasing accordingly |
|
| 280 |
+
| FAQ Q&A pairs (Q: / A:) | In a **long** FAQ or support write-up, ask for **Q&A format**, **question and answer format**, **FAQ-style Q&A**, or **each question followed by an answer** with **Q:** / **A:** labels (avoid mixing with **not Q&A format** / **prose not Q&A** in the same line). | **`faq_qa`** in **`prompt_signals:`**; reply should use labeled question-and-answer pairs, not one essay block |
|
| 281 |
| Closing / follow-ups | In a **long** message, ask for **no questions at the end**, **don’t ask if I need anything else**, **finish crisply**, **skip the stock closer**, etc. **Or** ask to **suggest next steps**, **end with actionable next steps**, **what should we do next**, **offer ways to go deeper** (avoid mixing both in one line). | **`followup_close=minimal`** or **`followup_close=suggest`** in **`prompt_signals:`**; reply should omit or include a light optional follow-up line accordingly |
|
| 282 |
| Clarify-first vs answer-first | In a **long** message, ask to **ask clarifying questions before you answer**, **if anything is unclear ask me first**, **confirm my constraints before**, etc. **Or** say **no clarifying questions**, **answer without asking questions first**, **don’t interrogate me first**, **give your best answer without asking** (avoid mixing both in one line). | **`clarify_first=on`** or **`clarify_first=off`** in **`prompt_signals:`**; first reply should ask brief questions first or answer directly |
|
| 283 |
| Section headings vs flat | In a **long** message, ask to **use markdown headings**, **organize with headings**, **structure the answer with clear headings**, **h2 or h3 headings for each topic**, etc. **Or** ask for a **flat answer**, **no section headings**, **avoid markdown headings**, **continuous prose only** (avoid mixing both in one line). | **`section_headings=prefer`** or **`section_headings=avoid`** in **`prompt_signals:`**; reply should use or avoid `##` / `###` title lines accordingly |
|
|
|
|
| 288 |
| FAQ quote vs paraphrase | In a **long** message about **FAQ / policy / excerpt** text, ask to **quote the FAQ excerpts**, **include direct quotes from the policy**, **verbatim passages from the excerpt**, etc. **Or** say **paraphrase the FAQ**, **paraphrase only**, **don’t quote the excerpts**, **summarize the policy in your own words** (avoid mixing both in one line). | **`quote_style=quote`** or **`quote_style=paraphrase`** in **`prompt_signals:`**; reply should quote or paraphrase injected excerpts accordingly |
|
| 289 |
| Emoji in replies | In a **long** message, ask to **use a few tasteful emoji**, **include emoji when helpful**, **emoji are ok**, **sprinkle emoji**, etc. **Or** say **no emoji in your reply**, **avoid emoji**, **emoji-free tone**, **don’t use emoji** (avoid mixing both in one line). | **`emoji_style=include`** or **`emoji_style=avoid`** in **`prompt_signals:`**; reply may use sparse emoji or stay emoji-free accordingly |
|
| 290 |
| FAQ grounding (strict vs relaxed) | In a **long** message about **FAQ / policy / excerpt** retrieval, ask to **stick to the FAQ**, **only use the FAQ excerpts**, **if it’s not in the FAQ say so**, **strict FAQ grounding**, etc. **Or** say **FAQ plus general knowledge**, **mix the FAQ with general knowledge**, **supplement the excerpts with brief general context** (avoid mixing both in one line). | **`faq_grounding=strict`** or **`faq_grounding=relaxed`** in **`prompt_signals:`**; reply should stay FAQ-only or allow separated general context accordingly |
|
| 291 |
+
| Source links / citations | In a **long** message about **FAQ, policy, web, or research** context, ask to **cite your sources**, **include source links**, **attribute each claim**, or **show the sources you used**. **Or** say **no source links**, **don’t cite sources**, **without links or footnotes**, **answer without citing** (avoid mixing both in one line). | **`cite_sources`** or **`cite_minimal`** in **`prompt_signals:`**; reply should include or skip inline `[FAQ excerpt N]` / `[Web n]` style attribution |
|
| 292 |
| Math steps vs final only | In a **long** math-style question, ask to **show your work**, **walk through the derivation**, **prove it step by step**, **show intermediate steps**, etc. **Or** say **final answer only**, **no derivation**, **skip the steps**, **just the result** for the equation (avoid mixing both in one line). | **`math_detail=show_work`** or **`math_detail=final_only`** in **`prompt_signals:`**; reply should include or omit intermediate math steps accordingly |
|
| 293 |
| Code fences vs inline | In a **long** message that includes **code / commands / scripts**, ask for **fenced code blocks**, **markdown code fences**, **triple-backtick fences**, etc. **Or** say **inline code only**, **no triple backticks**, **no fenced code blocks**, **keep snippets inline** (avoid mixing both in one line). | **`code_block_style=fenced`** or **`code_block_style=inline`** in **`prompt_signals:`**; reply should use ``` fences or inline backticks accordingly |
|
| 294 |
|