Giter Club home page Giter Club logo

awslabs / generative-ai-cdk-constructs Goto Github PK

View Code? Open in Web Editor NEW
264.0 13.0 29.0 20.61 MB

AWS Generative AI CDK Constructs are sample implementations of AWS CDK for common generative AI patterns.

Home Page: https://awslabs.github.io/generative-ai-cdk-constructs/

License: Apache License 2.0

TypeScript 71.25% JavaScript 1.04% Dockerfile 0.95% Python 25.46% Shell 0.01% MDX 0.91% CSS 0.39%
aws-cdk generative-ai aws langchain retrieval-augmented-generation llm question-answering-system sagemaker summarization amazon-bedrock appsync huggingface opensearch step-functions agent content-generation knowledge-base

generative-ai-cdk-constructs's People

Contributors

amazon-auto avatar anitalewis avatar dependabot[bot] avatar dineshsajwan avatar emerging-tech-cdk-constructs-bot avatar hvital avatar jl4nz avatar jstrunk avatar justintlewis avatar krokoko avatar laithalsaadoon avatar martinezedgar avatar maxtybar avatar michaelwalker-git avatar oconpa avatar saikatak avatar scottschreckengaust avatar spugachev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generative-ai-cdk-constructs's Issues

(New construct): Image generation

Describe the feature

Build a construct for image generation using Amazon Bedrock's Stable Diffusion XL
Backend only, a sample solution with a UI can then be built

Use Case

Expanding catalog

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Monthly issue metrics report

Issue Metrics

Metric Average Median 90th percentile
Time to first response 18:10:20 3:26:43 1 day, 20:11:14
Time to close 1 day, 13:51:26 19:11:47 2 days, 19:16:34
Time to answer None None None
Metric Count
Number of items that remain open 1
Number of items closed 53
Total number of items created 54
Title URL Author Time to first response Time to close Time to answer
feat(github): automate model generation #238 krokoko 0:50:59 None None
chore(deps): upgrade dependencies #237 emerging-tech-cdk-constructs-bot 15:08:49 19:11:51 None
chore(deps): upgrade dependencies #234 emerging-tech-cdk-constructs-bot 14:22:33 17:28:04 None
feat(bedrock): agent action groups #233 jstrunk 15:19:11 18:16:09 None
fix(bedrock): fix addAlias props #232 jstrunk 21:15:33 1 day, 1:18:54 None
feat(bedrock): method to add deps to PrepareAgent #231 jstrunk 0:47:59 20:06:23 None
chore(deps): update jsii to version 5.3 #228 krokoko 0:14:16 2 days, 18:57:58 None
fix(lambda layer): fix wrong path preventing deployment #227 krokoko 0:25:12 0:38:10 None
chore(deps): upgrade dependencies #226 hvital 0:34:54 19:11:43 None
chore(bedrock): fix custom resource license header #223 jstrunk 1 day, 20:05:06 1 day, 20:15:14 None
fix: update aoss resources #222 hvital 2 days, 9:01:09 2 days, 9:03:23 None
chore(deps): upgrade dependencies #221 emerging-tech-cdk-constructs-bot 5:36:20 2 days, 14:44:07 None
chore(doc): Update README.md #219 krokoko 0:44:58 2:26:49 None
fix(models): fix issue for python to synth Jumpstart and HuggingFace models constructs #218 krokoko 4:28:43 6:53:29 None
chore(deps): upgrade dependencies #217 emerging-tech-cdk-constructs-bot 1:28:23 15:27:44 None
feat: Layer Types and Additional Packages #216 oconpa 0:11:26 0:29:07 None
chore(patterns): Add Python snippets to constructs' patterns README files #214 martinezedgar 20:01:30 2 days, 17:55:30 None
fix(documentation): use enum for responseGenerationMethod in example #213 scottschreckengaust 0:18:56 15:31:05 None
feat: implement opensearch serverless support #212 hvital 18:28:16 20:34:12 None
fix: update cdk lib to 2.116.0 #211 scottschreckengaust 9:59:34 11:35:01 None
chore(deps): upgrade dependencies #210 emerging-tech-cdk-constructs-bot 1:00:47 1 day, 19:11:14 None
chore(deps): upgrade dependencies #209 emerging-tech-cdk-constructs-bot None None None
feat(sg models): expose vpc config prop #208 krokoko 1:04:22 1:36:50 None
feat: bedrock agent custom resources and constructs #207 jstrunk 2:24:43 7 days, 4:07:31 None
feat: model adaptor suggestion (library distinction) #206 oconpa 6 days, 20:51:48 None None
feat(layer): use local host to install requirements #205 oconpa 3 days, 17:04:45 4 days, 19:30:56 None
chore(deps): upgrade dependencies #204 emerging-tech-cdk-constructs-bot 1 day, 4:31:46 None None
fix: update lambdaMemorySizeLimiter title and comments #203 scottschreckengaust 1:18:19 1 day, 5:04:01 None
chore(deps): upgrade dependencies #202 emerging-tech-cdk-constructs-bot 1:58:20 17:19:45 None
chore(deps): upgrade dependencies #201 emerging-tech-cdk-constructs-bot 4:52:03 18:11:24 None
feat: layer type, model rename, additional packages #200 oconpa 9 days, 4:05:16 None None
feat(layer): use local host to install requirements #199 oconpa None None None
feat(claudeup): upgrade claude to use 2.1 #198 oconpa 1:23:41 8 days, 5:41:03 None
chore(deps): upgrade dependencies #197 emerging-tech-cdk-constructs-bot 17:46:48 18:58:21 None
fix(utils): generatephysicalname handles short names #196 jstrunk 20:10:39 21:45:51 None
chore(deps): upgrade dependencies #194 emerging-tech-cdk-constructs-bot 0:33:55 2 days, 19:35:11 None
feat: clip memory for Lambda if it exceeds context #193 scottschreckengaust 13:35:57 1 day, 12:27:38 None
fix: do not require husky downstream #192 scottschreckengaust 0:06:36 0:26:39 None
chore(doc): Update README_custom_sagemaker_endpoint.md #191 krokoko 0:12:01 3:09:15 None
fix(doc): Update README.md #190 krokoko 0:26:37 15:39:03 None
feat: add husky with a conventional commit check #189 scottschreckengaust 1:19:49 16:23:43 None
chore(deps): upgrade dependencies #188 emerging-tech-cdk-constructs-bot 0:00:57 3:56:19 None
fix: use definition instead of schema #187 scottschreckengaust 1:54:22 21:17:47 None
fix: ts-jest configuration under globals #185 scottschreckengaust 10:54:41 12:54:55 None
fix: remove console log statements #184 scottschreckengaust 9:45:29 10:07:31 None
fix: correct opt-out logic #183 scottschreckengaust 0:10:07 1 day, 2:01:40 None
fix: update jsii to 5.1 #182 scottschreckengaust 0:07:41 1:25:39 None
feat(docs for testing constructs): Adding Testing Constructs from samples repo #181 MichaelWalker-git 14:13:35 1 day, 13:03:20 None
feat(construct): new construct for deployment of custom models to sagemaker #180 krokoko 10:43:43 19:41:04 None
feat(layer): additional packages prop, extended layer typing, renaming for distinction, jsii upgrade due to unsupported notice #178 oconpa None None None
feat(layer): Use local host to install requirements #177 oconpa None None None
feat(qa construct): add optional long context window approach #176 MichaelWalker-git 0:11:42 11 days, 0:28:30 None
feat: Update .projenrc.ts #175 MichaelWalker-git 13:15:38 13:44:25 None
fix(projen): uncapping cdk version #174 oconpa 1 day, 21:06:29 2 days, 17:31:51 None

