You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

settings.yaml 3.5 kB

Graphrag integration (#4612) * add initial global search draft * add graphrag dep * fix local search embedding * linting * add from config constructor * remove draft notebook * update config factory and add docstrings * add graphrag sample * add sample prompts * update readme * update deps * Add API docs * Update python/samples/agentchat_graphrag/requirements.txt * Update python/samples/agentchat_graphrag/requirements.txt * update docstrings with snippet and doc ref * lint * improve set up instructions in docstring * lint * update lock * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * add unit tests * update lock * update uv lock * add docstring newlines * stubs and typing on graphrag tests * fix docstrings * fix mypy error * + linting and type fixes * type fix graphrag sample * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_global_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * Update python/samples/agentchat_graphrag/requirements.txt Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> * update overrides * fix docstring client imports * additional docstring fix * add docstring missing import * use openai and fix db path * use console for displaying messages * add model config and gitignore * update readme * lint * Update python/samples/agentchat_graphrag/README.md * Update python/samples/agentchat_graphrag/README.md * Comment remaining azure config --------- Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. ### This config file contains required core defaults that must be set, along with a handful of common optional settings.
  2. ### For a full list of available settings, see https://microsoft.github.io/graphrag/config/yaml/
  3. ### LLM settings ###
  4. ## There are a number of settings to tune the threading and token limits for LLM calls - check the docs.
  5. encoding_model: cl100k_base # this needs to be matched to your model!
  6. llm:
  7. api_key: null
  8. type: openai_chat # or azure_openai_chat
  9. model: gpt-4o
  10. model_supports_json: true # recommended if this is available for your model.
  11. # audience: "https://cognitiveservices.azure.com/.default"
  12. # api_base: https://<resource-name>.openai.azure.com
  13. # api_version: 2024-08-01-preview
  14. # deployment_name: gpt-4o
  15. parallelization:
  16. stagger: 0.3
  17. # num_threads: 50
  18. async_mode: threaded # or asyncio
  19. embeddings:
  20. async_mode: threaded # or asyncio
  21. vector_store:
  22. type: lancedb
  23. db_uri: 'data/output/lancedb'
  24. container_name: default
  25. overwrite: true
  26. llm:
  27. api_key: null
  28. type: openai_embedding # or azure_openai_embedding
  29. model: text-embedding-3-small
  30. # api_base: https://<resource-name>.openai.azure.com
  31. # api_version: "2023-05-15"
  32. # audience: "https://cognitiveservices.azure.com/.default"
  33. # deployment_name: text-embedding-3-small
  34. ### Input settings ###
  35. input:
  36. type: file # or blob
  37. file_type: text # or csv
  38. base_dir: "data/input"
  39. file_encoding: utf-8
  40. file_pattern: ".*\\.txt$"
  41. chunks:
  42. size: 1200
  43. overlap: 100
  44. group_by_columns: [id]
  45. ### Storage settings ###
  46. ## If blob storage is specified in the following four sections,
  47. ## connection_string and container_name must be provided
  48. cache:
  49. type: file # or blob
  50. base_dir: "cache"
  51. reporting:
  52. type: file # or console, blob
  53. base_dir: "logs"
  54. storage:
  55. type: file # or blob
  56. base_dir: "data/output"
  57. ## only turn this on if running `graphrag index` with custom settings
  58. ## we normally use `graphrag update` with the defaults
  59. update_index_storage:
  60. # type: file # or blob
  61. # base_dir: "update_output"
  62. ### Workflow settings ###
  63. skip_workflows: []
  64. entity_extraction:
  65. prompt: "prompts/entity_extraction.txt"
  66. entity_types: [organization,person,geo,event]
  67. max_gleanings: 1
  68. summarize_descriptions:
  69. prompt: "prompts/summarize_descriptions.txt"
  70. max_length: 500
  71. claim_extraction:
  72. enabled: false
  73. prompt: "prompts/claim_extraction.txt"
  74. description: "Any claims or facts that could be relevant to information discovery."
  75. max_gleanings: 1
  76. community_reports:
  77. prompt: "prompts/community_report.txt"
  78. max_length: 2000
  79. max_input_length: 8000
  80. cluster_graph:
  81. max_cluster_size: 10
  82. embed_graph:
  83. enabled: false # if true, will generate node2vec embeddings for nodes
  84. umap:
  85. enabled: false # if true, will generate UMAP embeddings for nodes
  86. snapshots:
  87. graphml: false
  88. raw_entities: false
  89. top_level_nodes: false
  90. embeddings: false
  91. transient: false
  92. ### Query settings ###
  93. ## The prompt locations are required here, but each search method has a number of optional knobs that can be tuned.
  94. ## See the config docs: https://microsoft.github.io/graphrag/config/yaml/#query
  95. local_search:
  96. prompt: "prompts/local_search_system_prompt.txt"
  97. global_search:
  98. map_prompt: "prompts/global_search_map_system_prompt.txt"
  99. reduce_prompt: "prompts/global_search_reduce_system_prompt.txt"
  100. knowledge_prompt: "prompts/global_search_knowledge_system_prompt.txt"
  101. drift_search:
  102. prompt: "prompts/drift_search_system_prompt.txt"