Skip to content
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

AIRewriterFormat "as-is" seems ambiguous. #25

Open
bradtriebwasser opened this issue Dec 10, 2024 · 1 comment
Open

AIRewriterFormat "as-is" seems ambiguous. #25

bradtriebwasser opened this issue Dec 10, 2024 · 1 comment

Comments

@bradtriebwasser
Copy link

"as-is" seems a bit ambiguous. There are likely a large variety of formats we don't support, but as-is implies that the LLM will generate basically any format that the developer desires.

Consider the following example:

const textContent = '{ description: "Some long piece of text embedded in json."}';
const result = await rewriter.rewrite(textContent, {
  context: "Avoid any toxic language and be as constructive as possible.",
  format: "as-is"
});

In the above example, I provide a json string to the rewrite function and "as-is" implies that the LLM would return a JSON format since that is what I inputed but in reality, the LLM not might do that. It seems like "as-is" should be renamed something like "undefined" since there is an unlimited number of input formats that would break "as-is" format.

@domenic
Copy link
Collaborator

domenic commented Dec 11, 2024

Hmm. I think it should be possible to instruct the LLM (either via prompt engineering or via fine-tuning) to please produce output in the same format as the input?

I agree that any format guidance is fallible, but I'm not sure this particular format guidance is worse than the other ones.

If the LLM is unable to reproduce the input format, then it would be better if it failed, instead of producing something incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants