{"repo":"thoughtbot/top_secret","free":true,"listed":false,"github":"https://github.com/thoughtbot/top_secret","clone":"git clone https://github.com/thoughtbot/top_secret.git","description":"Filter sensitive information from free text before sending it to external services or APIs, such as chatbots and LLMs.","language":"Ruby","stars":414,"topics":["ner","redaction","ruby","pii-detection","anonymization","data-anonymization","data-obfuscation","data-privacy","data-redaction","named-entity-recognition"],"license":"MIT","category":"ai-agents","readme_excerpt":"Top Secret Filter sensitive information from free text before sending it to external services or APIs, such as chatbots and LLMs. By default it filters the following: - Credit cards - Emails - Phone numbers - Social security numbers - People's names - Locations However, you can add your own custom filters. [!TIP] Using [RubyLLM][]? Check out [ruby llm-top secret][] for seamless integration that automatically filters sensitive information from your prompts before sending them to LLMs. Installation Install the gem and add to the application's Gemfile by executing: If bundler is not being used to manage dependencies, install the gem by executing: [!IMPORTANT] Top Secret depends on [MITIE Ruby][], which depends on [MITIE][]. You'll need to download and extract [ner model.dat][] first. [!TIP] Due to its large size, you'll likely want to avoid committing [ner model.dat][] into version control. See the Production section for details on using [Trove][] to deploy the model file. Alternatively, you can disable NER filtering entirely by setting model path to nil if you only need regex-based filters (credit cards, emails, phone numbers, SSNs). This improves performance and eliminates the model file dependency. By default, Top Secret assumes the file will live at the root of your project, but this can be configured. Default Filters Top Secret ships with a set of filters to detect and redact the most common types of sensitive information. You can override, disable, or add to this list as n","default_branch":null,"files":null,"tree":[],"storefront":"/r/thoughtbot","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thoughtbot/top_secret/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}