Skip to content
START FOR FREE
START FOR FREE
  • SUPPORT
  • COMMUNITY
  • CONTACT US
  • SUPPORT
  • COMMUNITY
  • CONTACT US
MENUMENU
  • Products
    • The World’s Fastest and Most Scalable Graph Platform

      LEARN MORE

      Watch a TigerGraph Demo

      TIGERGRAPH CLOUD

      • Overview
      • TigerGraph Cloud Suite
      • FAQ
      • Pricing

      USER TOOLS

      • GraphStudio
      • Insights
      • Application Workbenches
      • Connectors and Drivers
      • Starter Kits
      • openCypher Support

      TIGERGRAPH DB

      • Overview
      • GSQL Query Language
      • Compare Editions

      GRAPH DATA SCIENCE

      • Graph Data Science Library
      • Machine Learning Workbench

      Success Plans

  • Solutions
    • The World’s Fastest and Most Scalable Graph Platform

      LEARN MORE

      Watch a TigerGraph Demo

      Solutions

      • Solutions Overview

      INCREASE REVENUE

      • Customer Journey/360
      • Product Marketing
      • Entity Resolution
      • Recommendation Engine

      MANAGE RISK

      • Fraud Detection
      • Anti-Money Laundering
      • Threat Detection
      • Risk Monitoring

      IMPROVE OPERATIONS

      • Supply Chain Analysis
      • Energy Management
      • Network Optimization

      By Industry

      • Advertising, Media & Entertainment
      • Financial Services
      • Healthcare & Life Sciences

      FOUNDATIONAL

      • AI & Machine Learning
      • Time Series Analysis
      • Geospatial Analysis
  • Customers
    • The World’s Fastest and Most Scalable Graph Platform

      LEARN MORE

      CUSTOMER SUCCESS STORIES

      • Ford
      • Intuit
      • JPMorgan Chase
      • READ MORE SUCCESS STORIES
      • Jaguar Land Rover
      • Xbox
  • Partners
    • The World’s Fastest and Most Scalable Graph Platform

      LEARN MORE

      PARTNER PROGRAM

      • Partner Benefits
      • TigerGraph Partners
      • Sign Up
      TigerGraph partners with organizations that offer complementary technology solutions and services.​
  • Resources
    • The World’s Fastest and Most Scalable Graph Platform

      LEARN MORE

      BLOG

      • TigerGraph Blog

      RESOURCES

      • Resource Library
      • Benchmarks
      • Demos
      • O'Reilly Graph + ML Book

      EVENTS & WEBINARS

      • Events &Trade Shows
      • Webinars

      DEVELOPERS

      • Documentation
      • Ecosystem
      • Developers Hub
      • Community Forum

      SUPPORT

      • Contact Support
      • Production Guidelines

      EDUCATION

      • Training & Certifications
  • Company
    • Join the World’s Fastest and Most Scalable Graph Platform

      WE ARE HIRING

      COMPANY

      • Company Overview
      • Leadership
      • Legal Terms
      • Patents
      • Security and Compliance

      CAREERS

      • Join Us
      • Open Positions

      AWARDS

      • Awards and Recognition
      • Leader in Forrester Wave
      • Gartner Research

      PRESS RELEASE

      • Read All Press Releases
      TigerGraph Debuts TigerGraph CoPilot for Graph-Augmented AI, New Cloud-Native Generation of TigerGraph Cloud, and Solution Kits
      April 30, 2024
      Read More »

      NEWS

      • Read All News

      Best paper award at International Conference on Very Large Data Bases

      New TigerGraph CEO Refocuses Efforts on Enterprise Customers

  • START FREE
    • The World’s Fastest and Most Scalable Graph Platform

      GET STARTED

      • Request a Demo
      • CONTACT US
      • Try TigerGraph
      • START FREE
      • TRY AN ONLINE DEMO

TigerGraph CoPilot Enters Public Alpha Release

  • Parker Erickson
  • March 18, 2024
  • blog, blogs, Graph + AI, Graph Algorithms
  • Blog >
  • TigerGraph CoPilot Enters Public Alpha Release

