top of page

Rebel Plus LlamaIndex Knowledge Graph Query Engine

It works by extracting and storing triplets in the form of (subject, relation, object).

colab.research.google.com

29 Jul 2023

LlamaIndex supports building and querying across knowledge graphs. It works by extracting and storing triplets in the form of (subject, relation, object). Then at query time, keywords from the query text are used to fetch triplets and the text chunks they came from to answer queries.

The default settings will use the LLM to build the knowledge graph, which can be

  • slow

  • tons of token usage


To remedy this, you can plug in any function to replace the default triplet extraction function! In this notebook, we demonstrate using Babelscape/rebel-large to extract triplets for us. This is a lighter-weight model fine-tuned to extract triplets for a knowledge graph.

For more:

bottom of page