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

Equalify LLM API #296

Closed
bbertucc opened this issue Mar 13, 2024 · 2 comments
Closed

Equalify LLM API #296

bbertucc opened this issue Mar 13, 2024 · 2 comments
Assignees
Labels
bountied https://bbertucc.notion.site/Bug-Bounties-37cb0c61fb2d4bb984a78cc6e4b4aa56

Comments

@bbertucc
Copy link
Member

bbertucc commented Mar 13, 2024

Summary:

@heythisischris will develop a REST API endpoint which suggests "fixes" to developers looking to complete accessibility action items identified by Equalify. It will served via an AWS Lambda running Node.js. The LLM will either be OpenAI GPT-4 or Anthropic Claude 3 (provided via AWS Bedrock).

Implementation Plan:

  1. Set up a Node.js Lambda environment, setup CI/CD: @heythisischris will create a simple TypeScript Lambda function with a build script that deploys the zip bundle directly to the AWS environment using the AWS CLI. @heythisischris will also setup CI/CD using GitHub Actions.
  2. Enable Lambda Function URL: This will allow public access to the Lambda and help with testing.
  3. Connect OpenAI and/or Anthropic Claude: @heythisischris will obtain access to an LLM and integrate to the Lambda function.
  4. Study WGAC and begin sketching schema: I will look at commonly identified actions and attempt to create strictly typed actions in JSON format to feed whatever LLM we decide to proceed with. The idea is to emulate a fine-tuned model by feeding a large amount of strictly-typed accessibility context.
  5. Define test cases, test API: I will begin testing the newly created LLM API with test cases to make sure accessibility suggestions look decent. I will also begin recording/reporting results and how accurate/helpful the suggestions are.
  6. Begin testing with Equalify frontend: I will connect the Equalify frontend with the new LLM API URL and attempt
  7. Ask for feedback from the community: I will ask for validation and feedback from the community.

Rough draft schema

The endpoint will be "https://llm.equalify.com". it will only accept POST requests with the following JSON Body data:

{
"ActionId": "a0c5fcb1-0996-45ed-b19b-37195d06c21b",
"Time": "2024-03-13T03:00:00.000Z",
"Source": "Little Forest",
"URL": "https://edupack.dev/sponsors/",
"Type": "Error",
"Message": "```<title>...</title>```\nCheck that the title element describes the document",
"SuggestionId": null
}

The request must be signed with an Auth0 JWT Token set in the header as such:

{
"Authorization": "Bearer eyJraWQiOiIxMU1acVRwRlQ2c1pONWtTd0taSGhRVFk3Q1JWVVpQVkJqRG95U3lRVExrPSIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiIyMTNiNzVkMC02MGYxLTcwNDktM2RlNC00NDRmMWY5ZGZjMjYiLCJ3ZWJzaX"
}

The response will be a JSON Body with the following format:

{
"ActionId": "a0c5fcb1-0996-45ed-b19b-37195d06c21b",
"SuggestionId": "1f5c0c9f-ee33-4bdb-84e5-ea53caa4a5ba",
"Time": "2024-03-13T04:00:00.000Z",
"Title": "You could rename the title attribute to \"EduPack Sponsors\"",
"Code": "<title>EduPack Sponsors</title>",
"Position": [12,48],
"Completed": false
}

We can store suggestions in a new MySQL table for future reference.

Obviously, this is a very simple sample response, but I intend on having much more complex answers and functionality as I develop- this is simply a starting point.

Budget

The proposed budget for this issue is $3,500. It should take no longer than 1 month to fully develop, deploy, test, and release. This budget was approved by @bbertucc as part of #278.

@bbertucc bbertucc added the bountied https://bbertucc.notion.site/Bug-Bounties-37cb0c61fb2d4bb984a78cc6e4b4aa56 label Mar 13, 2024
@alexstine
Copy link

Since this is only a suggestions API built on Lambda, it should be fine. Can take advantage hopefully of Node.js async responses. Lambdas do have 16 minute max timeouts I think and max memory limits so need to make this a data router essentially, not a data processor.

@bbertucc
Copy link
Member Author

Moved this to an issue with a repo of it's own: #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bountied https://bbertucc.notion.site/Bug-Bounties-37cb0c61fb2d4bb984a78cc6e4b4aa56
Projects
None yet
Development

No branches or pull requests

3 participants