Capgemini SE

07/18/2024 | News release | Distributed by Public on 07/18/2024 00:44

Knowledge Graphs improve Gen AI

Knowledge Graphs improve Gen AI
Validating results builds trust for organizations

Joakim Nilsson

18th July 2024

Generative AI can make recommendations that will transform decision-making for organizations - but how can people trust the answers Gen AI provides? Knowledge Graphs can play a vital role in ensuring the accuracy of Gen AI's output, bolstering its reliability and effectiveness.

In Douglas Adams' The Hitchhiker's Guide to the Galaxy, a supercomputer called Deep Thought is asked for the answer to "Life, the universe, and everything." After 7.5 million years, Deep Thought responds "42." Representatives from the civilization that built Deep Thought immediately ask how it arrived at the answer, but the computer cannot tell them. When Adams wrote this scene in the 1970s, he was (arguably) making a joke - but today, many people find themselves in this situation when interacting with generative AI (Gen AI).

Gen AI works by drawing upon millions of pieces of data - a volume that's impossible for humans to effectively analyze. Businesses are excited by its potential to deliver valuable insights and make well-informed predictions - but if different Gen AI tools are asked the same question and give different answers, how could an organization decide which result is more correct? How would a person fact-check the responses?

Addressing the shortcomings of unstructured, implicit data

The challenge relates to the Large Language Models Gen AI relies upon. An LLM can contain massive amounts of data, but it's commonly stored in an unstructured, implicit manner. This makes it difficult to investigate how a Gen AI tool arrived at its answer.

Since the release of ChatGPT in late 2022, Neo4j and Capgemini have been working independently / collaborating to overcome this challenge by using Knowledge Graphs. These store complex, structured data and the relationships between them. Instead of relying solely on LLMs to directly generate database queries, our solution incorporates a high-level interface that allows the LLM to interact seamlessly with a Knowledge Graph via database query templates. These templates serve as structured frameworks, guiding the LLM to fill in specific parameters based on the user's request. This simplifies the task for the LLM by abstracting away complex logic. (See Figure 1.) This separation of concerns ensures the LLM focuses on natural language understanding and generation, while the query templates handle the technical aspects of database interaction - improving the overall accuracy and efficiency of retrieval.

In this example, the query template uses a vector search to locate relevant nodes within the Knowledge Graph that correspond to the entities present in the user's question. This identifies the nodes relevant to the query, which are then used to retrieve neighborhoods or shortest paths around the nodes within the graph. This helps contextualize the retrieved information and provides a more comprehensive answer to the user's query. More information about this specific query template is available in this blog post.

Tailored templates

Query templates can be tailored to discrete domains such as finding dependencies within supply chains or executing aggregation operations for business intelligence purposes, enabling organizations to address specific challenges. This more targeted approach best leverages the LLM's capabilities to generate insights by ensuring they are not only relevant but deeply informed by the underlying data structures, helping enterprises to efficiently transform their raw data into actionable intelligence.

That said, the complexity of business requirements often exceeds what a single query template can accommodate when an LLM interfaces with a Knowledge Graph. Therefore, it's essential to embrace an adaptive approach, providing a rich assortment of query templates that can be selectively deployed to match specific business scenarios. Leveraging the LLM's capability to invoke functions, Gen AI can dynamically select and employ multiple query templates based on the context of the user's request or the specific task at hand. This results in a more nuanced and flexible interaction with the database, and significantly amplifies the LLM's ability to solve intricate business intelligence and analytics problems. (See Figure 2.)

This LLM-powered movie agent uses several tools, orchestrated through carefully designed query templates, to interact with the Knowledge Graph.

  • The information tool retrieves data about movies or individuals, ensuring the agent has access to the latest and most relevant information.
  • The recommendation tool provides movie recommendations based on user preferences and input.
  • The memory tool stores information about user preferences in the Knowledge Graph, allowing for a personalized experience over multiple interactions.

More information on this movie agent project can be found on GitHub.

"We expect Knowledge Graphs to help Large Language Models embrace iterative processes to improve their output."

Democratizing data and empowering business users

The Knowledge Graph acts as a bridge, translating user intent into specific, actionable queries the LLM can execute with increased accuracy and reliability. By allowing any user - regardless of technical knowledge - to inspect how the LLM arrived at its answers, people can validate the information sources themselves. Benefits include:

  • Results that are explainable, repeatable, and transparent. This can enhance trust in Gen AI in everything from research and discovery in life sciences to digital twins in sectors such as manufacturing, aerospace, and telecommunications.
  • Better-informed and better trusted business decisions
  • Freed up time for experts such as prompt engineers to concentrate on tasks that require their specialized skills.

As we look ahead, we expect Knowledge Graphs to help Large Language Models embrace iterative processes to improve their output. Our enthusiasm is shared by other experts in the field including Andrew Ng at DeepLearningAI, underscoring the widespread recognition of their transformative capabilities. As we help create the future, it's clear the journey with these intelligent systems is only just beginning - and is moving much faster than Deep Thought ever did - so it's critical that people are given the means to fact-check generative AI as it evolves.

INNOVATION TAKEAWAYS:

TRUST IS IMPORTANT - Knowledge Graphs can boost confidence in the output from Gen AI systems - making it easier for people and organizations to embrace them.

TOOLS FOR THE TOOL - With Knowledge Graphs, Large Language Models can dynamically employ multiple query templates to match specific business scenarios, making interactions with Gen AI more nuanced.

DEMOCRATIZING DATA - By making it easier for everyone in an organization to interact with generative AI, Knowledge Graphs can free up experts to focus on tasks that require their specific skills.

Interesting read?

Capgemini's Innovation publication,Data-powered Innovation Review | Wave 8features contribution from leading experts from Capgemini and esteemed partners like Dassault Systèmes, Neo4j, and The Open Group. Delve into a myriad of topics on the concept of virtual twins, climate tech, and a compelling update from our 'Gen Garage' Labs, highlighting how data fosters sustainability, diversity, and inclusivity. Embark on a voyage of innovation today.Find all previous Waves here.

Author

Joakim Nilsson

Knowledge Graph Lead, Insights & Data Sweden, Capgemini

Based in Malmö Sweden, Joakim is part of the CTO office where he drives the expansion of Knowledge Graphs forward in the region. He has been involved in Knowledge Graph projects as a consultant both for Capgemini and Neo4j. Joakim holds a master's degree in mathematics and has been working with Knowledge Graphs since 2021.

Connect with us

First Name *
First Name is not valid.
Last Name *
Last Name is not valid.
Email *
Email is not valid.
Company *
Company is not valid.
Country
Country Afghanistan Aland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua And Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bosnia And Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo, Democratic Republic Cook Islands Costa Rica Cote D'Ivoire Croatia Cuba Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard Island & Mcdonald Islands Holy See (Vatican City State) Honduras Hong Kong Hungary Iceland India Indonesia Iran, Islamic Republic Of Iraq Ireland Isle Of Man Israel Italy Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati Korea Kuwait Kyrgyzstan Lao People's Democratic Republic Latvia Lebanon Lesotho Liberia Libyan Arab Jamahiriya Liechtenstein Lithuania Luxembourg Macao Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States Of Moldova Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Netherlands Antilles New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Mariana Islands Norway Oman Pakistan Palau Palestinian Territory, Occupied Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Reunion Romania Russian Federation Rwanda Saint Barthelemy Saint Helena Saint Kitts And Nevis Saint Lucia Saint Martin Saint Pierre And Miquelon Saint Vincent And Grenadines Samoa San Marino Sao Tome And Principe Saudi Arabia Senegal Serbia Seychelles Sierra Leone Singapore Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia And Sandwich Isl. Spain Sri Lanka Sudan Suriname Svalbard And Jan Mayen Swaziland Sweden Switzerland Syrian Arab Republic Taiwan Tajikistan Tanzania Thailand Timor-Leste Togo Tokelau Tonga Trinidad And Tobago Tunisia Turkey Turkmenistan Turks And Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom United States United States Outlying Islands Uruguay Uzbekistan Vanuatu Venezuela Viet Nam Virgin Islands, British Virgin Islands, U.S. Wallis And Futuna Western Sahara Yemen Zambia Zimbabwe
Country is not valid.
Phone (optional)
Your Message *
Your Message is not valid.
I agree to Capgemini collecting and processing my personal data to allow me to receive information on Capgemini services. For further information, please see our Privacy Notice. .
Expert title
Page URL
Slide to submit
Thank you for your submission. We will be in touch with you soon!

We are sorry, the form submission failed. Please try again.

Tomaz Bratanic

Senior GenAI Developer, Neo4j

Tomaz Bratanic has extensive experience with graphs, machine learning, and generative AI. He has written an in-depth book about using graph algorithms in practical examples. Nowadays, he focuses on generative AI and LLMs by contributing to popular frameworks like LangChain and LlamaIndex and writing blog posts about LLM-based applications.

Connect with us

First Name *
First Name is not valid.
Last Name *
Last Name is not valid.
Email *
Email is not valid.
Company *
Company is not valid.
Country
Country Afghanistan Aland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua And Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bosnia And Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo, Democratic Republic Cook Islands Costa Rica Cote D'Ivoire Croatia Cuba Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard Island & Mcdonald Islands Holy See (Vatican City State) Honduras Hong Kong Hungary Iceland India Indonesia Iran, Islamic Republic Of Iraq Ireland Isle Of Man Israel Italy Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati Korea Kuwait Kyrgyzstan Lao People's Democratic Republic Latvia Lebanon Lesotho Liberia Libyan Arab Jamahiriya Liechtenstein Lithuania Luxembourg Macao Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States Of Moldova Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Netherlands Antilles New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Mariana Islands Norway Oman Pakistan Palau Palestinian Territory, Occupied Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Reunion Romania Russian Federation Rwanda Saint Barthelemy Saint Helena Saint Kitts And Nevis Saint Lucia Saint Martin Saint Pierre And Miquelon Saint Vincent And Grenadines Samoa San Marino Sao Tome And Principe Saudi Arabia Senegal Serbia Seychelles Sierra Leone Singapore Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia And Sandwich Isl. Spain Sri Lanka Sudan Suriname Svalbard And Jan Mayen Swaziland Sweden Switzerland Syrian Arab Republic Taiwan Tajikistan Tanzania Thailand Timor-Leste Togo Tokelau Tonga Trinidad And Tobago Tunisia Turkey Turkmenistan Turks And Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom United States United States Outlying Islands Uruguay Uzbekistan Vanuatu Venezuela Viet Nam Virgin Islands, British Virgin Islands, U.S. Wallis And Futuna Western Sahara Yemen Zambia Zimbabwe
Country is not valid.
Phone (optional)
Your Message *
Your Message is not valid.
I agree to Capgemini collecting and processing my personal data to allow me to receive information on Capgemini services. For further information, please see our Privacy Notice. .
Expert title
Page URL
Slide to submit
Thank you for your submission. We will be in touch with you soon!

We are sorry, the form submission failed. Please try again.

Magnus Carlsson

CTO, Insights & Data Sweden, Capgemini

Magnus heads Insights & Data Nordics at Capgemini. He focuses on innovation with data and how to scale. Some of examples of current areas he and his team are working on are Scaling AI & Data Science, Data Estate Modernization including Data Mesh, Datalakehouse and Knowledgraphs, User Adoption & Change Management, Data Governance / DataOps, Next Generation Analytics, CFO Office and not the least - Sustainability Analytics & AI.

Connect with us

