|
| 1 | +--- |
| 2 | +title: Large Language Models (LLMs) and Knowledge Graphs |
| 3 | +menuTitle: Large Language Models and Knowledge Graphs |
| 4 | +weight: 133 |
| 5 | +description: >- |
| 6 | + Integrate large language models (LLMs) with knowledge graphs using ArangoDB |
| 7 | +archetype: default |
| 8 | +--- |
| 9 | +{{< description >}} |
| 10 | + |
| 11 | +Large language models (LLMs) and knowledge graphs are two prominent and |
| 12 | +contrasting concepts, each possessing unique characteristics and functionalities |
| 13 | +that significantly impact the methods we employ to extract valuable insights from |
| 14 | +constantly expanding and complex datasets. |
| 15 | + |
| 16 | +LLMs, exemplified by OpenAI's ChatGPT, represent a class of powerful language |
| 17 | +transformers. These models leverage advanced neural networks to exhibit a |
| 18 | +remarkable proficiency in understanding, generating, and participating in |
| 19 | +contextually-aware conversations. |
| 20 | + |
| 21 | +On the other hand, knowledge graphs contain carefully structured data and are |
| 22 | +designed to capture intricate relationships among discrete and seemingly |
| 23 | +unrelated information. With knowledge graphs, you can explore contextual |
| 24 | +insights and execute structured queries that reveal hidden connections within |
| 25 | +complex datasets. |
| 26 | + |
| 27 | +ArangoDB's unique capabilities and flexible integration of knowledge graphs and |
| 28 | +LLMs provide a powerful and efficient solution for anyone seeking to extract |
| 29 | +valuable insights from diverse datasets. |
| 30 | + |
| 31 | +## Knowledge Graphs |
| 32 | + |
| 33 | +A knowledge graph can be thought of as a dynamic and interconnected network of |
| 34 | +real-world entities and the intricate relationships that exist between them. |
| 35 | + |
| 36 | +Key aspects of knowledge graphs: |
| 37 | +- **Domain specific knowledge**: You can tailor knowledge graphs to specific |
| 38 | + domains and industries. |
| 39 | +- **Structured information**: Makes it easy to query, analyze, and extract |
| 40 | + meaningful insights from your data. |
| 41 | +- **Accessibility**: You can build a Semantic Web knowledge graph or using |
| 42 | + custom data. |
| 43 | + |
| 44 | +LLMs can help distill knowledge graphs from natural language by performing |
| 45 | +the following tasks: |
| 46 | +- Entity discovery |
| 47 | +- Relation extraction |
| 48 | +- Coreference resolution |
| 49 | +- End-to-end knowledge graph construction |
| 50 | +- (Text) Embeddings |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | +## ArangoDB and LangChain |
| 55 | + |
| 56 | +[LangChain](https://www.langchain.com/) is a framework for developing applications |
| 57 | +powered by language models. |
| 58 | + |
| 59 | +LangChain enables applications that are: |
| 60 | +- Data-aware (connect a language model to other sources of data) |
| 61 | +- Agentic (allow a language model to interact with its environment) |
| 62 | + |
| 63 | +The ArangoDB integration with LangChain provides you the ability to analyze |
| 64 | +data seamlessly via natural language, eliminating the need for query language |
| 65 | +design. By using LLM chat models such as OpenAI’s ChatGPT, you can "speak" to |
| 66 | +your data instead of querying it. |
| 67 | + |
| 68 | +### Get started with ArangoDB QA chain |
| 69 | + |
| 70 | +The [ArangoDB QA chain notebook](https://langchain-langchain.vercel.app/docs/use_cases/more/graph/graph_arangodb_qa.html) |
| 71 | +shows how to use LLMs to provide a natural language interface to an ArangoDB |
| 72 | +instance. |
| 73 | + |
| 74 | +Run the notebook directly in [Google Colab](https://colab.research.google.com/github/arangodb/interactive_tutorials/blob/master/notebooks/Langchain.ipynb). |
| 75 | + |
| 76 | +See also other [machine learning interactive tutorials](https://github.com/arangodb/interactive_tutorials#machine-learning). |
0 commit comments