Félicitations !

Graph RAG avec LangChain et Neo4j

Adam Cowley

Manager, Developer Education at Neo4j

Chapitre 1

Texte Vecteur d'intégration
He's just a city boy born [0.12, -0.34, 0.56, 0.78, ..., -0.91]
born and raised in South Detroit [0.22, 0.45, -0.67, 0.11, ..., 0.33]
He took the midnight train [-0.55, 0.89, 0.12, -0.44, ..., 0.67]
going anywhere [0.78, -0.23, 0.45, 0.91, ..., -0.12]

Un diagramme en graphe montrant les entités mentionnées dans les paroles de « Don't stop believing ». Un garçon de petite ville, avec des relations BORN et RAISED vers South Detroit

Graph RAG avec LangChain et Neo4j

Chapitre 1

Le diagramme de nœuds incluant le livre et deux relations WRITTEN_BY vers des auteurs pour montrer qu'un nœud peut avoir plusieurs relations.

Graph RAG avec LangChain et Neo4j

Chapitre 1

Les résultats sont injectés dans l'invite, prêts à être envoyés au LLM

Graph RAG avec LangChain et Neo4j

Chapitre 2

Un diagramme représentant une hiérarchie : un document, des relations un-à-plusieurs vers des pages, chacune ayant plusieurs nœuds de fragments associés

act_splitter = RecursiveCharacterTextSplitter(
    # Split text into acts
    separators=[ r"\n\nTHE PROLOGUE.",  r"\n\nACT",
                 r"\n\n\*\*\* END"],
    is_separator_regex=True
)

scene_splitter = RecursiveCharacterTextSplitter(
    # Split act into scenes
    separators=[r"\nSCENE "],
    is_separator_regex=True
)
Graph RAG avec LangChain et Neo4j

Chapitre 2

Les propriétés textuelles des nœuds servent à créer une intégration

Graph RAG avec LangChain et Neo4j

Chapitre 2

Exemple de modèle de graphe de domaine : une personne travaille pour une entreprise située à une adresse. La personne détient une carte de crédit, liée à une commande passée auprès d'une entreprise au même endroit

Graph RAG avec LangChain et Neo4j

Chapitre 3

entity_resolution5.jpg

Graph RAG avec LangChain et Neo4j

Chapitre 3

 

ragas.png

 

  • Context Precision : mesure la proportion de fragments pertinents dans les documents récupérés
  • Noise Sensitivity : mesure la quantité d'information non pertinente dans les documents récupérés
Graph RAG avec LangChain et Neo4j

Chapitre 3

Graph RAG avec LangChain et Neo4j

graph_academy.png

1 https://graphacademy.neo4j.com/
Graph RAG avec LangChain et Neo4j

Passons à la pratique !

Graph RAG avec LangChain et Neo4j

Preparing Video For Download...