-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
General lack of clarity about input/output/context languages #16
Comments
These solve the problem discussed in webmachinelearning/prompt-api#29 and #16. They provide a mechanism for web developers to tell the browser to download additional material to support additional languages, and for web developers to get early errors if they know they will be trying to use a language that isn't supported. It also clearly separates input, context, and output languages, with a requirement on how the output language is produced by default (match the input). This removes the languageAvailable() API, folding it into createOptionsAvailable(). Further work might remove the AISummarizerCapabilities object altogether, since now it's mostly a wrapper around the single createOptionsAvailable() method.
I assume that this would use the LLM and not the translate API to do the translation right? In this case, what is the difference between the rewriteAPI and the translateAPI if you can use the rewriteAPI simply for translation purposes? |
I agree this is confusing and unsatisfactory. One could argue that there's a difference between "rewriting" and "translating", similar to the difference between "summarizing" and "rewriting". But I'm not sure the argument is very solid. I think the more practical issue is just about expected language support in current implementations, and how that affects the combinations. Currently we'd expect:
Our current strategy is to signal this clearly via different API entrypoints: translate doesn't have any configurable options, for example, and You could imagine an alternate strategy where we try to fit everything into the rewriter API. This would have some sharp edges, though. For example:
Do we think it might be worth pursuing this road anyway? An alternate strategy would be to get rid of the
|
These solve the problem discussed in webmachinelearning/prompt-api#29 and #16. They provide a mechanism for web developers to tell the browser to download additional material to support additional languages, and for web developers to get early errors if they know they will be trying to use a language that isn't supported. It also clearly separates input, context, and output languages, with a requirement on how the output language is produced by default (match the input). This removes the languageAvailable() API, folding it into createOptionsAvailable(). Further work might remove the AISummarizerCapabilities object altogether, since now it's mostly a wrapper around the single createOptionsAvailable() method.
|
I don't think it's true that they will have identical implementation support checks. For example, in Chromium we have specific output languages we support because we've done sufficient safety-checking on responses in those languages. That set is a subset of the supported input languages. It's less clear that there might be cases where input and context language support differs. But, I'm thinking if you create a fine-tuning for summarizing Japanese, that doesn't necessarily mean you've fine-tuned for following Japanese instructions (i.e. context). And it seems simpler for web developers to have a 1:1 correspondence between text-valued options to the API, and corresponding
I thought about this, but was unsure how we'd implement it. I guess we would prompt the model with something like "output a mix of English or Japanese"? Or "you can output either English or Japanese as appropriate"? If you think this is implementable, then I'd be happy to update the API with it.
Do you mean, the error messages on the In general the web platform doesn't go very granular with its error names. But, if we have concrete cases where we expect developers to write different logic paths for different error cases, instead of generally bubbling up to some sort of "the API was not supported in your browser" error message, then we can definitely do this. |
Thanks for answering those qs; I hope we can chat more about design after the holidays (happy holidays!).
|
If you try to summarize Japanese text, should you expect a Japanese summary? Or an English summary?
What if you provide your
{ context }
or{ sharedContext }
in a third or fourth language?How do the answers to these questions interact with
summarizerCapabilities.languageAvailable()
? Currently it's only intended to give an answer for input language support.Should we allow web developers to specify the output language more tightly? If so, how could we guarantee the result---would we pass it through translation APIs behind the scenes? Or just fail if it's not supported, and let developers do the translation themselves?
The text was updated successfully, but these errors were encountered: