Skip to content

Conversation

@edlee123
Copy link
Contributor

@edlee123 edlee123 commented May 27, 2025

Description

New Feature

  • GraphRAG/docker_compose/intel/cpu/xeon/compose.yaml allows deployment of GraphRAG on cpu (xeon or laptop). It uses openai-like LLM endpoints for dataprep + retriever graph components, and vllm-cpu for final LLM.
  • GraphRAG/docker_compose/intel/cpu/xeon/README.md instructions to deploy above.
  • GraphRAG/example_data/README.md: small example of programming languages relations dataset.
  • GraphRAG/graphrag.py: - improved formatting of logs, and handle deprecation of pydantic parse_obj method.

Bug Fix

  • GraphRAG/ui/svelte/src/lib/network/chat/Network.ts previously hardcoded the model to "Intel/neural-chat-7b-v3-3" in UI request. Now is configured by environment variable.
  • GraphRAG/docker_compose/intel/hpu/gaudi/compose.yaml - related to above, configuring the model from environment variable for the UI in Gaudi deployments.
  • GraphRAG/graphrag.py: align_generator method needed to use byte format for strings to render properly in the UI. This method now aligns with ChatQnA.

Issues

N/A.

Type of change

List the type of change like below. Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Dependencies

Depends on the following:
Feature: OpenAI-compatible endpoint for text generation by edlee123 · Pull Request #1395 · opea-project/GenAIComps
Update GraphRAG dataprep and retriever components by edlee123 · Pull Request #1746 · opea-project/GenAIComps

Tests

Would want to be able to pull the updated components in Dependencies to create a test like the Gaudi version..

edlee123 added 8 commits May 23, 2025 10:58
…g improvements, and updated pydantic model validations from parse_obj to model_validate

Signed-off-by: Ed Lee <[email protected]>
…ataprep, receiver, and final output. The UI payload had to be updated since the model was hardcoded and not based on LLM_MODEL_ID

Signed-off-by: Ed Lee <[email protected]>
…LLM_MODEL_ID env variable. Before the UI request had model hardcoded.

Signed-off-by: Ed Lee <[email protected]>
Copilot AI review requested due to automatic review settings May 27, 2025 17:54
@edlee123 edlee123 requested review from ashahba and rbrugaro as code owners May 27, 2025 17:54
@github-actions
Copy link

github-actions bot commented May 27, 2025

Dependency Review

✅ No vulnerabilities or license issues found.

Scanned Files

None

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces the "GraphRAG on CPU Example" feature and a bug fix for configuring the model in the UI, along with improved logging and deprecation handling in the backend. Key changes include:

  • In GraphRAG/ui/svelte/src/lib/network/chat/Network.ts, replacing the hardcoded model with an environment variable (LLM_MODEL_ID) and adding a guard clause.
  • In GraphRAG/graphrag.py, migrating from print statements to structured logging and updating Pydantic parsing methods.
  • New and updated Docker Compose files and documentation for deploying GraphRAG on CPU (Xeon or laptop) configurations.

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
GraphRAG/ui/svelte/src/lib/network/chat/Network.ts Uses LLM_MODEL_ID from the environment instead of a hardcoded model value
GraphRAG/graphrag.py Improves logging output, replaces deprecated Pydantic parse calls with model_validate, and aligns generator output
GraphRAG/example_data/README.md Provides example datasets to test GraphRAG functionality
GraphRAG/docker_compose/intel/hpu/gaudi/compose.yaml Configures the UI to use the model from an environment variable
GraphRAG/docker_compose/intel/cpu/xeon/compose.yaml New file defining the CPU deployment configuration
GraphRAG/docker_compose/intel/cpu/xeon/README.md Offers deployment instructions and context for the CPU example
GraphRAG/docker_compose/intel/cpu/xeon/GraphRAG_LLM_notes.md Documents the roles and configuration of the three LLMs used in the application
Files not reviewed (2)
  • GraphRAG/docker_compose/intel/cpu/xeon/set_env.sh: Language not supported
  • GraphRAG/example_data/programming_languages.txt: Language not supported
Comments suppressed due to low confidence (2)

GraphRAG/graphrag.py:159

  • In the exception block of the align_generator method, consider logging the exception details (e.g., using logger.debug or logger.error) before yielding the raw JSON string. This will improve troubleshooting during debugging of LLM output processing.
yield f"data: {repr(json_str.encode('utf-8'))}\n\n"

GraphRAG/docker_compose/intel/cpu/xeon/compose.yaml:17

  • [nitpick] For consistency and clarity, consider using uppercase naming for environment variables, e.g., change to NEO4J_APOC_EXPORT_FILE_ENABLED.
- NEO4J_apoc_export_file_enabled=true

@joshuayao joshuayao added the feature New feature or request label May 29, 2025
@joshuayao joshuayao added this to the v1.4 milestone May 29, 2025
@joshuayao joshuayao added this to OPEA May 29, 2025
@joshuayao joshuayao moved this to In review in OPEA May 29, 2025
@edlee123 edlee123 force-pushed the graphrag_workshop branch from 57e301b to d50bf14 Compare June 5, 2025 22:42
@edlee123
Copy link
Contributor Author

edlee123 commented Jun 9, 2025

PR will require these updated components to work:

opea-project/GenAIComps#1395
opea-project/GenAIComps#1746

@chickenrae chickenrae self-requested a review June 9, 2025 19:45
Copy link
Collaborator

@ashahba ashahba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR looks good but I have one question:
How are the datasets created? Manually or AI Generated?

@edlee123
Copy link
Contributor Author

The PR looks good but I have one question: How are the datasets created? Manually or AI Generated?

I think I'll modify these a bit to quote directly from wiki and cite the source.

@edlee123 edlee123 requested a review from ashahba June 13, 2025 20:13
Copy link
Collaborator

@ashahba ashahba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ashahba ashahba merged commit c873c58 into opea-project:main Jun 13, 2025
15 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in OPEA Jun 13, 2025
alexsin368 pushed a commit to alexsin368/GenAIExamples that referenced this pull request Aug 13, 2025
Signed-off-by: Ed Lee <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rachel R <[email protected]>
Co-authored-by: Abolfazl Shahbazi <[email protected]>
Signed-off-by: alexsin368 <[email protected]>
cogniware-devops pushed a commit to Cogniware-Inc/GenAIExamples that referenced this pull request Dec 19, 2025
Signed-off-by: Ed Lee <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rachel R <[email protected]>
Co-authored-by: Abolfazl Shahbazi <[email protected]>
Signed-off-by: cogniware-devops <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants