Member-only story

Automatic Knowledge RAG with R2R

Minyang Chen
18 min readJul 16, 2024

--

This is part two of Demystify Knowledge RAG frameworks. In our previous writing, we explored Knowledge RAG concepts, Microsoft GraphRAG data ingestion, and query capability. In this writing, we are going to continue exploring the use of SciPhi-AI/R2R, an open-source RAG engine, to perform automatic knowledge graph construction on file ingestion. Here, we explore R2R/GraphRAG capabilities and then take a look at a few approaches on converting unstructured text into structured data.

What is R2R?

RAG to Riches (R2R) is a tool that provides powerful document ingestion, search, and RAG capabilities with tone of useful features, including:

  • Document Ingestion and Management
  • LLM-Power Search (Vector, Hybrid and Knowledge Graph)
  • User Management
  • Observability and Analytics
  • Dashboard UI

R2R offer Hypothetical Document Embedding (HyDE)- an advance techniques that significantly enhances RAG performance. By chaining multi-search pipelines result such as keyword search, vector search, similarity search into RAG for final response generation. Additionally, it support search ranking, local RAG, multiple LLM and advance RAG.

R2R / Local GraphRAG

in R2R Knowledge graph are created with local systems using the newly rleased Triplex Model.

Triplex — SOTA LLM for Knowledge Graphs

An open-source model for 10x cheaper knowledge graph construction. see here for more details: https://www.sciphi.ai/blog/triplex

The model converts simple sentences into lists of “semantic triples,” a format for expressing graph data, see example below:

input text-1:

Paris is the capital of France`
# Inputs
# Entity Types <- CITY, COUNTRY
# Relationships <- CAPITAL_OF, LOCATED_IN
# Text <- Paris is the capital of France

# Output -> (subject > predicate > object)
CITY: Paris > CAPITAL_OF > COUNTRY: France
CITY: Paris > LOCATED_IN > COUNTRY: France

Input text-2:

Vincent van Gogh, a post-impressionist painter, created "The Starry Night" in 1889. This iconic artwork, with its swirling clouds, brilliant stars, and crescent moon, exemplifies the artist's unique style and emotional intensity. Van Gogh's bold use of color and expressive…

--

--

Minyang Chen
Minyang Chen

Written by Minyang Chen

Enthusiastic in AI, Cloud, Big Data and Software Engineering. Sharing insights from my own experiences.

Responses (4)

Write a response