We are thrilled to announce the public alpha release of TigerGraph CoPilot, the AI assistant for TigerGraph-powered solutions. It is now available at https://github.com/tigergraph/CoPilot for alpha testing. CoPilot is meticulously designed to enhance productivity across various business functions, including analytics, development, and administration tasks. It empowers business analysts, data scientists, and developers to use natural language to run real-time queries against up-to-date data at scale. The insights can then be presented as natural language, graph visualizations, and other perspectives. 

TigerGraph CoPilot revolutionizes generative AI applications by offering higher accuracy outcomes and reduced hallucinations. Its benefits are invaluable across a spectrum of domains, including customer service, marketing, sales, data science, DevOps, and engineering. With CoPilot, organizations can unlock the full potential of their data and drive informed decision-making like never before.

Bridging LLMs and Graphs

Generative AI and Large Language Models (LLMs) are on everyone’s mind – we all are familiar with GPT-3 and ChatGPT. These tools are useful, but what if you have questions about data? Consider scenarios where businesses seek insights into financial opportunities based on account status or doctors require assistance in determining the most suitable care paths for patients given their health history. Not only LLMs have to analyze sensitive data, but it needs to be done  without compromising privacy and relying on ground-truth data.

The LLM has to retrieve information from a source of ground-truth data, and reason with this data. If you think that, for example you could pass all your financial account statements to a model, and it would figure it out – that’s not exactly how it works.

Since LLMs are neural networks, they operate on an input of limited size. That means that users are limited by how much data they can pass into the model at a time, known as a context length. LLMs have a limited number of tokens that they can take at once. Additionally, LLM API providers, such as OpenAI, charge businesses by their token usage, and therefore businesses want to limit the amount of data they pass to the model, and still get high quality results. 

What if there was a highly scalable, content-rich data store for ground-truth information, which could efficiently return just the relevant information? Then, LLMs could reason and interact with these data sources in a token-efficient manner by calling APIs to get the exact data they need to answer the question, rather than a customer’s entire history.

 

Empowering LLM with our scalable, concise, and context-rich knowledge graph

 

When talking about highly scalable, relationship-rich, and generally deduplicated data sources, graph databases usually come to mind. Graphs in general naturally fit the relationship-rich data that LLMs can reason very well with. TigerGraph specifically has the capability to scale beyond 10s of TBs, and many of our customers deduplicate their data via entity resolution algorithms run within the database. Additionally, TigerGraph allows for the scalable execution of graph algorithms that can abstract questions, such as who is the most influential or where are entities forming into communities within the database. The next question is, how can we combine the best from both worlds – TigerGraph and GenAI? 

TigerGraph CoPilot

TigerGraph CoPilot is an AI assistant for your TigerGraph-powered solutions and tools. It is designed to boost your productivity and simplify many of your business analytics, development and administration tasks by leveraging cutting-edge GenAI technologies. You can ask questions in natural language about your data, determine the best query needed to answer your question, run the query, and return the results based on the data you have access to. There will be more exciting functionalities added in the future releases,  such as an end-to-end graph retrieval-augmented generation (RAG) solution to build a Q&A chatbot on your own documents. We’ve included a brief roadmap at the end of this article.

CoPilot leverages the TigerGraph database, the most scalable and high-performing platform for connected data. backed by the TigerGraph database, the most scalable and performant platform for connected data. This integration offers several advantages: 1. CoPilot will be able to run graph analytics and get the insights from your connected data much faster than other LLM+graph solutions. 2. It can utilize a much larger-scale knowledge base when answering your question than other knowledge-graph powered Q&A solutions.

Responsible AI is a core design principle for TigerGraph CoPilot. Its unique approach of having the LLMs identify and run curated queries and algorithms greatly mitigates LLMs’ hallucination problem and gets more reliable results. That is especially important to non-technical users such as business analysts.

