Chuyển đến nội dung
Skillpedia
Prompt và LLM81k · #1689

chat-format

Skill này làm gì

Skill này chuyển một danh sách tin nhắn chat thành đúng định dạng văn bản mà một mô hình AI cục bộ cần. Skill dành cho người chạy mô hình AI trên máy tính của mình và cần prompt được định dạng đúng.

Khi nào nên dùng

  • ✓Khi bạn chạy một mô hình cục bộ và cần prompt ở dạng template của nó.
  • ✓Khi bạn muốn một bộ định tuyến nhỏ chuyển câu hỏi đến một trong vài ý định đã đặt tên.
  • ✓Khi bạn chuẩn bị prompt cho llama.cpp, Ollama hoặc một runtime cục bộ tương tự.

Liên kết skill

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ruvllm/skills/chat-format/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-ruvllm/skills/chat-format/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy định dạng đoạn chat này thành prompt cho mô hình llama3 cục bộ của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill nhận các tin nhắn và tên template, rồi trả về văn bản đã định dạng. Skill không gọi mô hình nào. Bộ định tuyến tùy chọn chỉ giữ một số ít mẫu và được dùng để chọn giữa các ý định.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Chat Format

Format prompts for multi-provider LLM inference with context retrieval.

When to use

When you need a prompt string in a local model's chat template (for llama.cpp, Ollama or another local runtime), or a small embedding-based router over a handful of patterns. It does not call a model and it does not format for hosted APIs: Anthropic, OpenAI and Gemini take structured messages, not a template string.

Steps

  1. Format chat — call mcp__plugin_ruflo-core_ruflo__ruvllm_chat_format with messages ([{role, content}]) and template: one of llama3, mistral, chatml, phi, gemma, or a model id to auto-detect. Both fields are required. It returns the formatted string. It needs @ruvector/ruvllm-wasm (npm i -g @ruvector/ruvllm-wasm); without it the call fails with an install hint.
  2. Create a router (optional) — ruvllm_hnsw_create with dimensions (for example 384), maxPatterns, efSearch. The WASM router holds about 11 patterns at most (ruvllm-wasm v2.0.1), so use it for routing between a few named intents, not for document retrieval. For real document search use memory_search or the ruflo-rag-memory plugin.
  3. Add patterns — ruvllm_hnsw_add with routerId, a name, and an embedding whose length equals the router's dimensions (you produce the embedding, for example with embeddings_generate).
  4. Route a query — ruvllm_hnsw_route with routerId, the query embedding, and k (default 3).
  5. Check status — ruvllm_status shows whether the WASM module loaded. Routers live in the MCP server process only; they are gone when it restarts.
Câu hỏi thường gặp

Skill có làm việc với các API AI lưu trữ không?

Không. Nguồn nói các API lưu trữ nhận tin nhắn có cấu trúc, không nhận chuỗi template.

Bộ định tuyến giữ được bao nhiêu mẫu?

Tối đa khoảng mười một, nên nó phù hợp để định tuyến giữa vài ý định hơn là tìm kiếm tài liệu.

Tôi cần cài gì?

Một gói tiện ích WASM nhỏ, skill sẽ yêu cầu cài nếu thiếu.

Chi tiết

Mô tả gốc của tác giả

Format chat messages in a local model's template (llama3, mistral, chatml, phi, gemma, or a model id) and route queries over a small WASM HNSW pattern index (about 11 patterns). Use when preparing prompts for local runtimes.

repo: ruvnet/ruflo

Độ phổ biến

Sao GitHub
81k
Vị trí xếp hạng
#1689
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự