You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+61-19Lines changed: 61 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,21 +17,26 @@ For more details on the original GraphRAG implementation, please refer to the [G
17
17
-**Output Exploration:** Browse and view indexing outputs and artifacts.
18
18
-**Logging:** Real-time logging for better debugging and monitoring.
19
19
-**Flexible Querying:** Support for global, local, and direct chat queries with customizable parameters.
20
+
-**Customizable Visualization:** Adjust graph layout, node sizes, colors, and more to suit your preferences.
20
21
21
22

22
23
23
24
## 🗺️ Roadmap
24
25
25
-
### **Important Note:** GraphRAG Local UI is currently a major work in progress and building a UI around the GraphRAG library has introduced a number of challenges; mainly with the Indexing process. The query works fantastic and provides a number of ways to easily and comprehensively utilize the GraphRAG library to query your indexed data. As I strive to make the application more stable with local LLMs, users should expect to encounter some bugs and breaking changes. I appreciate your patience and feedback during this development phase. If you encounter indexing issues while running this Gradio app while I am debugging it, you can typically run it straight in the terminal with the CLI args and have it work out 80-90% of the time.
26
+
### **Important Note:** GraphRAG Local UI is currently a major work in progress and building a UI around the GraphRAG library has introduced a number of challenges; mainly with the Indexing process. The query is also a work in progress as it tends to go between functional and breaking with the changes to the GraphRAG library. As I strive to make the application more stable with local LLMs, users should expect to encounter some bugs and breaking changes. I appreciate your patience and feedback during this development phase. If you encounter indexing issues while running this Gradio app while I am debugging it, you can typically run it straight in the terminal with the CLI args and have it work out 80-90% of the time.
26
27
27
-
*The app gained traction much quicker than anticipated, so we are actively working to fix bugs and integrate suggested improvements. While it is currently functional, it has been primarily tested on a Mac Studio M2.*
28
+
*While it is currently functional, it has only been primarily tested on a Mac Studio M2.*
28
29
29
30
My vision for GraphRAG Local UI is to become the ultimate GraphRAG app for local LLMs, incorporating as many cool features and knowledge graph tools as possible. I am continuously working on improvements and new features.
30
31
31
32
### Recent Updates
33
+
-[x] Indexing Works! Fixes to the Indexing process and caching of embeddings.
32
34
-[x] LLM agnostic: Use Ollama or set your own base URL and local model for LLM and Embedder
33
35
-[x] Custom configurable graph visuals
34
36
-[x] Preset Query/Indexing library options to quickly and easily harness all the GraphRAG args
37
+
-[x] Enhanced UI with tabbed interface for better organization
38
+
-[x] Improved file management system
39
+
-[x] Real-time indexing progress and control
35
40
36
41
### Upcoming Features
37
42
-[ ] Dockerfile for easier deployment
@@ -85,10 +90,14 @@ Follow these steps to set up and run GraphRAG Local with Interactive UI:
85
90
1. **File Upload:**
86
91
- Navigate to the "Data Management" tab.
87
92
- Use the "File Upload" section to upload .txt files to the input directory.
93
+
- Click the "Upload File" button to add your file to the system.
88
94
89
95
2. **File Management:**
90
96
- View, edit, and delete uploaded files in the "File Management" section.
91
-
- Use the "Refresh File List" button to update the list of available files.
97
+
- Use the dropdown to selecta file, then view its content in the text area below.
98
+
- Edit the file content directly in the text area and click "Save Changes" to update.
99
+
- Use the "Delete Selected File" button to remove a file from the system.
100
+
- Click "Refresh File List" to update the list of available files.
92
101
93
102
### Indexing
94
103
@@ -102,67 +111,100 @@ Follow these steps to set up and run GraphRAG Local with Interactive UI:
102
111
- Click "Run Indexing" to start the indexing process.
103
112
- Monitor progress in real-time through the output box and progress bar.
104
113
- Use "Stop Indexing"if you need to halt the process.
114
+
- The "Refresh Indexing" button allows you to reset the indexing process if needed.
105
115
106
-
### KG Chat/Outputs
116
+
3. **Custom CLI Arguments:**
117
+
- For advanced users, you can add custom CLI arguments in the provided text area.
118
+
- Refer to the CLI Argument Key Guide for available options.
119
+
120
+
### Indexing Outputs/Visuals
107
121
108
122
1. **Explore Indexed Data:**
109
123
- Select an output folder from the dropdown.
110
124
- Browse through the folder contents and view file information and content.
125
+
- Use the "Initialize Selected Folder" button to load the contents of a specific output folder.
111
126
112
127
2. **Visualize Graph:**
113
128
- Select a GraphML file from the output folder.
114
129
- Click "Visualize Graph" to generate a 2D or 3D visualization of your knowledge graph.
115
-
- Customize the visualization using the "Visualization Settings" accordion.
130
+
- Customize the visualization using the "Visualization Settings" accordion:
131
+
- Choose between 3D Spring, 2D Spring, or Circular layouts
132
+
- Adjust node size, edge width, and label size
133
+
- Select node color attributes and color schemes
134
+
- Toggle node labels on/off
116
135
117
136
### LLM Settings
118
137
119
138
1. **Configure LLM and Embeddings:**
120
139
- Set API base URLs and keys for both LLM and embeddings.
121
140
- Choose the service type (OpenAI-compatible or Ollama).
122
-
- Select models from the dropdown or refresh the list.
141
+
- Select models from the dropdown or refresh the list of available models.
123
142
124
143
2. **Adjust Parameters:**
125
144
- Set the system message, context window, temperature, and max tokens.
126
145
- Click "Update LLM Settings" to save your changes.
127
146
147
+
### YAML Settings
148
+
149
+
- Adjust additional GraphRAG settings in the "YAML Settings" tab as needed.
150
+
- Each setting is presented in an accordion for easy access and editing.
151
+
128
152
### Querying
129
153
130
154
1. **Choose Query Type:**
131
155
- Select between global, local, or direct chat queries.
132
156
133
157
2. **Select Preset or Custom Options:**
134
158
- Choose a preset query option or customize your query parameters.
159
+
- Presets include options like "Default Global Search", "Detailed Local Analysis", "Quick Global Summary", etc.
160
+
- For custom queries, you can adjust community level, response type, and add custom CLI arguments.
135
161
136
162
3. **Enter Your Query:**
137
163
- Type your query in the input box and click "Send Query" or press Shift+Enter.
138
164
139
165
4. **View Results:**
140
166
- See the chat history and responses in the chat interface.
167
+
- The chat history is preserved between queries for context.
141
168
142
-
### Other Settings
169
+
5. **Clear Chat:**
170
+
- Use the "Clear Chat" button to reset the conversation history.
143
171
144
-
- Adjust additional GraphRAG settings in the "YAML Settings" tab as needed.
172
+
### Graph Visualization
173
+
174
+
1. **Select Output Folder and GraphML File:**
175
+
- Choose the output folder and GraphML file you want to visualize.
145
176
146
-
## 🛠️ Customization
177
+
2. **Customize Visualization:**
178
+
- Use the "Visualization Settings" accordion to adjust various aspects of the graph:
179
+
- Layout Type: Choose between 3D Spring, 2D Spring, or Circular layouts.
180
+
- Node Size: Adjust the size of nodes in the graph.
181
+
- Edge Width: Change the thickness of edges connecting nodes.
182
+
- Node Color Attribute: Color nodes based on their degree or randomly.
183
+
- Color Scheme: Select from various color palettes for node coloring.
184
+
- Show Node Labels: Toggle the visibility of node labels.
185
+
- Label Size: Adjust the size of node labels.
147
186
148
-
Users can experiment with different models and settings:
187
+
3. **Generate Visualization:**
188
+
- Click the "Visualize Graph" button to create the graph based on your settings.
149
189
150
-
- For OpenAI-compatible APIs: Use any model compatible with the OpenAI API format.
151
-
- For Ollama: Use models like llama2, mistral, phi-2, etc. Find the complete list of Ollama models [here](https://ollama.com/library).
190
+
4. **Interact with the Graph:**
191
+
- Once generated, you can interact with the 3D graph by rotating, zooming, and panning.
192
+
- Hover over nodes to see additional information.
152
193
153
194
## 📊 Visualization
154
195
155
196
The UI includes a 2D/3D graph visualization feature:
156
197
157
198
1. Run indexing on your data.
158
-
2. Go to the "KG Chat/Outputs" tab.
199
+
2. Go to the "Indexing Outputs/Visuals" tab.
159
200
3. Select the latest output folder and navigate to the GraphML file.
160
201
4. Click the "Visualize Graph" button.
161
-
5. Customize the visualization using the settings provided.
202
+
5. Customize the visualization using the settings providedin the "Visualization Settings" accordion.
162
203
163
204
## 🚀 Advanced Usage
164
205
165
-
- **Custom CLI Arguments:** In the query interface, advanced users can add custom CLI arguments for more granular control over the query process.
206
+
- **Custom CLI Arguments:** In both the indexing and query interfaces, advanced users can add custom CLI arguments for more granular control over the processes.
207
+
- **LLM and Embeddings Configuration:** You can configure different models and APIs for LLM and embeddings separately, allowing for flexible setups.
166
208
167
209
## 📚 Citations
168
210
@@ -172,10 +214,10 @@ The UI includes a 2D/3D graph visualization feature:
172
214
173
215
## Troubleshooting
174
216
175
-
- If you can't run `gradio app.py`, try running `pip install --upgrade gradio` and then exit out and start a new terminal. It should then load and launch properly as a Gradio app
217
+
- If you can't run `gradio app.py`, try running `pip install --upgrade gradio` and then exit out and start a new terminal. It should then load and launch properly as a Gradio app.
176
218
177
-
- On Windows, if you run into and encoding/UTF error, you can change it to the correct format in the YAML Settings menu
219
+
- On Windows, if you run into an encoding/UTF error, you can change it to the correct format in the YAML Settings menu.
178
220
179
-
- Indexing Errors: These are still tough to debug a track down as it is dependant on your specific pipeline of llms and embedders. Right now it seems to call /v1/embeddings no matter what in the Index workflow, but I think I found a workaround that allows Ollama and other local options. I'll keep trying to reenforce the Indexing process to make it more stable and robust.
221
+
- Indexing Errors: These are still tough to debug and track down as it is dependent on your specific pipeline of LLMs and embedders. Right now it seems to call /v1/embeddings no matter what in the Index workflow, but I think I found a workaround that allows Ollama and other local options. I'll keep trying to reinforce the Indexing process to make it more stable and robust.
180
222
181
-
For any issues or feature requests, please open an issue on the GitHub repository. Happy knowledge graphing!
223
+
For any issues or feature requests, please open an issue on the GitHub repository. Happy knowledge graphing!
0 commit comments