This report was generated with the Issue Metrics Action
Search query used to find these items: repo:awslabs/generative-ai-cdk-constructs is:pr created:2024-01-01..2024-01-31 -is:draft

(All Constructs): (VPC endpoint support for lambda)

Describe the feature

Enable vpc endpoint to access S3 and other resources from lambda in private subnet.

Use Case

As of now, the lambda use NAT gateway to access any public endpoint which should be avoided as per security best practices. The VPC endpoint enable the construct to skip any routing on the public network.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(Refactoring): Refactor existing Lambda functions to use the Lambda layer

Describe the feature

  • Add missing features to the Lambda layer construct
  • Refactor Q/A, Data ingestion and Summarization constructs to use the updated Lambda layer

Use Case

Facilitate sustaining
Enable more customization and flexibility in existing constructs (select models outside of Amazon Bedrock, ...)

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(SageMaker model deployment): add vpcConfig to pattern props

Describe the feature

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sagemaker.CfnModel.html#vpcconfig CfnModel allows users to pass the VpcConfig, we should provide that possibility to users as well

Use Case

Control access to and from your model container by configuring the VPC.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(Data ingestion): Chunking strategy

Describe the feature

Currently the size of ingested document chunks is hardcoded in the embeddings Lambda function (Fixed-size chunking).
However, depending on the scenario and content ingested, the user might need to apply a different strategy.

Use Case

More flexibility for the end user

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

feat: Potential new section for GovCloud specific GenAI constructs

Describe the feature

Constructs and easy to run on GovCloud not the public cloud

Use Case

GovCloud customers have different restrictions

Proposed Solution

Separate Repo or section?

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(QA construct): Update Q/A logic

Describe the feature

Currently, the https://github.com/awslabs/generative-ai-cdk-constructs/tree/main/src/patterns/gen-ai/aws-qa-appsync-opensearch construct's logic uses a long context window approach if a document name is specified. However, the end user might want to choose a RAG approach.

Use Case

Provide more flexibility to the end user

Proposed Solution

Add a new parameter to the GraphQL schema to select the method

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(bedrock): add other stores

Describe the feature

I'd like to be able to use stores other than Amazon OpenSearch Serverless.

Use Case

Amazon OpenSearch Serverless is riding on serverless fame or low costs, yet it's one of the most ridiculously priced services.

The minimal cost of running an Amazon OpenSearch Serverless index is ~ $700/mo.

Source:

Proposed Solution

Provide options for other storage backends that are more reasonably priced.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Data Ingestion : Update Data Ingestion to support images

Describe the feature

Upload a video or audio file to the construct and then generate a summary of the input file or perform question answer on it.

Use Case

There is a lot on content available in the form of audio and video content , for example podcast recordings , customer care telephonic call , real time govt/corporate policy call out videos. A quick highlighted summary or handling specific question answer on these content will help customer in making their business decisions.

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

contributing: update documentation

Describe the issue

Update documentation to include the following changes:

  • PR template with link to contributing guidelines, checkbox for unit tests
  • Update developer documentation to explain the tools recently put in place (husky, commintlint,...)
  • Update contributing guidelines, tenets

Links

contributing, development guidelines, PR template

aws-rag-appsync-stepfn-opensearch: minimum deployable pattern no longer works

Describe the issue

The README for the aws-rag-appsync-stepfn-opensearch pattern includes the following import:

import { RagApiGatewayOpensearch, RagApiGatewayOpensearchProps } from '@cdklabs/generative-ai-cdk-constructs';

However, you can see in lines 124-127 of the aws-rag-appsync-stepfn-opensearch/index.d.ts file that you've changed the name of the export. The comment references the old name and the export references thange from ApiGateway to AppSync.

/**
   * @summary The RagApiGatewayOpensearch class.
   */
