Skip to content

Commit b38d9f3

Browse files
rbrugaropre-commit-ci[bot]ashahba
authored
GraphRAG README/compose fixes post refactor (#1221)
* GraphRAG README/compose fixes post refactor - Move env settings from set_env.sh script to README body - Description improvements - Fix tgi settings in docker compose file Signed-off-by: rbrygaro <rita.brugarolas.brufau@intel.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove compose_neo4j_llamaindex.yaml from PR #1221 and fix filename in README Signed-off-by: rbrugaro <rita.brugarolas.brufau@intel.com> --------- Signed-off-by: rbrygaro <rita.brugarolas.brufau@intel.com> Signed-off-by: rbrugaro <rita.brugarolas.brufau@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Abolfazl Shahbazi <12436063+ashahba@users.noreply.github.com>
1 parent 2c7c611 commit b38d9f3

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

comps/dataprep/src/README_neo4j_llamaindex.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
This Dataprep microservice performs:
44

5-
- Graph extraction (entities, relationships and descripttions) using LLM
5+
- Graph extraction (entities, relationships and descriptions) using LLM
66
- Performs hierarchical_leiden clustering to identify communities in the knowledge graph
77
- Generates a community symmary for each community
88
- Stores all of the above in Neo4j Graph DB
99

10-
This microservice follows the graphRAG approached defined by Microsoft paper ["From Local to Global: A Graph RAG Approach to Query-Focused Summarization"](https://www.microsoft.com/en-us/research/publication/from-local-to-global-a-graph-rag-approach-to-query-focused-summarization/) with some differences such as: 1) only level zero cluster summaries are leveraged, 2) The input context to the final answer generation is trimmed to fit maximum context length.
10+
This microservice follows the graphRAG approached defined by Microsoft paper ["From Local to Global: A Graph RAG Approach to Query-Focused Summarization"](https://www.microsoft.com/en-us/research/publication/from-local-to-global-a-graph-rag-approach-to-query-focused-summarization/) with some differences such as: 1) no node degree prioritization is used in populating the LLM context window for community summaries, 2) no ranking of sub-communities is applied in generating higher level communities summaries.
1111

12-
This dataprep microservice ingests the input files and uses LLM (TGI or OpenAI model when OPENAI_API_KEY is set) to extract entities, relationships and descriptions of those to build a graph-based text index.
12+
This dataprep microservice ingests the input files and uses LLM (TGI, VLLM or OpenAI model when OPENAI_API_KEY is set) to extract entities, relationships and descriptions of those to build a graph-based text index. Compose yaml file deploys TGI but works also with vLLM inference endpoint.
1313

1414
## Setup Environment Variables
1515

@@ -23,10 +23,20 @@ export NEO4J_URI=${your_neo4j_url}
2323
export NEO4J_USERNAME=${your_neo4j_username}
2424
export NEO4J_PASSWORD=${your_neo4j_password} # should match what was used in NEO4J_AUTH when running the neo4j-apoc
2525
export PYTHONPATH=${path_to_comps}
26-
export OPENAI_KEY=${your_openai_api_key} # optional, when not provided will use smaller models TGI/TEI
26+
export OPENAI_KEY=${your_openai_api_key} # optional, when not provided will use open models TGI/TEI
2727
export HUGGINGFACEHUB_API_TOKEN=${your_hf_token}
28+
2829
# set additional environment settings
29-
source ./set_env.sh
30+
export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
31+
export OPENAI_EMBEDDING_MODEL="text-embedding-3-small"
32+
export LLM_MODEL_ID="meta-llama/Meta-Llama-3-8B-Instruct"
33+
export OPENAI_LLM_MODEL="gpt-4o"
34+
export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:6006"
35+
export TGI_LLM_ENDPOINT="http://${host_ip}:6005"
36+
export NEO4J_URL="bolt://${host_ip}:7687"
37+
export NEO4J_USERNAME=neo4j
38+
export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6004/v1/dataprep"
39+
export LOGFLAG=True
3040
```
3141

3242
## 🚀Start Microservice with Docker
@@ -62,7 +72,7 @@ Docker compose will start 4 microservices: dataprep-neo4j-llamaindex, neo4j-apoc
6272

6373
```bash
6474
cd comps/dataprep/deployment/docker_compose
65-
docker compose -f ompose_neo4j_llamaindex.yaml up -d
75+
docker compose -f compose.yaml up -d
6676
```
6777

6878
## Invoke Microservice

0 commit comments

Comments
 (0)