Skip to content

Latest commit

 

History

History
48 lines (29 loc) · 3.39 KB

README.md

File metadata and controls

48 lines (29 loc) · 3.39 KB

Examples

Notebooks

Environment variables

The notebooks assume that the graph store and vector store connections are stored in GRAPH_STORE and VECTOR_STORE environment variables.

If you are running these notebooks via the Cloudformation template below, a .env file containing these variables will already have been installed in the Amazon SageMaker environment. If you are running these notebooks in a separate environment, you will need to populate these two environment variables.

Cloudformation templates

graphrag-toolkit-stack.json creates a graphrag-toolkit environment:

  • Amazon VPC with three private subnets, one public subnet, and an internet gateway
  • Amazon Neptune Database cluster with a single Neptune serverless instance
  • Amazon OpenSearch Serverless collection with a public endpoint
  • Amazon SageMaker notebook

Charges apply.

Amazon Bedrock foundation model access

The SageMaker notebook's IAM role policy includes permissions that allow the following models to be invoked:

  • anthropic.claude-3-sonnet-20240229-v1:0
  • cohere.embed-english-v3

You must run the CloudFormation stack in a region containing these models, and must enable access to these models before running the notebook examples.

Adding additional IAM permissions

The CloudFormation stack includes an input parameter, IamPolicyArn, that allows you to add an additional IAM policy to the GraphRAG client IAM role created by the stack. Use this parameter to add a custom policy containing permissions to additional resources that you want to use, such as specific Amazon S3 buckets, or additional Amazon Bedrock foundation models.

Installing example notebooks

The CloudFormation stack includes an input parameter, ExampleNotebooksURL that specifies the URL of a zip file containing the graphrag-toolkit example notebooks. By default this parameter is set to:

https://github.com/awslabs/graphrag-toolkit/releases/latest/download/graphrag-toolkit-examples.zip

Set this parameter blank if you do not want to install the notebooks in your environment.