Besides, CoPilot adheres to the same role-based access control (RBAC) and security measures that are already a part of the TigerGraph database. We also provide transparency by open-sourcing CoPilot’s major components and allowing users to choose their LLM service.

Under the Hood

In a nutshell, CoPilot is a service that leverages a LLM to reason and perform sequences of tasks on the data in your TigerGraph database. For a deeper dive into the technical inspirations behind CoPilot, please refer to our previous blog post Integrating TigerGraph and Large Language Models for Generative AI. A high-level workflow of how CoPilot handles a natural-language question is below.

First, it uses the LLM to compare the question with the graph’s schema and replace entities in the question by graph elements. For example, if there is a vertex type of “BareMetalNode” and the user asks “How many servers are there?”, the question will be translated to “How many BareMetalNode vertices are there?”.

Then, the transformed question is passed to the LLM again along with available functions and GSQL queries in your TigerGraph database to identify the appropriate function to run. Continuing the example, the question “How many servers are there?” will then be converted to “getVertexCount(“BareMetalNode”)”, which is the correct function to call. By sticking with pre-defined functions and queries, CoPilot provides strong guardrails: mitigating risk of LLM’s hallucination problem, clarity of the meaning of each query, and solid understanding of the consequences. To help CoPilot find the correct query, you only need to provide a short but informative description of your GSQL queries through the process of query registration. An example will be shown in the demo later.

Finally, CoPilot executes the identified function. The result contains not only the database’s responses, but also the parsed version in natural language and the whole reasoning behind all the actions taken by CoPilot.

                             TigerGraph CoPilot’s Question-Answering Pipeline

CoPilot in Action

Let’s see how CoPilot works in action. We are using the public alpha version of CoPilot. It is now open-sourced and available at https://github.com/tigergraph/CoPilot for alpha testing. All the files for the following demo example are included there. Below we highlight a few key steps to demonstrate how to extract insights from the example digital infrastructure graph by “talking” to CoPilot. 

First, running a TigerGraph database with version 3.9+ is required. The easiest way to get a database running is through TigerGraph Cloud. Then, we use the python library pyTigerGraph to load the DigitalInfra dataset into the database. 

from pyTigerGraph.datasets import Datasets

# First download the dataset

dataset = Datasets(“DigitalInfra”)

# Then create a connection and ingest it into the database. If your database doesn’t have token authentication enabled, then set `getToken` to False. Databases on TigerGraph Cloud always have token authentication enabled.

from pyTigerGraph import TigerGraphConnection

# Create a connection to the database

conn = TigerGraphConnection(

host=“https://YOUR_DB_ADDRESS”,

username=“YOUR_DB_USERNAME”,

password=“YOUR_DB_PASSWORD”)

# Ingest

conn.ingestDataset(dataset, getToken=True)

This graph is derived from Alibaba’s Cluster Trace Program dataset, which is a large-scale but detailed dataset about Alibaba’s production data centers. We extract a small graph for demo purposes, but the graph is still representative of the architecture of real data centers. It consists of vertices such as microservices, containers and bare metal nodes, as well as the relationships between them as edges, including how microservices call each other, on which bare metal a container is deployed, and so on.

A screenshot of the graph schema is shown below.

Next, we need to set up the CoPilot service. The easiest way is to run it from its Docker image:

docker run -d -v ./configs/llm_config.json:/llm_config.json -v ./configs/db_config.json:/db_config.json –name copilot -p 80:80 tigergraphml/copilot

where llm_config.json and db_config.json

are configuration files for your LLM provider and TigerGraph database, respectively. The format for these configuration files is given in the documentation.

After CoPilot is running, we are going to start with some simple questions, such as asking how many servers are there in our example data center.

conn.ai.query(“How many servers are there?“)

If successful, you should see the following response:

{‘natural_language_response’: ‘There are 46148 servers.’,

‘answered_question’: True,

‘query_sources’: {‘function_call’: “getVertexCount(‘BareMetalNode’)”,

‘result’: 46148,

‘reasoning’: “The function getVertexCount is used because we need to count the number of vertices of a specific type, in this case ‘BareMetalNode’. The function returns the number of vertices of the specified type, which is exactly what the question is asking for.”}}

