AGENT SKILL

experimental-chat-popup

Use and maintain vizro-experimental chat model and floating popup, preserving optional LLM dependencies and security boundaries.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
experimental-chat-popup
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use and maintain vizro-experimental chat model and floating popup, preserving optional LLM dependencies and security boundaries.
disable-model-invocation
true

03 SKILL.md 正文

Experimental Chat Popup

Use this sub-skill when the task involves vizro-experimental, the Chat model, floating chat popup, dashboard-agent helper, chat security, or experimental chat examples/docs.

Route elsewhere when the task is mainly about:

  • Stable Vizro core dashboard layout/components: ../core-dashboard-build/SKILL.md and ../core-components-data-actions/SKILL.md.
  • Vizro-MCP agent workflows: ../mcp-agent-workflows/SKILL.md.

Experimental caveat

vizro-experimental is an incubation package. APIs may change, be removed, or graduate into vizro-core. Say this when giving user-facing guidance.

Chat model

from vizro_experimental.chat.models.chat import Chat

chat = Chat(
    id="assistant",
    placeholder="Ask a question about this dashboard",
    file_upload=False,
    example_questions=["What changed this month?"],
)

Live signature in the verified snapshot:

Chat(*, id=<factory>, type='chat', actions=[], placeholder='How can I help you?', file_upload=False, example_questions=[])

Floating popup

The popup package uses lazy exports:

from vizro_experimental.chat.popup import add_chat_popup

add_chat_popup(
    generate_response=lambda messages, **kwargs: "Local deterministic response",
    title="Analytics Assistant",
    streaming=False,
)

Available lazy exports:

  • add_chat_popup
  • create_dashboard_agent
  • make_generate_response

There is no Popup class exported from vizro_experimental.chat.popup in this snapshot.

Optional dependency boundary

Preserve the BYO callback boundary:

  • Users who pass generate_response should not need dashboard-agent provider dependencies.
  • Do not promote dashboard-agent/pydantic-ai imports to module scope if that would break BYO mode.
  • Only load create_dashboard_agent/make_generate_response when the user explicitly requests agent-backed behavior.

Security defaults

  • Treat chat input and uploaded file content as untrusted.
  • Do not leak API keys or environment variables into chat responses or logs.
  • Avoid executing user-provided code from chat messages.
  • Prefer deterministic/mocked generate_response in tests.
  • Require explicit provider credentials and network/cost authorization before live LLM calls.

Repository tests

From vizro-experimental/:

hatch run test-unit tests/unit/test_component.py tests/unit/test_security.py tests/unit/popup/test_popup.py

Browser integration tests under tests/integration/browser/ require a browser backend; do not make them required on a host without Chrome/Chromium.

Debug checklist

  • Is the task using stable core features or truly experimental chat APIs?
  • Is the user using Chat as a model component or adding the floating popup to an already built Vizro app?
  • Is generate_response provided? If yes, keep provider dependencies out of the path.
  • If using dashboard-agent helpers, are credentials/model/provider settings available and authorized?
  • Are tests using mocked local responses rather than live LLM calls?

Evidence anchors

  • vizro-experimental/src/vizro_experimental/chat/models/chat.py
  • vizro-experimental/src/vizro_experimental/chat/popup/__init__.py
  • vizro-experimental/src/vizro_experimental/chat/popup/popup.py
  • vizro-experimental/src/vizro_experimental/chat/popup/dashboard_agent.py
  • vizro-experimental/docs/pages/chat/{chat-component,api-reference}.md
  • vizro-experimental/examples/chat_component/app.py
  • vizro-experimental/tests/unit/{test_component,test_security}.py
  • vizro-experimental/tests/unit/popup/test_popup.py

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351