Releases: severian42/GraphRAG-Local-UI
API and new Indexing/Prompt Tuning app!
GraphRAG-Local-UI v1.0.12 - API-Centric Architecture and Indexing/Prompt Tuning UI
Overview
This release marks a significant shift in the GraphRAG project architecture, moving towards an API-centric design that separates the indexing process from querying. This new approach provides a more robust, scalable, and flexible framework for working with GraphRAG.
Key Changes
1. Introduction of api.py
I've introduced a new api.py
file that serves as the central hub for all GraphRAG operations. This FastAPI-based server provides endpoints for:
- Chat completions (supporting various models)
- Indexing operations
- Prompt tuning
- Model listing
- Health checks
This API-first approach allows for better integration with various front-ends and services, enhancing the overall flexibility of the system.
2. New Indexing UI (index_app.py
)
To complement the API, I've developed a dedicated Gradio-based user interface for managing indexing and prompt tuning processes. This UI (index_app.py
) offers:
- Intuitive controls for configuring and running indexing tasks
- A separate interface for prompt tuning
- Data management capabilities for input files and output folders
- Real-time status updates and logs
3. Separation of Concerns
By decoupling the indexing process from querying, I've achieved:
- Better resource management: Indexing and querying can now be scaled independently
- Improved maintainability: Each component (API, indexing UI, future query UI) can be developed and updated separately
- Enhanced flexibility: The API can be easily integrated with various front-ends or services
New Features
- API Endpoints: New endpoints for indexing, prompt tuning, and status checks
- Background Tasks: Long-running operations like indexing and prompt tuning are now handled as background tasks
- Configurable Settings: Easy configuration through environment variables and YAML files
- Improved Error Handling: Comprehensive error catching and logging throughout the API and UI
- File Management: Built-in tools for managing input files and exploring output data
Upgrade Instructions
- Update your local repository to access the new files (
api.py
andindex_app.py
) - Install new dependencies:
pip install fastapi uvicorn gradio pyyaml
- Set up the required environment variables as detailed in the README
- Start the API server:
python api.py
- Launch the indexing UI:
python index_app.py
Future Directions
This release lays the groundwork for further enhancements, including:
- A dedicated querying UI that interacts with the API
- Extended API capabilities for more granular control over GraphRAG operations
- Improved documentation and examples for API usage
Closing Thoughts
This architectural shift represents a significant step forward for the GraphRAG project. By embracing an API-centric design, I've set the stage for more scalable, maintainable, and flexible development in the future. I'm excited to see how this new approach will enable novel use cases and integrations for GraphRAG. The original app.py doesn't use the new API, just to note.
This shift took inspiration and used the GraphRAG4OpenWebUI repository by win4r (https://github.com/win4r/GraphRAG4OpenWebUI) as a starting point for the API implementation. The original work provided valuable insights into integrating Microsoft's GraphRAG technology with Open WebUI, which helped shape the foundation of this API-centric approach.
Indexing works! Bug fixes and UI improvemnents
What's Changed
Updates
This update introduces several significant updates and improvements to the GraphRAG-Local-UI project:
Major Changes
-
Local Model Support Enhancement: Improved compatibility with local models, particularly for embedding. Added a note that embedding providers using a /v1/embeddings endpoint work best currently. Switch your Ollama embeddings to 14434/api (even if you get an error in Gradio, it will still set the correct tag)
-
Indexing Process Overhaul:
- Significant updates to the indexing workflow to better handle various LLM and embedder configurations.
- Improved error handling and logging for easier debugging of indexing issues.
-
Configuration Updates:
- Added example configuration files and environment variable templates.
- Updated
settings.yaml
and addedsettings-example.yaml
for easier setup.
-
Input Processing:
- Removed outdated input files.
- Added a new sample document about tree frog adhesion biomimetics.
-
Output Structure Reorganization:
- Implemented a new structure for output artifacts and reports.
- Added new output folders with updated artifacts and logs.
-
Caching Mechanism:
- Implemented caching for text embeddings and summarizations to improve performance.
-
UI and Visualization Improvements:
- Enhanced graph visualization capabilities.
- Updated the app.py file with new functionalities for the interactive UI.
Minor Changes
- Updated README.md with more detailed information about the project status, installation process, and known issues.
- Refined error messages and logging throughout the codebase.
- Updated default configuration values in
graphrag/config/defaults.py
. -
- fix:'gbk' codec can't decode byte 0x8c by @Ikaros-521 in #42
Bug Fixes
- Addressed several issues in the indexing process, particularly related to empty nodes/data frames when unpacking.
- Fixed encoding/UTF errors that were occurring on Windows systems.
Development Notes
- This update represents a major work in progress. Users should expect some instability and potential bugs, especially in the indexing process.
- The changes aim to make the application more robust with local LLMs, but further testing and refinement are needed.
- Feedback and bug reports from users are highly encouraged to help improve the system.
Next Steps
- Continue stabilizing the indexing process.
- Further optimize the workflow for various LLM and embedder configurations.
- Enhance documentation and user guides.
- Address any new issues that arise from these changes.
New Contributors
- @Ikaros-521 made their first contribution in #42
Full Changelog: v1.0...v1.01
Major update and name change to GraphRAG-Local-UI
Major update and name change to GraphRAG-Local-UI
Here's a summary of the key changes in this release. This release significantly enhances the functionality and user experience of GraphRAG Local, making it more versatile and easier to use with local language models:
-
Major UI and functionality updates:
- New interactive user interface with comprehensive features
- Support for local models and OpenAI-compatible APIs
- Real-time 2D/3D graph visualization
- Enhanced file and settings management
- Improved querying capabilities
-
Expanded compatibility:
- LLM agnostic: Support for Ollama and custom base URLs/models
- Flexible embedding options
-
New features:
- Custom configurable graph visuals
- Preset query/indexing library options
- Improved error handling and logging
-
Documentation updates:
- Revised installation and setup instructions
- Updated usage guide for new UI features
- Expanded troubleshooting section
-
Backend improvements:
- Numerous bug fixes and optimizations
- Updated dependencies and requirements
-
Roadmap updates:
- Added recently completed features
- Outlined upcoming planned improvements
-
File changes:
- Major updates to app.py and other core files
- New cache and output files from testing
- Updated settings.yaml and requirements.txt
-
Removed visualize-graphml.py as functionality is now integrated into the main app
Enhance indexing and querying functionalities
- Updated
index_graph
function to include detailed progress tracking and multi-threaded output handling. - Improved
run_query
andsend_message
functions to handle model parameters and exceptions robustly. - Refactored UI components for better user interaction:
- Removed redundant
root_dir
parameter from several functions. - Enhanced folder and file selection interactions in the indexing outputs tab.
- Improved feedback and status updates for file operations and indexing progress.
- Removed redundant
- Added progress bar and detailed logging for indexing process.
- Set up global
root_dir
value for consistent directory handling. - Minor bug fixes and performance optimizations.
Changes:
- Modified
index_graph
to provide real-time progress updates. - Refactored
send_message
to streamline query execution and error handling. - Improved
update_visualization
,update_output_folder_list
,update_folder_content_list
,handle_content_selection
, andinitialize_selected_folder
for better user experience. - Updated UI elements in the GraphRAG Local UI for clarity and usability.
Reviewed and tested all changes to ensure stability and performance improvements.
GraphRAG v0.09 Quick Update to address bugs
This update should solve the issues with indexing and creating the needed output files.
Bug Fix/UI Update
-Fixed bugs related to Local/Global query and Direct chat
-Updated Gradio UI to the recent version needs
-UI improvements
-Progress Bar for Indexing along with real-time terminal logging
How to query the generated graph:
-If you are able to run the Indexing with no errors you will end up with the full output files.
-Once you have those, you will need to initialize the folder within the Index Management tab.
-Once you have initialized (should be 20 items in total) it will make the graph available to query with the LLM