Just like LLMs choose words to build a sentence, CoPilot chooses the best database query and parameters for the situation. In this case, CoPilot chose to run ge

tVertexCount, a simple query that is built into TigerGraph. Users can also provide queries of their own. They just need to install the query into TigerGraph and register it with CoPilot.  Below we install a query that looks up microservices depending on a given microservice:

conn.gsql(“””USE GRAPH DigitalInfra

CREATE OR REPLACE DISTRIBUTED QUERY ms_dependency_chain(VERTEX<Microservice> microservice, INT depth = 3) FOR GRAPH DigitalInfra { 

  SetAccum<EDGE> @@dependency_edges;

  SetAccum<VERTEX> @@dependencies;

  start = {microservice};

  FOREACH i IN RANGE[0, depth-1] DO

    start = SELECT t FROM start:s -(reverse_CALLS:e)-> Microservice:t

            ACCUM @@dependency_edges += e

            POST-ACCUM @@dependencies += t;

  END;

  PRINT start;

  PRINT @@dependencies, @@dependency_edges;

}

INSTALL QUERY ms_dependency_chain

“””)

In order for CoPilot to use this query to answer questions regarding dependencies between the microservices, we need to provide some “hints”, or in our terminology, register the query with CoPilot by providing the following information (especially the docstring).

custom_query = {

“function_header”: “ms_dependency_chain”,

“description”: “Finds dependents of a given microservice up to k hops.”,

“docstring”: “Finds dependents of a given microservice. Useful for determining effects of downtime for upgrades or bugs. Run the query with `runInstalledQuery(‘ms_dependency_chain’, params={‘microservice’: ‘INSERT_MICROSERVICE_ID_HERE’, ‘depth’: INSERT_DEPTH_HERE})`. Depth defaults to 3.”,

“param_types”: {“microservice”: “str”, “depth”: “int”}

}

# Register the query

conn.ai.registerCustomQuery(

custom_query[“function_header”],

custom_query[“description”],

custom_query[“docstring”],

custom_query[“param_types”])

Then we can ask questions that might be more interesting to system administrators:

conn.ai.query(“What microservices are immediately impacted if microservice MS_61242 goes down?“)

CoPilot should be able to call the query to find out that microservices MS_5489, MS_35418, and MS_57548 are immediately impacted because they are direct dependents. The full result is quite long so we only attach the most relevant part here.

{

  ‘natural_language_response’: ‘The microservices that are immediately impacted if microservice MS_61242 goes down are MS_5489, MS_35418, and MS_57548.’,

‘query_sources’: {‘function_call’: “runInstalledQuery(‘ms_dependency_chain’, params={‘microservice’: ‘MS_61242’, ‘depth’: 1})”},

‘reasoning’: “The question asks for the microservices that are immediately impacted if a specific microservice goes down. This is essentially asking for the dependents of the given microservice. The ‘ms_dependency_chain’ query is designed to find the dependents of a given microservice, which is exactly what we need for this question. We set the ‘microservice’ parameter to ‘MS_61242’ as that is the microservice in question, and we set the ‘depth’ parameter to 1 as we are only interested in the microservices that are immediately impacted.“

}

If you prefer a graphical interface to writing code, the alpha version comes with a primitive chatbot interface. An improved chatbot UI will be added in the next release. Simply go to http://YOUR_COPILOT_HOST/DigitalInfra/chat , and chat with your graph.

 

What’s Next

TigerGraph CoPilot combines the best of both worlds: the reasoning and natural language capabilities of LLMs and the up-to-date rich data representations provided by the TigerGraph database. Through the data’s representation in a graph format, CoPilot can answer very complex and abstract questions even at the alpha stage, such as: find the most influential research papers, or detect a community of bad actors in a financial graph. This integration opens the door to enabling business analysts to be more productive and have richer information at their fingertips. Yet, this is just the beginning; more exciting features will be added in the next few releases including:

  • Integration with TigerGraph Cloud with a well-designed graphical user interface.
  • Ability to load your own documents to build a QA chatbot powered by advanced knowledge graph and vector hybrid retrieval technology.
  •  GSQL query generation and eventually graph schema and loading job generation.

