Skip to content

Extend AI Tutor Tester to get responses from LLMGuard - #60224

Merged
Erin007 merged 6 commits into
stagingfrom
eb-bulk-test-llm-gaurd
Aug 8, 2024
Merged

Extend AI Tutor Tester to get responses from LLMGuard#60224
Erin007 merged 6 commits into
stagingfrom
eb-bulk-test-llm-gaurd

Conversation

@Erin007

@Erin007 Erin007 commented Aug 6, 2024

Copy link
Copy Markdown
Contributor

CT-721

For internal testing of the chat safety layer, it will more efficient to get bulk responses back rather than test inputs 1 by 1. In this PR I extend the functionality of the AI Tutor Tester to conditionally be ably to hit the LLMGuard endpoint based on selection from a dropdown. The message safety check is currently hitting an EC2 instance that has been set up as an endpoint until we have a better long-term solution that will allow us to run Python alongside our Ruby code. This is a very lightweight, temporary solution to unblock testing of LLMGuard.

The uploaded csv should have one column studentInput and the aiResponse column will be set as "ok" if LLMGuard deems the input "safe", "toxic" if it catches toxic content and "error" if something in the process goes wrong.

llmguard_example.mov

@Erin007
Erin007 requested a review from tshaffercodeorg August 6, 2024 15:39
@Erin007
Erin007 requested a review from snickell August 7, 2024 18:01
@Erin007 Erin007 changed the title WIP to bulk test LLM guard Extend AI Tutor tester to get responses from LLMGuard Aug 7, 2024
@Erin007 Erin007 changed the title Extend AI Tutor tester to get responses from LLMGuard Extend AI Tutor Tester to get responses from LLMGuard Aug 7, 2024
@Erin007
Erin007 marked this pull request as ready for review August 8, 2024 13:38
@Erin007

Erin007 commented Aug 8, 2024

Copy link
Copy Markdown
Contributor Author

@snickell snickell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming we do the followup work (e.g. #60221) and pull the EC2 instance out of the loop, I'm game to merge this now so @samantha-code can test.

@Erin007
Erin007 merged commit b43c253 into staging Aug 8, 2024
@Erin007
Erin007 deleted the eb-bulk-test-llm-gaurd branch August 8, 2024 19:30
@Erin007

Erin007 commented Aug 8, 2024

Copy link
Copy Markdown
Contributor Author

@samantha-code merged ✅

@Erin007 Erin007 mentioned this pull request Aug 9, 2024
8 tasks
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

Successfully merging this pull request may close these issues.

2 participants