-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
feat: add graph_stores, impl Simple KG & Nebula KG #2581
Merged
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
4ade800
feat: add graph_stores, impl Simple KG & Nebula KG
wey-gu 7013518
fix logan-markewich's comments
wey-gu 33c523a
chore: fix lint and ut regression
wey-gu 176df86
SimpleGrpahStore from_persist_path lagacy kg json file
wey-gu 06f4dad
improve legacy support
logan-markewich e56ec5f
linting
logan-markewich a7f2c46
modify attribute name
logan-markewich 7a4e802
Merge branch 'main' into external_kg
logan-markewich f903d43
typing
logan-markewich 7d50fc9
address simon comments
logan-markewich File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
262 changes: 162 additions & 100 deletions
262
docs/examples/index_structs/knowledge_graph/KnowledgeGraphDemo.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
764 changes: 764 additions & 0 deletions
764
docs/examples/index_structs/knowledge_graph/NebulaGraphKGIndexDemo.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
docs/examples/index_structs/knowledge_graph/storage/graph_store.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"graph_dict": {"I": [["wrote", "short stories"], ["wrote", "programs"], ["applied to", "grad schools"], ["realized that", "AI was a hoax"], ["took art classes at", "Harvard"], ["was in a PhD program in", "computer science"], ["applied to", "RISD"], ["applied to", "Accademia di Belli Arti"], ["remember that I answered", "essay question by writing about Cezanne"], ["was quitting to", "paint"], ["had burned", "4 years"], ["resumed", "life"], ["was", "rich"], ["would tell", "them"], ["went straight from", "batch processing"], ["went straight from", "microcomputers"]], "microcomputers": [["changed", "everything"]], "TRS-80": [["was", "gold standard"]], "SHRDLU": [["is", "intelligent computer"]], "Terry Winograd": [["using", "SHRDLU"]], "Its brokenness": [["generated", "opportunities"]], "Computer Science": [["is", "uneasy alliance"]], "building things": [["is", "more exciting"]], "programs": [["are", "obsolete"]], "paintings": [["last", "hundreds of years"]], "The students and faculty": [["would adhere outwardly", "to the conventions of a 19th century atelier"]], "you": [["want to", "paint"]], "still life": [["you can copy", "pixel by pixel"]], "Interleaf": [["is", "company"], ["makes software for", "creating documents"]], "technology companies": [["is better run by", "product people"]], "code": [["is edited by too many people", "leads to bugs"]], "cheap office space": [["is no bargain if", "depressing"]], "planned meetings": [["are inferior to", "corridor conversations"]], "Asterix comics": [["begin with", "zooming in on a tiny corner"], ["turn out not to be controlled by", "the Romans"]], "Yorkville": [["is", "tiny corner"], ["wasn't", "rich"]], "web": [["would be", "big deal"], ["would", "do the same for the internet"]], "software": [["ran on", "server"], ["had three main parts", "editor"], ["was written by", "I"], ["was written by", "Robert"], ["was written by", "Trevor"], ["can launch", "as soon as it's done"]], "web app": [["common", "now"]], "graduate student stipend": [["is", "seed funding"]], "WYSIWYG site builder": [["is", "site builder"]], "growth rate": [["is ultimate test of", "startup"], ["takes care of", "absolute number"]], "Yahoo": [["bought", "Viaweb"]], "Viaweb": [["was", "profitable"], ["was", "growing rapidly"]], "real estate agents": [["is", "Cambridge of New York"]], "Lisp": [["would be", "dialect"], ["would hide", "parentheses"], ["has dialects", ""], ["has dialects", ""], ["has dialects", ""], ["is", "language"], ["defined by", "writing an interpreter"], ["missing a lot of things", "added"]], "O'Reilly": [["publishes", "essays"], ["started publishing", "essays"], ["essays", "online"]], "Hackers & Painters": [["is", "book"]], "Maria Daniels": [["is", "friend"]], "Jessica Livingston": [["is", "author"]], "waste their time": [["is great spur to", "imagination"]], "the Harvard Computer Society": [["asked", "me"]], "YC": [["is", "fund"], ["is", "organization"], ["helps", "startups"], ["grew", "quickly"], ["started to notice", "other advantages"], ["became", "full-time job"], ["is", "cool thing"], ["Sam Altman took over", "2013"], ["was controlled by LLC", "2013"], ["became fund for", "couple years"], ["became fund for", "2009"], ["became fund for", "because getting so big"], ["went back to being", "self-funded"], ["went back to being", "after Heroku got bought"]], "SFP": [["is", "Summer Founders Program"], ["posted an announcement on my site", "inviting undergrads to apply"]], "Hacker News": [["was founded by", "Paul Graham"], ["is", "a website"]], "Robert Morris": [["offered", "unsolicited advice"]], "McCarthy": [["tested", "interpreter"], ["wrote", "Bel"]], "Paul Graham": [["wrote", "essay"], ["moved to", "England"], ["worked on", "Bel"]], "online store builder": [["has to launch", "privately"]], "Lisp expressions": [["editing", "code editor"]], "Y Combinator": [["renamed to", "Y Combinator"], ["renamed to", "lambda calculus"]], "HN": [["edge case", "bizarre"], ["edge case", "when you both write essays and run a forum"]]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
Knowledge Graph Retriever | ||
========================== | ||
|
||
.. automodule:: llama_index.indices.knowledge_graph.retrievers | ||
.. automodule:: llama_index.indices.knowledge_graph.retriever | ||
:members: | ||
:inherited-members: | ||
.. :exclude-members: index_struct, query, set_llm_predictor, set_prompt_helper |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"""Graph stores.""" | ||
|
||
from llama_index.graph_stores.nebulagraph import NebulaGraphStore | ||
from llama_index.graph_stores.simple import SimpleGraphStore | ||
|
||
__all__ = [ | ||
"SimpleGraphStore", | ||
"NebulaGraphStore", | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: where are these used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this just follows the same structure for the vector store registry -- is that registry used anywhere?