Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Palimpzest Recipes: How to Consume a Knowledge Graph #107

Open
mikecafarella opened this issue Feb 4, 2025 · 2 comments
Open

Palimpzest Recipes: How to Consume a Knowledge Graph #107

mikecafarella opened this issue Feb 4, 2025 · 2 comments
Assignees

Comments

@mikecafarella
Copy link
Collaborator

mikecafarella commented Feb 4, 2025

We should create a series of short "Palimpzest Recipes". These will be short 1-2 page documents that show how to accomplish a commonly-wished-for goal.

If PZ is perfect, this is basically a documentation task. But of course PZ probably has a lot of problems, which we will only realize when we try to write the "easy story on how to do X" and realize that we can't do it. So accomplishing this task will sometimes mean just writing a doc, but will often mean doing some design and writing code.

In this case, the Goal is: HOW TO CONSUME A KNOWLEDGE GRAPH.

This is a lot like the How To Use a Database example. The basic idea is that we want to build a RAG-style task where the backing data comes from a source that isn't a RAG system. Instead we want to use information in a Knowledge Graph to answer the user question.

This will be a live KG system, in which we use a service to query the knowledge graph. (The alternative would be one in which the KG has been downloaded and indexed; that can be a good idea, but let's not do that for the moment)

Let's use the Musicbrainz knowledge graph. We should have a system in which:

  1. The system ingests a set of music questions
  2. For each question, we write a Musicbrainz graph query that can answer the question
  3. The graph query is executed and gets some information back
  4. We compose a new prompt that includes the KG information
  5. We answer the new question and give the answer

Part of the challenge in building this system is composing KG queries that are a bit complicated. Like "Who played instrument X on all songs released by artist Y in year Z?"

@mdr223
Copy link
Collaborator

mdr223 commented Feb 19, 2025

  1. Pick a knowledge graph
  2. Pick a query you want to run
  3. Come up with a plan to ingest the KG with a DataReader
  4. Describe a high-level PZ program that should run and answer your query

@mdr223
Copy link
Collaborator

mdr223 commented Feb 26, 2025

TODO (@mdr223 ): create DataReader User Guide

  1. Using MusicBrainz KG via API
  2. "Name of artists who worked w/artist X, and who meets some condition"
  3. Thin wrapper around API
  4. PZ program looks good at a high-level

Next Steps:

  • Implement initial DataReader
  • Use URL to fetch wikipedia doc
  • apply a single filter to filter out artists

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants