소스 정보
- 저장소
- microsoft/data-formulator
- 최근 소스 활동
- 2026년 5월 28일 08:19
- 감지된 SKILL.md 언어
- 영어
- 스타
- 17,043
- 포크
- 1,662
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/microsoft/data-formulator --skill language-injection명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | language-injection |
| description | LLM Agent 多语言注入规范。在修改 Agent 提示词、添加新的 Agent 端点、处理用户可见的后端消息(message_code)时使用。 |
Authoritative developer guide: docs/dev-guides/6-i18n-language-injection.md.
Prerequisites: Read
docs/dev-guides/6-i18n-language-injection.mdbefore changing Agent prompts, Agent routes, backend user-visible messages, or frontend i18n strings. If your work introduces new language injection patterns or conventions, update this file and related dev-guides accordingly.
Frontend i18n.language → Accept-Language header → get_language_instruction()
│
build_language_instruction()
(agents/agent_language.py)
│
┌────────────┴────────────┐
▼ ▼
mode="full" mode="compact"
(text-heavy agents) (code-gen agents)
| Module | Role |
|---|---|
agents/agent_language.py | build_language_instruction(lang, mode) — generates prompt fragments; inject_language_instruction() — injects into system prompts; supports 20 languages; returns "" for English |
routes/agents.py → get_language_instruction() | Reads Accept-Language header, delegates to build_language_instruction |
routes/agents.py → _get_ui_lang() | Extracts primary language code from Accept-Language header |
src/app/utils.tsx → fetchWithIdentity() | Sets Accept-Language header on every API request from i18n.language |
src/app/utils.tsx → translateBackend() | Translates backend message_code / content_code using frontend i18n |
# In a Flask route handler:
lang_instruction = get_language_instruction(mode="compact")
lang_suffix = f"\n\n{lang_instruction}" if lang_instruction else ""
messages = [
{"role": "system", "content": "You are a helpful assistant." + lang_suffix},
{"role": "user", "content": user_input},
]
from data_formulator.agents.agent_language import inject_language_instruction
# Simple append (most agents)
system_prompt = inject_language_instruction(system_prompt, language_instruction)
# Insert before a marker (complex prompts)
system_prompt = inject_language_instruction(
system_prompt, language_instruction,
marker="**About the execution environment:**"
)
For fixed strings in Python that appear in the UI, do NOT translate in Python.
Return a message_code and let the frontend translate:
# In an Agent or route handler:
yield {
"type": "error",
"message": "Output DataFrame is empty (0 rows).", # English fallback
"message_code": "agent.emptyDataframe", # frontend i18n key
}
# With parameters:
result = {
"status": "error",
"content": f"Fields not found: {missing}",
"content_code": "agent.fieldsNotFound",
"content_params": {"missing": missing, "available": available},
}
Frontend consumption:
import { translateBackend } from '../app/utils';
const msg = translateBackend(event.message, event.message_code, event.message_params);
Translation keys go in src/i18n/locales/{en,zh}/messages.json under messages.agent.*.
| Pattern | Why it's wrong |
|---|---|
os.environ.get("DF_DEFAULT_LANGUAGE") | Process-level — all users get same language; breaks multi-user |
| Global LLM client interceptor | Hidden behavior; can't distinguish full/compact mode; fragile string detection |
New MessageBuilder class | Duplicates agent_language.py; creates parallel conflicting abstractions |
Hardcoded "回答请使用中文" in prompts | Not configurable; skips the mode system; breaks for other languages |
Backend-side translation dict (agent_messages.py) | Forces adding every new language to Python; translations should all live in src/i18n/locales/ |
Hardcoded English UI strings in .tsx without t() | Not translatable; use useTranslation + t('key') |
LANGUAGE_DISPLAY_NAMES in agents/agent_language.py.LANGUAGE_EXTRA_RULES (e.g. simplified vs traditional Chinese).src/i18n/locales/<lang>/ — copy an existing locale folder as template.The analyst's built-in capabilities: data-inspection tools and the always-available actions (visualize and ask_user).
Discover connected data sources, add new data connectors through a user-confirmed form, inspect table metadata, and run bounded read-only probes when the current workspace data is insufficient.
Turn an exploration (threads, findings, charts) into a single Markdown report — note, blog post, executive summary, KPI dashboard, slide brief, or multi-section analytical report, with embedded charts.
SOC 직업 분류 기준