|
1 | 1 | # GraphRAG for .NET |
2 | 2 |
|
| 3 | +[](https://www.nuget.org/packages/ManagedCode.GraphRag/) |
| 4 | +[](https://www.nuget.org/packages/ManagedCode.GraphRag.Neo4j/) |
| 5 | +[](https://www.nuget.org/packages/ManagedCode.GraphRag.Postgres/) |
| 6 | +[](https://www.nuget.org/packages/ManagedCode.GraphRag.CosmosDb/) |
| 7 | +[](https://www.nuget.org/packages/ManagedCode.GraphRag.JanusGraph/) |
| 8 | +[](https://github.com/managedcode/graphrag/actions) |
| 9 | +[](https://opensource.org/licenses/MIT) |
| 10 | + |
3 | 11 | GraphRAG for .NET is a ground-up port of Microsoft's GraphRAG reference implementation to the modern .NET 10 stack. The port keeps parity with the original Python pipelines while embracing native .NET idioms—dependency injection, logging abstractions, async I/O, and strongly-typed configuration. |
4 | 12 |
|
5 | 13 | > ℹ️ The upstream Python code remains available under [`submodules/graphrag-python`](submodules/graphrag-python) for side-by-side reference. Treat it as read-only unless a task explicitly targets the submodule. |
@@ -390,19 +398,19 @@ The Cosmos adapter (`ManagedCode.GraphRag.CosmosDb`) targets the SQL API and wor |
390 | 398 | 1. **Provide a connection string.** Set `COSMOS_EMULATOR_CONNECTION_STRING` or configure options manually. |
391 | 399 | 2. **Register the store.** |
392 | 400 | ```csharp |
393 | | -builder.Services.AddCosmosGraphStore("cosmos", options => |
394 | | -{ |
395 | | - options.ConnectionString = cosmosConnectionString; |
396 | | - options.DatabaseId = "GraphRagIntegration"; |
397 | | - options.NodesContainerId = "nodes"; |
398 | | - options.EdgesContainerId = "edges"; |
399 | | - options.ConfigureClientOptions = clientOptions => |
400 | | - { |
401 | | - clientOptions.GatewayModeMaxConnectionLimit = 100; |
402 | | - }; |
403 | | - options.ConfigureSerializer = serializer => serializer.PropertyNamingPolicy = null; |
404 | | -}); |
405 | | -``` |
| 401 | + builder.Services.AddCosmosGraphStore("cosmos", options => |
| 402 | + { |
| 403 | + options.ConnectionString = cosmosConnectionString; |
| 404 | + options.DatabaseId = "GraphRagIntegration"; |
| 405 | + options.NodesContainerId = "nodes"; |
| 406 | + options.EdgesContainerId = "edges"; |
| 407 | + options.ConfigureClientOptions = clientOptions => |
| 408 | + { |
| 409 | + clientOptions.GatewayModeMaxConnectionLimit = 100; |
| 410 | + }; |
| 411 | + options.ConfigureSerializer = serializer => serializer.PropertyNamingPolicy = null; |
| 412 | + }); |
| 413 | + ``` |
406 | 414 | As with other adapters, the first Cosmos store becomes the unkeyed default. If you already have a `CosmosClient`, set `options.ClientFactory` to return it and GraphRAG will reuse that instance. |
407 | 415 |
|
408 | 416 | > **Tip:** `IGraphStore` now exposes full graph inspection and mutation helpers (`GetNodesAsync`, `GetRelationshipsAsync`, `DeleteNodesAsync`, `DeleteRelationshipsAsync`) in addition to the targeted APIs (`InitializeAsync`, `Upsert*`, `GetOutgoingRelationshipsAsync`). These use the same AGE-powered primitives, so you can inspect, prune, or export the graph without dropping down to concrete implementations. |
|
0 commit comments