DSPy with Knowledge Graphs Tested (non-canned examples)
Diffbot Diffbot
3.12K subscribers
5,694 views
0

 Published On Apr 14, 2024

The DSPy (Declarative Self-improving Language Programs in Python) framework has excited the developer community with its ability to automatically optimize and enhance language model pipelines, which may reduce the need to manually fine-tune prompt templates.

We designed a custom DSPy pipeline integrating with knowledge graphs. The reason? One of the main strengths of knowledge graphs is their ability to provide rich contextual information from interconnected data, which can potentially enhance the system’s retrieval and reasoning abilities.We tested both the vanilla DSPy RAG pipeline and our customized one to see how they work, and you'll find out in the video that more surprises happened than expected. 🙃

Github repo: https://github.com/leannchen86/dspy-w...

#rag #knowledgegraphs #dspy #diffbot

0:00 Intro
0:30 DSPy introduction
1:03 Load knowledge source and build knowledge graph of Elon Musk
2:15 Vanilla DSPy RAG Pipeline
3:26 Custom DSPy pipeline with knowledge graph
4:51 First test question
5:06 1st test question with vanilla DSPy RAG
5:28 Fact-cheking with knowledge graph
6:12 1st test question with DSPy RAG + Knowledge Graph
6:24 2nd test question with vanilla DSPy RAG
8:07 Structured outputs of knowledge graphs
9:42 2nd test question with DSPy RAG + Knowledge Graph
10:54 Outro

show more

Share/Embed