export class RagAppsyncStepfnOpensearch extends Construct {

Please update the pattern README to reflect a working deployment.

Also, some customers may prefer API Gateway to AppSync due to familiarity, so maybe making both an option going forward would be best.

Links

https://github.com/awslabs/generative-ai-cdk-constructs/blob/main/src/patterns/gen-ai/aws-rag-appsync-stepfn-opensearch/README.md

(New construct): Add support to deploy custom models to a sagemaker endpoint

Describe the feature

Add a construct to enable deployment of custom models to a SageMaker endpoint (fine tuned, inf2,...)
This construct should provide the user the ability to point towards a location in Amazon S3 where the model artifacts are located, and a DLC container image

Use Case

More flexibility and customization for end users

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(All constructs): Caching strategy

Describe the feature

Evaluate a semantic caching strategy for Q/A, and which could be reused for other constructs as well

Use Case

Reduce cost and improve user experience

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

JSII: update to JSII 5.3

Describe the feature

The 5.1 release line of jsii will reach End-of-Support soon, on 2024-02-28T00:00:00.000Z.          !!
!!  We strongly recommend you upgrade to the current release line (5.3) at your earliest convenience.  !!
!!                                                                                                     !!
!!  Other actively supported release lines include:                                                    !!
!!  - 5.2 (planned End-of-Support date: 2024-06-30T00:00:00.000Z) 

Use Case

upgrade dependency

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(Opensearch): Allow importing an existing collection and index

Describe the feature

Allow to import existing collections and indexes to be used in the stack

Use Case

Customers might have already collections they want to use as a Bedrock Knowledge Base

Proposed Solution

Allow importing existing resources

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(All constructs): Evaluate Terraform support

Describe the feature

Evaluate Terraform support for constructs

Use Case

More flexibility for end user

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK AppSync Library GraphqlApiProps#schema is deprecated

Describe the feature

Update the code for use without deprecation

Use Case

Prepare for next major release. Building the library causes warnings like:

[WARNING] aws-cdk-lib.aws_appsync.GraphqlApiProps#schema is deprecated.
use Definition.schema instead
This API will be removed in the next major release.

Proposed Solution

use Definition.schema instead

Other Information

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.GraphqlApiProps.html
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_appsync.Definition.html

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

bedrock: incorrect props type for Agent.addAlias

Describe the bug

Agent.addAlias requires an agentId prop, but the instance of the Agent already has an agentId field.

Expected Behavior

I can call agent.addAlias({aliasName: 'prod'})

Current Behavior

I must include agentId in the props: agent.addAlias({agentId: agent.agentId, aliasName: 'prod'}).

Reproduction Steps

n/a

Possible Solution

Since JSII doesn't support the Omit or Partial types, the method needs its own interface. It can either be a copy of AgentAliasProps with the unwanted types removed, or https://github.com/mrgrain/jsii-struct-builder could be used.

Additional Information/Context

The changeIds prop can be removed too with #229 .

CDK CLI Version

n/a

Framework Version

No response

Node.js Version

n/a

OS

n/a

Language

Typescript

Language Version

No response

Region experiencing the issue

n/a

Code modification

no

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

(utils): generatePhysicalName can't create shorter names

Describe the bug

Some resources in #169 require physical names of 32 characters or less. The resulting string for a given prefix will always be the same and longer than 36 characters.

AWS::OpenSearchServerless::Collection
AWS::OpenSearchServerless::AccessPolicy
AWS::OpenSearchServerless::SecurityPolicy

Expected Behavior

For maxLength < 36, generatePhysicalName will return a unique string of size maxLength.

Current Behavior

Since the stackIdGuidLength is 36, the parts will be truncated to 0, and the resulting string will be the prefix plus the GUID. The resulting string for a given prefix will always be the same and longer than 36 characters.

Reproduction Steps

n/a

Possible Solution

Completely changing the algorithm will break existing stacks, so if maxLength is less than prefixLength + stackIdGuidLength, use an alternative algorithm.

Create a truncated hash of 8? characters. Use the existing algorithm to combine prefix, parts, and the short hash.

Additional Information/Context

No response

CDK CLI Version

n/a

Framework Version

No response

Node.js Version

n/a

OS

n/a

Language

Typescript

Language Version

No response

Region experiencing the issue

all

Code modification

n/a

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

Monthly issue metrics report

Issue Metrics

Metric Average Median 90th percentile
Time to first response 1 day, 6:40:28 1 day, 6:40:28 1 day, 6:40:28
Time to close 1 day, 22:33:15 1 day, 18:22:14 3 days, 2:19:48
Time to answer None None None
Metric Count
Number of items that remain open 2
Number of items closed 6
Total number of items created 8
Title URL Author Time to first response Time to close Time to answer
bedrock: incorrect props type for Agent.addAlias #230 jstrunk None 1 day, 22:05:37 None
bedrock: add method to Agent to manage when prepare agent gets run #229 jstrunk None 20:38:34 None
JSII: update to JSII 5.3 #225 krokoko None 2 days, 21:20:25 None
contributing: update documentation #224 krokoko None None None
aws-langchain-common-layer: update libraries versions #215 krokoko None None None
(utils): generatePhysicalName can't create shorter names #195 jstrunk None 1 day, 1:16:55 None
CDK AppSync Library GraphqlApiProps#schema is deprecated #186 scottschreckengaust None 1 day, 14:38:51 None
(gen-ai): JumpStartSageMakerEndpoint not working #179 LeonLuttenberger 1 day, 6:40:28 3 days, 7:19:10 None

This report was generated with the Issue Metrics Action
Search query used to find these items: repo:awslabs/generative-ai-cdk-constructs is:issue created:2024-01-01..2024-01-31 -reason:"not planned"

aws-langchain-common-layer: update libraries versions

Describe the feature

Update libraries in the requirements.txt file

Use Case

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(Bedrock/Agent): Allow to add a user Input flow to an agent via a property

Describe the feature

Adding the possibility to ask user for complementing information to complete a task is implemented by adding a special Action Group to an agent.
This can be done currently with the CDK construct, but require the developer to know the details on how this action groups should be configured. It would be more developer friendly to just have a boolean value enableUserInput in the Agent creation props, which gets translated into the necessary group configuration.

Use Case

Enable Agents to ask for user input

Proposed Solution

Implement a enableUserInput boolean property in the Agent props.
If true automatically create and add the ActionGroup configured as:

{
  'actionGroupName': 'UserInputAction',
  'parentActionSignature': 'AMAZON.UserInput',
  'actionGroupState': 'ENABLED'
}

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Monthly issue metrics report

Issue Metrics

Metric Average Median 90th percentile
Time to first response 10:02:21 0:51:19 2 days, 6:10:57
Time to close 22:29:00 4:06:44 2 days, 15:11:17
Time to answer None None None
Metric Count
Number of items that remain open 0
Number of items closed 55
Total number of items created 55
Title URL Author Time to first response Time to close Time to answer
feat(docs) : update architecture diagrams in README #127 hvital 0:04:03 0:10:01 None
feat!: public release #126 scottschreckengaust 2:03:38 2:39:50 None
fix: run ort manually #125 scottschreckengaust 4:16:00 13:30:15 None
feat: add commitlint github action #124 scottschreckengaust 6:42:54 14:02:47 None
chore(deps): upgrade dependencies #121 emerging-tech-cdk-constructs-bot 0:32:40 1 day, 1:22:45 None
feat(github): Update issue templates #120 scottschreckengaust 0:14:05 None None
feat(documentation): add badges #119 krokoko 0:01:52 0:04:23 None
feat(bugfix): Bug/bucket name #118 hvital 0:01:35 0:34:05 None
feat(appsec): Feature/cdk nag fixes #117 dineshSajwan 0:00:49 0:12:06 None
chore(deps): upgrade dependencies #116 emerging-tech-cdk-constructs-bot 17:08:10 7 days, 20:02:37 None
fix(constructs): fix multiple bugs #115 krokoko 1:41:35 2 days, 11:25:17 None
chore(deps): upgrade dependencies #114 emerging-tech-cdk-constructs-bot 4:29:17 2 days, 18:01:59 None
feat(lambdas): update base image for lambda functions #113 krokoko 0:05:17 0:15:44 None
chore(deps): upgrade dependencies #112 emerging-tech-cdk-constructs-bot 0:28:42 1:17:43 None
feat(bandit): Fix all bandit findings #111 krokoko 0:01:35 0:05:19 None
feat(disclaimer): Feat/update disclaimer #110 krokoko 0:38:03 1:02:35 None
fix(bandit): Correct GitHub workflow for Bandit #109 scottschreckengaust 0:47:04 1:28:23 None
feat(bandit): Add Bandit #108 scottschreckengaust 0:09:21 0:11:19 None
feat(constructs): compress generated files from Jumpstart model specs #107 krokoko 0:07:24 0:55:45 None
fix(security): Add commit hash to GitHub Workflows #106 scottschreckengaust 0:22:51 1:01:56 None
feat(ort): Add repository configuration and curation #105 scottschreckengaust 1:25:17 2:14:53 None
feat(constructs): add timeout to graphql requests #104 krokoko 0:04:27 0:07:43 None
fix: Remove unneeded dependency '-' #103 scottschreckengaust 0:06:18 0:07:31 None
feat(construct): Fix missing total cost estimate for summarization #102 justintlewis 0:47:06 0:51:37 None
feat(construct): pin version of lambda base python image #101 krokoko 0:10:09 0:47:47 None
chore(deps): upgrade dependencies #100 emerging-tech-cdk-constructs-bot 0:19:00 1:29:46 None
feat(documentation): Update language in documentation #99 justintlewis 0:01:14 1:16:23 None
feat: Public package for NPM #98 scottschreckengaust 0:20:16 3:51:15 None
feat(release): public release to npm #97 krokoko 0:07:00 2:53:42 None
chore(deps): upgrade dependencies #96 emerging-tech-cdk-constructs-bot 1:59:16 15:19:47 None
feat(construct): SageMaker model deployment construct #95 krokoko 0:18:33 12:10:54 None
chore(deps): upgrade dependencies #94 emerging-tech-cdk-constructs-bot 3:48:41 17:21:59 None
chore(deps): bump langchain from 0.0.325 to 0.0.329 in /lambda/aws-rag-appsync-stepfn-opensearch/embeddings_job/src #93 dependabot[bot] 2 days, 12:50:13 2 days, 15:10:02 None
chore(deps): bump langchain from 0.0.325 to 0.0.329 in /lambda/aws-summarization-appsync-stepfn/document_reader #91 dependabot[bot] 2 days, 12:50:39 2 days, 15:11:21 None
chore(deps): bump langchain from 0.0.325 to 0.0.329 in /layers/langchain-common-deps #92 dependabot[bot] 2 days, 12:50:52 2 days, 15:11:09 None
chore(deps): bump langchain from 0.0.325 to 0.0.329 in /lambda/aws-qa-appsync-opensearch/question_answering/src #90 dependabot[bot] 2 days, 12:50:40 2 days, 15:13:04 None
chore(deps): bump langchain from 0.0.325 to 0.0.329 in /lambda/aws-rag-appsync-stepfn-opensearch/s3_file_transformer/src #89 dependabot[bot] 2 days, 12:50:38 2 days, 15:11:03 None
chore(deps): bump langchain from 0.0.325 to 0.0.329 in /lambda/aws-summarization-appsync-stepfn/summary_generator #88 dependabot[bot] 2 days, 12:50:25 2 days, 15:11:36 None
chore(deps): upgrade dependencies #87 emerging-tech-cdk-constructs-bot 0:46:07 3 days, 20:26:24 None
feat(documentation): updated documentation for rag construct #86 dineshSajwan 1:20:54 18:07:52 None
feat(userfeedback): updated construct documentation and s3 bucket name #85 dineshSajwan 1:42:49 4:22:13 None
feat: add ignore_existing option to ingestion and summarization #84 hvital 0:09:55 0:26:31 None
chore(deps): upgrade dependencies #83 emerging-tech-cdk-constructs-bot 0:55:32 0:57:28 None
feat(doc): add legal disclaimer and additional documentation #82 krokoko 0:08:16 0:31:09 None
chore(deps): upgrade dependencies #81 emerging-tech-cdk-constructs-bot 4:42:52 13:43:03 None
chore(deps): upgrade dependencies #80 emerging-tech-cdk-constructs-bot 14:38:56 17:44:37 None
feat(license): Add NOTICE, Remove THIRD-PARTY-LICENSE #79 scottschreckengaust 1 day, 14:39:20 1 day, 14:53:57 None
chore(deps): upgrade dependencies #78 emerging-tech-cdk-constructs-bot 0:07:33 1 day, 15:07:41 None
feat(codeowners): Create CODEOWNERS #77 scottschreckengaust 2:19:01 1 day, 1:38:02 None
feat(ci): Add Semgrep #76 scottschreckengaust 14:22:17 1 day, 11:57:07 None
chore(deps): upgrade dependencies #75 emerging-tech-cdk-constructs-bot 22:22:51 1 day, 23:52:15 None
feat(qa construct): add bedrock streaming option to graphql #74 krokoko None 0:00:05 None
feat(qa_construct): streaming question answering #73 hvital 1:05:50 1:33:09 None
feat(bugfixes): bug fixes for ingestion and summary #72 dineshSajwan 1:04:21 20:13:46 None
chore(deps): upgrade dependencies #71 emerging-tech-cdk-constructs-bot 23:12:20 1 day, 18:23:58 None

This report was generated with the Issue Metrics Action
Search query used to find these items: repo:awslabs/generative-ai-cdk-constructs is:pr created:2023-11-01..2023-11-30 -is:draft

aws-qa-appsync-opensearch: Index not found

Describe the bug

I'm using the QaAppsyncOpensearch construct (https://github.com/awslabs/generative-ai-cdk-constructs/tree/main/src/patterns/gen-ai/aws-qa-appsync-opensearch) with a new created OpenSearch. The Lambda logs keep complaining about not can find the index. But as of my understanding the index should be created automatically when it can't be found.

[ERROR] NotFoundError: NotFoundError(404, 'index_not_found_exception', 'no such index', demoindex, index_or_alias)
Traceback (most recent call last):

I'm adding OpenSearch like that:

      const osDomain = new os.Domain(stack, "Domain", {
        version: os.EngineVersion.ELASTICSEARCH_2_3,
        capacity: {
          masterNodeInstanceType: "t2.micro.search",
          dataNodeInstanceType: "t2.micro.search",
        },
        removalPolicy: cdk.RemovalPolicy.DESTROY,
      });

Expected Behavior

AppSync request is successful

Current Behavior

AppSync keeps on status "Working on the question"

Reproduction Steps

Create a simple CDK deployment like that and run the AppSync subscription and mutation

      const osDomain = new os.Domain(stack, "Domain", {
        version: os.EngineVersion.ELASTICSEARCH_2_3,
        capacity: {
          masterNodeInstanceType: "t2.micro.search",
          dataNodeInstanceType: "t2.micro.search",
        },
        removalPolicy: cdk.RemovalPolicy.DESTROY,
      });

      const rag_source = new QaAppsyncOpensearch(this, "QaAppsyncOpensearch", {
        existingOpensearchDomain: osDomain,
        openSearchIndexName: 'demoindex',
        cognitoUserPool: cognito.cdk.userPool,
      });
      rag_source.s3InputAssetsBucket?.applyRemovalPolicy(
        cdk.RemovalPolicy.DESTROY
      );

Possible Solution

Maybe my OpenSearch is to low tier?

Additional Information/Context

No response

CDK CLI Version

2.124.0

Framework Version

No response

Node.js Version

20

OS

mac

Language

Typescript

Language Version

No response

Region experiencing the issue

us-east-1

Code modification

..

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

(sagemaker-model-deployment): Support AWS Inferentia instance types

Describe the feature

I'd like to be able to use AWS Inferentia for my endpoint inference containers

Use Case

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

RAG: newlines missing when transforming from pdf to txt

Describe the bug

So I noticed that newlines are getting removed when RAG is transforming from pdf to txt. That probably decreases the level of accuracy when using similarity search.

I kind of hat a workaround as my ingestion files don't need bo PDFs so I just could take the txt file like and leave it as it is for the embedding:

---
event: meetup
title: Langchain AI MVP
date: "2024-02-03"
tags: ["meetup", "langchain"]
---

0:00:00.719,0:00:03.719
okay

0:00:05.400,0:00:09.120
awesome so I will start with the first

0:00:07.980,0:00:11.460
talk

0:00:09.120,0:00:14.280
uh thanks again for attending here to

I'm sure that had better results then without newlines!

Expected Behavior

Newlines are not removed

Current Behavior

Newlines are removed

Reproduction Steps

do a RAG and view the txt file.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.124.0

Framework Version

No response

Node.js Version

20

OS

macos

Language

Typescript

Language Version

No response

Region experiencing the issue

us-east-1

Code modification

....

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

Hugging Face support

Describe the feature

Hello,

Here is Philipp from Hugging Face. I am leading the partnership between AWS and Hugging Face from a technical side.
I just came across this fantastic library and project. Is there something we can do to make it easier for you to improve and maintain the library, e.g. notify about new feature, versions etc.

Use Case

.

Proposed Solution

.

Other Information

.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(RAG/QA): OpenSearch Serverless support

Describe the feature

OpenSearch Serverless support : currently the constructs support only a provisioned OpenSearch cluster

Use Case

Reduction in complexity, autoscaling

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(Bedrock/Agents): helper methods to associate KnowledgeBases to Agents

Describe the feature

Allow for adding a KnowledgeBase to an agent and not only to specify existing KBs at the agent construct instantiation.

Use Case

Allow for more flexibility in the order in which agents and KBs are created

Proposed Solution

Implement a Agent.addKnowldgeBase(KnowledgeBase, {instructions}) and a KnowledgeBase.assToAgent(Agent, {instruxtions}) methods

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(Constructs): Web RAG - Web Crawler, Chatting with Web Pages and Search

Describe the feature

Many RAG experiences are built around websites. Users want to crawl one or more websites, retrieve content from pages, schedule periodic updates, and inject results into OpenSearch to enable RAG requests based on website data.

To support this scenario, a WebCrawler construct can be created. It should be capable of creating new OpenSearch indexes or using existing ones.

This construct can also be used to obtain data from websites in real-time. For example, a user could ask a chatbot to summarize a specific webpage. In this case, the web crawler should extract data from the webpage and provide it to the chatbot.

We should also consider web search scenarios, where users want to use a search engine to obtain results. The results found by the search engine should be parsed and returned to the chatbot.

Use Case

RAG over websites

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(SageMaker model deployment constructs): Automate the generation of available models/containers

Describe the feature

Currently, the generation of the list of available models/containers needs to be manually triggered
We need to add a projen task which generates the list of models/containers, then a Github action which can run on a schedule and open a PR (every 48 hours) if there is anything new

Use Case

Automation, facilitate sustaining

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(Constructs): API Gateway support

Describe the feature

Data ingestion, Q/A and Summarization currently use Appsync, however supporting API gateway
Need to evaluate if this could be a variation of existing constructs or new ones

Use Case

More flexibility for end user

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(Data ingestion): Support more text file formats

Describe the feature

Current data ingestion pipeline supports PDF files only, we should support additional text file formats (csv,...)

Use Case

Extend the capabilities of the construct

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

bedrock: add method to Agent to manage when prepare agent gets run

Describe the feature

When an Agent, Knowledge Base, or Action Group is created or updated, the agent needs to be prepared by calling the PrepareAgent API. There is already a custom resource to call PrepareAgent, but it is only available within the Agent resource. It is preferable to only call PrepareAgent once after all updates are made.

I would like to be able to add dependencies and optionally a changeId to the PrepareAgent custom resource from outside of the Agent resource.

Use Case

While developing Agent Action Groups, I see that there needs to be a public way to add a dependency to Prepare Agent. Agent Action Groups depend on an Agent, but the Agent needs to be prepared after creating or updating the Agent Action Group.

Proposed Solution

An internal method on Agent called _addPrepareAgentDependency can be called to add a resource and optionally a changeId so CloudFormation knows to update PrepareAgent when the resource is updated.

/**
 * Register a dependency for prepareAgent.
 *
 * @param resource - The resource that will be registered as a dependency.
 * @param changeId - The changeId of the resource that will be registered as a dependency.
 *
 * @internal This is an internal core function and should not be called directly.
 */
public _addPrepareAgentDependency(resource: cdk.IResource, changeId?: string) {
  this.prepareAgent.node.addDependency(resource);
  if (changeId) {
    this.changeIds.push(changeId);
  }
}

Usage:

props.agent._addPrepareAgentDependency(agentActionGroup, agentActionGroup.getAttString('changeId'));

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Monthly issue metrics report

Issue Metrics

Metric Average Median 90th percentile
Time to first response 1 day, 9:07:18 1:14:55 3 days, 16:26:32
Time to close 1 day, 23:56:08 2:11:35 4 days, 21:42:35
Time to answer None None None
Metric Count
Number of items that remain open 0
Number of items closed 6
Total number of items created 6
Title URL Author Time to first response Time to close Time to answer
chore(deps): upgrade dependencies #7 emerging-tech-cdk-constructs-bot 4 days, 19:18:19 4 days, 21:28:51 None
chore: initial documentation #5 krokoko 0:06:53 0:45:28 None
chore(deps): upgrade dependencies #4 scottschreckengaust 2 days, 0:08:52 4 days, 21:51:45 None
chore: project created with projen #3 scottschreckengaust 1:14:55 1:23:01 None
feat: Projen AWS CDK Construct Library #2 scottschreckengaust None None None
feat: Initialized projen and added project structure for cdk constructs #1 dineshSajwan 0:47:31 2:11:35 None

This report was generated with the Issue Metrics Action
Search query used to find these items: repo:aws-samples/emerging-tech-cdk-constructs is:pr created:2023-09-01..2023-09-30 -is:draft

(New Construct): Responsible AI

Describe the feature

Provide a new construct which can provide responsible AI features for existing constructs, such as monitoring and analytics

Use Case

Additional features for existing constructs

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(gen-ai): JumpStartSageMakerEndpoint not working

Describe the bug

I'm unable to deploy the SageMaker endpoint using the JumpStartSageMakerEndpoint construct.

Expected Behavior

The endpoint gets created.

Current Behavior

CloudFormation throws the following error when trying to create the endpoint:

Could not find model data at s3://jumpstart-cache-prod-us-east-1/huggingface-asr/huggingface-asr-whisper-base/artifacts/inference-prepack/v1.0.1/. (Service: AmazonSageMaker; Status Code: 400; Error Code: ValidationException; Request ID: 8e830934-e61a-4c1e-96e5-1663211204b0; Proxy: null)

error

Reproduction Steps

import * as cdk from "aws-cdk-lib";
import { Construct } from "constructs";
import {
  JumpStartModel,
  SageMakerInstanceType,
  JumpStartSageMakerEndpoint,
} from "@cdklabs/generative-ai-cdk-constructs";

export class SagemakerJumpStartFmEndpointStack extends cdk.Stack {
  jumpStartEndpoint: JumpStartSageMakerEndpoint;

