Skip to content

holistic-ai/take-home-test

Repository files navigation

Getting Started

AWS

You should have been sent a link to login to an AWS account. Create an IAM user on this account with "AdministratorAccess" and configure the AWS CLI on your local machine to access it by creating an access key and secret key. If you already have the AWS CLI configured for another AWS account you can add these credentials to a new profile. See https://docs.aws.amazon.com/cli/ for information about the AWS CLI.

Stack

The example application uses the following resources.

  • An Aurora PostgreSQL database, and drizzle ORM to connect to it.
  • An S3 Bucket.
  • A remix application.
  • An api with an endpoint to run migrations.

It uses serverless stack to manage the infrastructure see https://sst.dev/ and https://docs.sst.dev/start/remix

Folder structure

  • /drizzle -> configuration for drizzle orm
  • /drizzle/migrations -> migrations folder, these are created by running pnpm migrate
  • /functions -> lambda functions
  • /app -> the remix application
  • /models -> drizzle schema files
  • /scripts -> python NLP scripts
  • /stacks -> serverless stack infrastructure definitions
  • /example_documents -> example pdf files to use for testing

Getting started

  1. Clone the repo
  2. Install the dependencies using pnpm i
  3. Deploy the infrastructure using pnpm sst:dev. Note that it will be deployed to the us-east-1 region. This requires you to create an IAM user on the AWS account and configure the CLI to access it (see section AWS above).
  4. Call the migrations endpoint to run the migrations on the database. The api url is printed to the console after you run pnpm sst:dev in the previous step. The migrations are run by doing a GET request at the /migrations endpoint. e.g. open https://xwyoqxra1m.execute-api.us-east-1.amazonaws.com/migrate in a browser
  5. Start the remix app by running pnpm dev and view it on localhost:3000

Instructions

The application allows users to create projects on the /create route in the remix app. Users need to upload a pdf and write a summary about the project. The data scientists in your team have written a script which can automate generating the summary using the pszemraj/pegasus-x-large-book-summary model which they found on hugging face.

1. Automate summary generation

Modify the application so that a user only needs to fill in the project name and upload the file. The summary should get autogenerated by running the script provided.

You can use the sample pdf files in the example_documents folder for testing.

NOTE: its ok to execute the script in a lambda. Although this won't work in production it works when developing locally on your machine.

see https://d311ynoxc2sp8.cloudfront.net/ for an example of how this should work.

2. Implement a details route

The "Name" on the projects table links to /project/<project_id> however this route hasn't been implemented. Add route to display the details of the project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published