Replies: 1 comment
-
|
Love this proposal @cosarah! this would make multilingual content generation much more flexible, since we would no longer need to add new languages through separate code changes. Users could either specify the desired language(s) directly in the prompt, or let the LLM infer it from context. On timing, language inference before outline generation makes more sense, so the outline itself already follows the intended language pattern. That seems more stable. Merging it into the outline step saves an LLM call, but might risk overloading that step probably worth keeping separate initially. One thought on the review surface: if outline review ever lands, exposing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem / 问题
The current course language system uses a single
languagefield (zh-CNoren-US) that forces all generated content into one language. This is limiting for many real-world scenarios:当前课程语言系统用单一的
language字段(zh-CN或en-US)强制所有生成内容使用同一种语言。这在很多实际场景中存在局限:Proposed design / 设计构想
Core idea
Replace the single enum with a natural-language directive inferred by the LLM from user input and uploaded documents.
用自然语言指令替代枚举值,由 LLM 从用户输入和上传文档中推断。
Language dimensions / 语言维度
Language requirements are multi-dimensional:
语言需求是多维的:
Examples / 示例
"从零学 Python""Explain quantum computing""用中文讲解这篇论文"+ English PDF"英語でPythonを教えてください""帮我准备一堂英语课,初中水平"Data flow / 数据流
Key design decisions / 关键决策
1. User can review and edit the directive / 用户可查看和编辑
LLM inference isn't 100% accurate. Show the inferred directive before generation and let the user edit it (similar to "Advanced Settings").
LLM 推断不是 100% 准确。在生成前展示推断结果,用户可编辑确认。
2. Backward compatibility / 向后兼容
stage.languageis already stored in user's local DB. AddlanguageDirectiveas a new field; old classrooms fall back tolanguage.stage.language已存储在用户本地数据库。languageDirective作为新字段,旧课堂继续用language。3. Manual selection as shortcut / 手动选择作为快捷方式
Keep manual language picker for quick creation. When used, generate a simple directive directly without LLM inference.
保留手动语言选择作为快捷方式。选择后直接生成简单指令,跳过 LLM 推断。
4. Eliminate hardcoded language branches / 消除硬编码语言分支
Currently there are 15+
=== 'zh-CN'checks across the codebase for prompt text. With a natural language directive injected into prompts, most of these can be removed — the LLM decides based on the directive.当前代码中有 15+ 处
=== 'zh-CN'硬编码判断。自然语言指令注入 prompt 后,大部分可以删除 — 让 LLM 根据指令自行决定。Trade-offs / 权衡
language: 'zh-CN'languageDirective: stringSuggested issue breakdown / 建议的 Issue 拆分
See comment below for individual issues.
Feedback welcome! This is a significant architectural change, so I'd like to hear thoughts on the approach before implementation.
欢迎反馈!这是一个重要的架构变更,希望在实现之前听到大家的想法。
Beta Was this translation helpful? Give feedback.
All reactions