  constructor(scope: Construct, id: string, props: SagemakerJumpStartFmEndpointStackProps) {
    super(scope, id, props);

    this.jumpStartEndpoint = new JumpStartSageMakerEndpoint(this, "JumpStartEndpoint", {
      model: JumpStartModel.HUGGINGFACE_ASR_WHISPER_BASE_2_0_0,
      instanceType: SageMakerInstanceType.of("ml.g5.2xlarge"),
    });
}

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.111.0

Framework Version

0.1.11

Node.js Version

21.4.0

OS

Mac OS

Language

Typescript

Language Version

No response

Region experiencing the issue

us-east-1

Code modification

No

Other information

No response

Service quota

  • I have reviewed the service quotas for this construct

Question answering: Allow optional prop to configure Lambda function provisioned concurrency

Describe the feature

Allow a prop like readonly lambdaProvisionedConcurrency?: number; for the QA construct.

Use Case

I would like to configure provisioned concurrency for the lambda function provisioned by the QA construct to minimize cold-starts to squeeze out a bit more performance on client applications.

Proposed Solution

In src/patterns/gen-ai/aws-qa-appsync-opensearch/index.ts add an optional prop and then in the lambda resource, conditionally add the provisioned concurrency in the configuration.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(new construct): Implement Amazon Bedrock features as CDK constructs

Describe the feature

Amazon Bedrock recently unveiled some features which are not available through CDK at the moment (Guardrails, knowledge bases, agents).

Use Case

Provide new features for end users

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(New Construct): LangServ Support

Describe the feature

This construct deploys Langserv a FastAPI based framework that helps developers deploy LangChain's Runnables and Chains as REST API in production.

Use Case

Langserv simplifies the deployment of Large language Models from a prototype to production with industry best practices such as

  1. API docs page with JSONSchema and Swagger
  2. Efficient /invoke/, /batch/ and /stream/ endpoints with support for many concurrent requests on a single server
  3. All built with battle-tested open-source Python libraries like FastAPI, Pydantic, uvloop and asyncio
  4. FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python type hints.
  5. Observability and Analytics
  6. LLM Provider Agnostic

Proposed Solution

At a high level this construct will deploy LangServ and LangFuse on AWS using Services such as Fargate, ECS and RDS but will depend on existing constructs such as aws_ecs_patterns. Developers will be able to make custom REST api calls to FastAPI endpoints with support for streaming, batch and invoke. The construct will be LLM provider agnostic such as Bedrock, SageMaker or VLLM on EC2 Instances giving developers flexibility to experiment with different model providers.
The construct will also provide monitoring and observability capability using LangFuse giving developers the flexibility to trace and debug LLM applications, monitor latency and model evaluation capabilities.

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Tasks

No tasks being tracked yet.

(All constructs): User management strategy

Describe the feature

Provide a user management strategy to store user related information and enable additional features in constructs (feedback on generated responses, ...)

Use Case

Provide additional features in constructs

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

(common helpers): Refactor code to use common helpers

Describe the feature

Every instance of a classic AWS service should be created through a common helper function to ensure consistency and use of best practices across constructs

Use Case

simplify sustaining and development of new constructs

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.