mirror of
https://github.com/microsoft/graphrag.git
synced 2026-01-14 09:07:20 +08:00
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
workflows:
|
|
|
|
# This workflow reference here is only necessary
|
|
# because we want to customize the how the entity_extraction workflow is configured
|
|
# otherwise, it can be omitted, but you're stuck with the default configuration for entity_extraction
|
|
- name: entity_extraction
|
|
config:
|
|
entity_extract:
|
|
strategy:
|
|
type: graph_intelligence
|
|
llm:
|
|
type: openai_chat
|
|
api_key: !ENV ${EXAMPLE_OPENAI_API_KEY}
|
|
model: !ENV ${EXAMPLE_OPENAI_MODEL:gpt-3.5-turbo}
|
|
max_tokens: !ENV ${EXAMPLE_OPENAI_MAX_TOKENS:2500}
|
|
temperature: !ENV ${EXAMPLE_OPENAI_TEMPERATURE:0}
|
|
|
|
- name: entity_graph
|
|
config:
|
|
cluster_graph:
|
|
strategy:
|
|
type: leiden
|
|
embed_graph:
|
|
strategy:
|
|
type: node2vec
|
|
num_walks: 10
|
|
walk_length: 40
|
|
window_size: 2
|
|
iterations: 3
|
|
random_seed: 597832
|
|
layout_graph:
|
|
strategy:
|
|
type: umap
|
|
|
|
# This is an anonymous workflow, it doesn't have a name
|
|
- steps:
|
|
|
|
# Unpack the nodes from the graph
|
|
- verb: graph.unpack
|
|
args:
|
|
column: positioned_graph
|
|
type: nodes
|
|
input:
|
|
|
|
# This is saying use the output of the entity_graph workflow as the input to this step
|
|
source: workflow:entity_graph |