First Name *
First Name is not valid.
Last Name *
Last Name is not valid.
Email *
Email is not valid.
Company *
Company is not valid.
Country
Country Afghanistan Aland Islands Albania Algeria American Samoa Andorra Angola Anguilla Antarctica Antigua And Barbuda Argentina Armenia Aruba Australia Austria Azerbaijan Bahamas Bahrain Bangladesh Barbados Belarus Belgium Belize Benin Bermuda Bhutan Bolivia Bosnia And Herzegovina Botswana Bouvet Island Brazil British Indian Ocean Territory Brunei Darussalam Bulgaria Burkina Faso Burundi Cambodia Cameroon Canada Cape Verde Cayman Islands Central African Republic Chad Chile China Christmas Island Cocos (Keeling) Islands Colombia Comoros Congo Congo, Democratic Republic Cook Islands Costa Rica Cote D'Ivoire Croatia Cuba Cyprus Czech Republic Denmark Djibouti Dominica Dominican Republic Ecuador Egypt El Salvador Equatorial Guinea Eritrea Estonia Ethiopia Falkland Islands (Malvinas) Faroe Islands Fiji Finland France French Guiana French Polynesia French Southern Territories Gabon Gambia Georgia Germany Ghana Gibraltar Greece Greenland Grenada Guadeloupe Guam Guatemala Guernsey Guinea Guinea-Bissau Guyana Haiti Heard Island & Mcdonald Islands Holy See (Vatican City State) Honduras Hong Kong Hungary Iceland India Indonesia Iran, Islamic Republic Of Iraq Ireland Isle Of Man Israel Italy Jamaica Japan Jersey Jordan Kazakhstan Kenya Kiribati Korea Kuwait Kyrgyzstan Lao People's Democratic Republic Latvia Lebanon Lesotho Liberia Libyan Arab Jamahiriya Liechtenstein Lithuania Luxembourg Macao Macedonia Madagascar Malawi Malaysia Maldives Mali Malta Marshall Islands Martinique Mauritania Mauritius Mayotte Mexico Micronesia, Federated States Of Moldova Monaco Mongolia Montenegro Montserrat Morocco Mozambique Myanmar Namibia Nauru Nepal Netherlands Netherlands Antilles New Caledonia New Zealand Nicaragua Niger Nigeria Niue Norfolk Island Northern Mariana Islands Norway Oman Pakistan Palau Palestinian Territory, Occupied Panama Papua New Guinea Paraguay Peru Philippines Pitcairn Poland Portugal Puerto Rico Qatar Reunion Romania Russian Federation Rwanda Saint Barthelemy Saint Helena Saint Kitts And Nevis Saint Lucia Saint Martin Saint Pierre And Miquelon Saint Vincent And Grenadines Samoa San Marino Sao Tome And Principe Saudi Arabia Senegal Serbia Seychelles Sierra Leone Singapore Slovakia Slovenia Solomon Islands Somalia South Africa South Georgia And Sandwich Isl. Spain Sri Lanka Sudan Suriname Svalbard And Jan Mayen Swaziland Sweden Switzerland Syrian Arab Republic Taiwan Tajikistan Tanzania Thailand Timor-Leste Togo Tokelau Tonga Trinidad And Tobago Tunisia Turkey Turkmenistan Turks And Caicos Islands Tuvalu Uganda Ukraine United Arab Emirates United Kingdom United States United States Outlying Islands Uruguay Uzbekistan Vanuatu Venezuela Viet Nam Virgin Islands, British Virgin Islands, U.S. Wallis And Futuna Western Sahara Yemen Zambia Zimbabwe
Country is not valid.
Phone (optional)
Your Message *
Your Message is not valid.
I agree to Capgemini collecting and processing my personal data to allow me to receive information on Capgemini services. For further information, please see our Privacy Notice. .
Expert title
Page URL
Slide to submit
Thank you for your submission. We will be in touch with you soon!

We are sorry, the form submission failed. Please try again.

Related