Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

Feature/feedback capture - #317

Open
Dedulus wants to merge 5 commits into
protectai:mainfrom
Dedulus:feature/feedback-capture
Open

Dedulus wants to merge 5 commits into
protectai:mainfrom
Dedulus:feature/feedback-capture

Conversation

@Dedulus

@Dedulus Dedulus commented Jan 6, 2026 •

Copy link
Copy Markdown

Change Description

This PR adds an optional, privacy first feedback extension to llm guard that allows users to record false positives and false negatives from scanner results.

The implementation is fully additive and opt-in, and does not modify any existing scanning logic or APIs.

Key characteristics

  • Privacy first feedback data models (no raw text stored by default)
  • Feedback collector with minimal pluggable storage backends:
    • In-memory (default)
    • Local JSON file
  • Thin, explicit wrapper functions for opt-in integration with:
    • scan_prompt
    • scan_output
  • Zero behavior change when the feature is unused
  • No network calls, background processing, or side effects in core scanning

The feature is implemented as an isolated extension under llm_guard.feedback.


Issue reference

This PR does not directly fix an existing issue.
It introduces an optional extension intended to help users provide structured feedback on scanner decisions.

(If helpful, I’m happy to link this to a new issue or discussion.)


Checklist

  • I have reviewed the contribution guidelines
  • My code includes unit tests
  • All unit tests and lint checks pass locally
  • My PR contains documentation updates / additions if required

Documentation and examples were intentionally deferred to keep this PR focused on code and tests.
I’m happy to add user facing docs or examples in a follow up PR if this approach seems acceptable.

@Dedulus

Dedulus commented Jan 6, 2026

Copy link
Copy Markdown
Author

Just to note for reviewers: the final cleanup commit
(fix: finalize feedback feature with strict typing and clean CI)
was made proactively before review, after running the full pre commit
and CI checks locally.

No functional behavior changed . This was limited to typing strictness,
test cleanup, and CI hygiene. The implementation itself remains unchanged.

Happy to adjust anything further if needed.

This branch has not been deployed

No deployments
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant