diff --git a/.semversioner/1.1.1.json b/.semversioner/1.1.1.json new file mode 100644 index 0000000000..df77fa7819 --- /dev/null +++ b/.semversioner/1.1.1.json @@ -0,0 +1,14 @@ +{ + "changes": [ + { + "description": "Fix a bug on creating community hierarchy for dynamic search", + "type": "patch" + }, + { + "description": "Increase LOCAL_SEARCH_COMMUNITY_PROP to 15%", + "type": "patch" + } + ], + "created_at": "2025-01-08T21:53:16+00:00", + "version": "1.1.1" +} \ No newline at end of file diff --git a/.semversioner/next-release/patch-20250107205718575866.json b/.semversioner/next-release/patch-20250107205718575866.json deleted file mode 100644 index 089180d5c1..0000000000 --- a/.semversioner/next-release/patch-20250107205718575866.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "patch", - "description": "Increase LOCAL_SEARCH_COMMUNITY_PROP to 15%" -} diff --git a/CHANGELOG.md b/CHANGELOG.md index 472e849763..3620bf71db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Changelog Note: version releases in the 0.x.y range may introduce breaking changes. +## 1.1.1 + +- patch: Fix a bug on creating community hierarchy for dynamic search +- patch: Increase LOCAL_SEARCH_COMMUNITY_PROP to 15% + ## 1.1.0 - minor: Make gleanings independent of encoding diff --git a/graphrag/query/context_builder/dynamic_community_selection.py b/graphrag/query/context_builder/dynamic_community_selection.py index c21179d23e..2a101f6ca3 100644 --- a/graphrag/query/context_builder/dynamic_community_selection.py +++ b/graphrag/query/context_builder/dynamic_community_selection.py @@ -58,19 +58,22 @@ def __init__( self.reports = {report.community_id: report for report in community_reports} # mapping from community to sub communities self.node2children = { - community.id: ( + community.short_id: ( [] if community.sub_community_ids is None - else community.sub_community_ids + else [str(x) for x in community.sub_community_ids] ) for community in communities + if community.short_id is not None } + # mapping from community to parent community self.node2parent: dict[str, str] = { sub_community: community for community, sub_communities in self.node2children.items() for sub_community in sub_communities } + # mapping from level to communities self.levels: dict[str, list[str]] = {} @@ -182,5 +185,6 @@ async def select(self, query: str) -> tuple[list[CommunityReport], dict[str, Any llm_info["prompt_tokens"], llm_info["output_tokens"], ) + llm_info["ratings"] = ratings return community_reports, llm_info diff --git a/pyproject.toml b/pyproject.toml index 5395c6b5b7..941c38f2d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "graphrag" # Maintainers: do not change the version here manually, use ./scripts/release.sh -version = "1.1.0" +version = "1.1.1" description = "GraphRAG: A graph-based retrieval-augmented generation (RAG) system." authors = [ "Alonso Guevara Fernández ",