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

GraphRAG Local Search #528

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
604ab0e
GraphRAG Global Search
benolt Jul 31, 2024
123bbb7
global search, open ai chat
benolt Aug 1, 2024
f22dd6b
read indexer entities, indexer reports
benolt Aug 2, 2024
df03fce
build community context batch 1
benolt Aug 7, 2024
e23dd8f
build community context, global search test
benolt Aug 8, 2024
43174eb
add prompts, global search adjustments
benolt Aug 9, 2024
88ecbcc
read indexer entities and reports improvements, compute community wei…
benolt Aug 13, 2024
b3a0b92
improvements, disable global search test
benolt Aug 13, 2024
327c996
decouple openai tokenizer
benolt Aug 15, 2024
9b66f2d
test global search with llama 3.1
benolt Aug 16, 2024
ecb3b74
GraphRAG Local Search
benolt Aug 15, 2024
6a59c03
mixed context, entities, community reports
benolt Aug 21, 2024
b38fe3b
local context, relationships
benolt Aug 22, 2024
af79dc8
build local context, text unit context, relationships
benolt Aug 23, 2024
863e066
vector store, lancedb connect
benolt Aug 26, 2024
114b9a6
similarity search, read relationships, text units
benolt Aug 27, 2024
711ccd3
test local search with openai, adjustments
benolt Aug 28, 2024
888c6ba
test context
benolt Aug 29, 2024
55860bb
lancedb search by vector u;dates
benolt Aug 30, 2024
fabaecb
test with ollama, adjust relationships
benolt Sep 2, 2024
b3c5ddb
ollama search adjustments, fix build text unit context
benolt Sep 3, 2024
2596319
Merge remote-tracking branch 'origin/main' into bence/graphrag-local-…
benolt Sep 3, 2024
190f071
fix ollama embed url
benolt Sep 5, 2024
fb53543
update ollama test
benolt Sep 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,173 changes: 1,113 additions & 60 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ members = [
"shinkai-libs/shinkai-dsl",
"shinkai-libs/shinkai-sheet",
"shinkai-libs/shinkai-fs-mirror",
"shinkai-libs/shinkai-graphrag",
"shinkai-libs/shinkai-message-primitives",
"shinkai-libs/shinkai-ocr",
"shinkai-libs/shinkai-tcp-relayer",
"shinkai-libs/shinkai-vector-resources",
"shinkai-bin/*",
"shinkai-cli-tools/*"
]
, "shinkai-libs/shinkai-graphrag"]
resolver = "2"

[workspace.package]
Expand Down
2 changes: 2 additions & 0 deletions shinkai-libs/shinkai-graphrag/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode
dataset
27 changes: 27 additions & 0 deletions shinkai-libs/shinkai-graphrag/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[package]
name = "shinkai-graphrag"
version = "0.1.0"
edition = "2021"

[dependencies]
anyhow = "1.0.86"
arrow = "52.1"
arrow-array = "52.1"
arrow-schema = "52.1"
async-trait = "0.1.74"
futures = "0.3.30"
lancedb = "0.8.0"
polars = { version = "0.41.3", features = ["dtype-struct", "is_in", "lazy", "parquet"] }
polars-lazy = "0.41.3"
rand = "0.8.5"
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.117"
tokio = { version = "1.36", features = ["full"] }
uuid = { version = "1.6.1", features = ["v4"] }

[dev-dependencies]
async-openai = "0.23.4"
ndarray = "0.16.1"
ndarray-stats = "0.6.0"
reqwest = { version = "0.11.26", features = ["json"] }
tiktoken-rs = "0.5.9"
5 changes: 5 additions & 0 deletions shinkai-libs/shinkai-graphrag/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Shinkai GraphRAG

Rust implementation of GraphRAG Global and Local search. Documentation can be found [here](https://microsoft.github.io/graphrag/).

See `tests` to see how to configure and use them.
Loading
Loading