Generative AI and machine learning
Why graphs?
As organizations build and deploy generative artificial intelligence (AI) applications, their expectations for accuracy, comprehensiveness, and explainability are increasing. Providing enterprise and domain-specific context through techniques such as Retrieval Augmented Generation (RAG) can help to an extent— RAG is cost-efficient for providing current and relevant information for generative AI while retaining data governance and control.
Graph Retrieval Augmented Generation (GraphRAG) takes RAG to the next level by harnessing the power of both graph analytics and vector search to enhance the accuracy, comprehensiveness and explainability of AI responses. GraphRAG achieves this by leveraging relationships between entities or structural elements in data, such as sections or titles with chunks of documents, to provide the most relevant data as input to RAG applications. It can make multi-hop connections between related entities or topics and use these facts to augment a generative response.
Amazon Neptune capabilities
GraphRAG
Amazon provides fully managed and self managed options for creating and running GraphRAG applications.
- Fully managed: Amazon Bedrock Knowledge Bases offer one of the world's first fully managed GraphRAG capabilities. It automatically manages the creation and maintenance of graphs and embeddings, enabling customers to provide more relevant responses to end users. With this capability, you avoid the need for deep graph expertise, including creation of chunking strategies or complex RAG integrations with LLMs and vector stores.
- Self managed: If you are looking to self-host or connect to custom data sources/third-party products (foundational models, vector stores, data stores), you have two choices.
- AWS GraphRAG Python toolkit: The new open source GraphRAG toolkit supports up-to-date foundational and graph models. It provides a framework for automating the construction of a graph from unstructured data, and for querying this graph when answering user questions.
- Open source frameworks: Neptune simplifies the creation of GraphRAG applications by integrating with both LangChain and LlamaIndex. This makes it easy to build applications with LLMs such as those available in Amazon Bedrock. AWS supports and contributes to both these popular open source projects.
Machine learning
- Neptune Machine Learning (ML): Neptune ML automatically creates, trains, and applies ML models on your graph data. It uses Deep Graph Library (DGL) to automatically choose and train the best ML model for your workload so that you can make ML-based predictions on graph data in hours instead of weeks.
- Natural language query generation for graphs: If you’re unfamiliar with query languages such as Gremlin or Cypher, Neptune integration with NeptuneOpenCypherQAChain enables you to question your Neptune graph database using natural language. For example, you can translate English questions into openCypher queries and return a human-readable response. This chain can be used to answer questions such as “Which US airport has the longest and shortest outgoing routes?”.
Use cases
Customers
BMW
Trend Micro
Getting started
There are many ways to get started including:
- AWS GraphRAG toolkit
- GraphRAG sample solutions
- Neptune ML quick-start templates using AWS CloudFormation
- Using natural language to simplify graph queries with Amazon Neptune and LangChain (Demo)
- Documentation: Amazon Neptune ML for machine learning on graphs