Ready to try it out yourself? The public alpha version is available now at https://github.com/tigergraph/CoPilot. Let us know what you think, we are here at info@localhost.

 

You Might Also Like

Graph Developer Proficiency Rating

Graph Developer Proficiency Rating

June 16, 2024
Supply Chain Digital Twins Enable Analytics and Resiliency

Supply Chain Digital Twins Enable Analytics...

May 29, 2024
Putting the Customer First: The Power of the Empty Chair

Putting the Customer First: The Power...

May 17, 2024

Parker Erickson

TigerGraph Blog

  • Categories
    • blogs
      • Customer 360
      • Cybersecurity
      • Developers
      • Digital Twin
      • Engineers
      • Fraud / Anti-Money Laundering
      • GQL
      • GSQL
      • Supply Chain
      • TigerGraph
      • TigerGraph Cloud
    • Graph AI On Demand
      • Customer Spotlight
      • Digital Transformation, Management, & Strategy
      • Finance, Banking, Insurance
      • Graph + AI
      • Graph Algorithms
      • Retail, Manufacturing, and Supply Chain
    • RulesEngine
    • Video
  • Recent Posts

    • Graph Developer Proficiency Rating
    • Supply Chain Digital Twins Enable Analytics and Resiliency
    • Welcome to ENGAGE 2024!
    • Putting the Customer First: The Power of the Empty Chair
    • Join TigerGraph at ENGAGE 2024: Advancing Financial Crime Solutions
    TigerGraph

    Product

    SOLUTIONS

    customers

    RESOURCES

    start for free

    TIGERGRAPH DB
    • Overview
    • Features
    • GSQL Query Language
    GRAPH DATA SCIENCE
    • Graph Data Science Library
    • Machine Learning Workbench
    TIGERGRAPH CLOUD
    • Overview
    • Cloud Starter Kits
    • Login
    • FAQ
    • Pricing
    • Cloud Marketplaces
    USEr TOOLS
    • GraphStudio
    • TigerGraph Insights
    • Application Workbenches
    • Connectors and Drivers
    • Starter Kits
    • openCypher Support
    SOLUTIONS
    • Why Graph?
    industry
    • Advertising, Media & Entertainment
    • Financial Services
    • Healthcare & Life Sciences
    use cases
    • Benefits
    • Product & Service Marketing
    • Entity Resolution
    • Customer 360/MDM
    • Recommendation Engine
    • Anti-Money Laundering
    • Cybersecurity Threat Detection
    • Fraud Detection
    • Risk Assessment & Monitoring
    • Energy Management
    • Network & IT Management
    • Supply Chain Analysis
    • AI & Machine Learning
    • Geospatial Analysis
    • Time Series Analysis
    success stories
    • Customer Success Stories

    Partners

    Partner program
    • Partner Benefits
    • TigerGraph Partners
    • Sign Up
    LIBRARY
    • Resources
    • Benchmark
    • Webinars
    Events
    • Trade Shows
    • Graph + AI Summit
    • Million Dollar Challenge
    EDUCATION
    • Training & Certifications
    Blog
    • TigerGraph Blog
    DEVELOPERS
    • Developers Hub
    • Community Forum
    • Documentation
    • Ecosystem

    COMPANY

    Company
    • Overview
    • Careers
    • News
    • Press Release
    • Awards
    • Legal Terms
    • Patents
    • Security and Compliance
    • Contact
    Get Started
    • Start Free
    • Compare Editions
    • Online Demo - Test Drive
    • Request a Demo

    Product

    • Overview
    • TigerGraph 3.0
    • TIGERGRAPH DB
    • TIGERGRAPH CLOUD
    • GRAPHSTUDIO
    • TRY NOW

    customers

    • success stories

    RESOURCES

    • LIBRARY
    • Events
    • EDUCATION
    • BLOG
    • DEVELOPERS

    SOLUTIONS

    • SOLUTIONS
    • use cases
    • industry

    Partners

    • partner program

    company

    • Overview
    • news
    • Press Release
    • Awards

    start for free

    • Request Demo
    • take a test drive
    • SUPPORT
    • COMMUNITY
    • CONTACT
    • Copyright © 2024 TigerGraph
    • Privacy Policy
    • Linkedin
    • Twitter

    Copyright © 2020 TigerGraph | Privacy Policy

    Copyright © 2020 TigerGraph Privacy Policy

    • SUPPORT
    • COMMUNITY
    • COMPANY
    • CONTACT
    • Linkedin
    • Facebook
    • Twitter

    Copyright © 2020 TigerGraph

    Privacy Policy

    • Products
    • Solutions
    • Customers
    • Partners
    • Resources
    • Company
    • START FREE
    START FOR FREE
    START FOR FREE
    TigerGraph
    PRODUCT
    PRODUCT
    • Overview
    • GraphStudio UI
    • Graph Data Science Library
    TIGERGRAPH DB
    • Overview
    • Features
    • GSQL Query Language
    TIGERGRAPH CLOUD
    • Overview
    • Cloud Starter Kits
    TRY TIGERGRAPH
    • Get Started for Free
    • Compare Editions
    SOLUTIONS
    SOLUTIONS
    • Why Graph?
    use cases
    • Benefits
    • Product & Service Marketing
    • Entity Resolution
    • Customer Journey/360
    • Recommendation Engine
    • Anti-Money Laundering (AML)
    • Cybersecurity Threat Detection
    • Fraud Detection
    • Risk Assessment & Monitoring
    • Energy Management
    • Network Resources Optimization
    • Supply Chain Analysis
    • AI & Machine Learning
    • Geospatial Analysis
    • Time Series Analysis
    industry
    • Advertising, Media & Entertainment
    • Financial Services
    • Healthcare & Life Sciences
    CUSTOMERS
    read all success stories

     

    PARTNERS
    Partner program
    • Partner Benefits
    • TigerGraph Partners
    • Sign Up
    RESOURCES
    LIBRARY
    • Resource Library
    • Benchmark
    • Webinars
    Events
    • Trade Shows
    • Graph + AI Summit
    • Graph for All - Million Dollar Challenge
    EDUCATION
    • TigerGraph Academy
    • Certification
    Blog
    • TigerGraph Blog
    DEVELOPERS
    • Developers Hub
    • Community Forum
    • Documentation
    • Ecosystem
    COMPANY
    COMPANY
    • Overview
    • Leadership
    • Careers  
    NEWS
    PRESS RELEASE
    AWARDS
    START FREE
    Start Free
    • Request a Demo
    • SUPPORT
    • COMMUNITY
    • CONTACT
    Dr. Jay Yu

    Dr. Jay Yu | VP of Product and Innovation

    Dr. Jay Yu is the VP of Product and Innovation at TigerGraph, responsible for driving product strategy and roadmap, as well as fostering innovation in graph database engine and graph solutions. He is a proven hands-on full-stack innovator, strategic thinker, leader, and evangelist for new technology and product, with 25+ years of industry experience ranging from highly scalable distributed database engine company (Teradata), B2B e-commerce services startup, to consumer-facing financial applications company (Intuit). He received his PhD from the University of Wisconsin - Madison, where he specialized in large scale parallel database systems

    Todd Blaschka | COO

    Todd Blaschka is a veteran in the enterprise software industry. He is passionate about creating entirely new segments in data, analytics and AI, with the distinction of establishing graph analytics as a Gartner Top 10 Data & Analytics trend two years in a row. By fervently focusing on critical industry and customer challenges, the companies under Todd's leadership have delivered significant quantifiable results to the largest brands in the world through channel and solution sales approach. Prior to TigerGraph, Todd led go to market and customer experience functions at Clustrix (acquired by MariaDB), Dataguise and IBM.