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

Redact Markdown Plugin #10

Open
amcdnl opened this issue Jul 31, 2024 · 0 comments
Open

Redact Markdown Plugin #10

amcdnl opened this issue Jul 31, 2024 · 0 comments
Labels

Comments

@amcdnl
Copy link
Member

amcdnl commented Jul 31, 2024

Requirements

Users commonly paste sensitive data in LLM UIs. It would be fantastic to have the ability to mask this data in the UI prompt / response renderer.

Technical

Under the hood, it uses Markdown renderers that support remark and rehpye plugins. Leverage remark plugins and you should be able to copy code similar to the CVE Plugin to do the matches.

When it finds a match, it should replace the match with the redact component: https://reablocks.dev/docs/components/data/redact

API

interface RedactMatcher {
   name: string; // e.g. SSN or Credit card
   matcher: (string) => boolean;
}

export const redactPlugin(matchers: RedactMatcher) {}

Outcome

  • remark plugin that allows developers to pass function matchers
  • some basic implementation of common matchers like bitcoin, ssn, credit card
  • a storybook story exhibiting the plugin
@amcdnl amcdnl added enhancement New feature or request demo and removed enhancement New feature or request labels Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant