# Knowledge Graphs for RAG

**URL:** https://community.deeplearning.ai/c/short-course-q-a/knowledge-graphs-for-rag/437.md

[Latest](https://community.deeplearning.ai/latest.md) · [Categories](https://community.deeplearning.ai/categories.md) · [Tags](https://community.deeplearning.ai/tags.md)

---

## [403 Permission Error: GPT Models Rejected by DeepLearning.AI API Proxy in Knowledge Graphs for RAG Notebook](https://community.deeplearning.ai/t/403-permission-error-gpt-models-rejected-by-deeplearning-ai-api-proxy-in-knowledge-graphs-for-rag-notebook/896382)

<div class="topic-metadata">

**Author:** [@alberto\_carlos\_DONAIRE\_AV](https://community.deeplearning.ai/u/alberto_carlos_DONAIRE_AV)\
**Replies:** 2\
**Last updated:** [November 18, 2026, 2:43pm UTC](https://community.deeplearning.ai/t/403-permission-error-gpt-models-rejected-by-deeplearning-ai-api-proxy-in-knowledge-graphs-for-rag-notebook/896382 "2026-11-18T14:43:35Z")

</div>

Hello, I’m following the Knowledge Graphs for RAG course, specifically Lesson 4: Constructing a Knowledge Graph from Text Documents. The original notebook uses gpt-3.5-turbo, which now returns a 404 because the model h…

---

## [Knowledge Graphs for RAG: why would you need a graph for the "window" technique?](https://community.deeplearning.ai/t/knowledge-graphs-for-rag-why-would-you-need-a-graph-for-the-window-technique/733927)

<div class="topic-metadata">

**Author:** [@Tyler\_Suard](https://community.deeplearning.ai/u/Tyler_Suard)\
**Replies:** 2\
**Last updated:** [January 13, 2026, 8:11am UTC](https://community.deeplearning.ai/t/knowledge-graphs-for-rag-why-would-you-need-a-graph-for-the-window-technique/733927 "2026-01-13T08:11:31Z")

</div>

In “Adding Relationships to The SEC Knowledge Graph”, they talk about how you can organize chunks in a document using a graph. You can link the chunks to each other sequentially, and you can link the chunks to the paren…

---

## [Unknown function 'genai.vector.encode'](https://community.deeplearning.ai/t/unknown-function-genai-vector-encode/674496)

<div class="topic-metadata">

**Author:** [@sunil.kushwaha97](https://community.deeplearning.ai/u/sunil.kushwaha97)\
**Replies:** 3\
**Last updated:** [September 17, 2025, 11:48am UTC](https://community.deeplearning.ai/t/unknown-function-genai-vector-encode/674496 "2025-09-17T11:48:55Z")

</div>

Hi Everyone, I am getting Error “Unknown function ‘genai.vector.encode’” when I tried completing the lesson 5 of the course, at below method on my local neo4j database. kg.query(“”" MATCH (chunk:Chunk) WHERE chunk.tex…

---

## [Lesson 5 variable length windows: first\_chunk\_info should be next\_chunk\_info](https://community.deeplearning.ai/t/lesson-5-variable-length-windows-first-chunk-info-should-be-next-chunk-info/873759)

<div class="topic-metadata">

**Author:** [@mosofsky](https://community.deeplearning.ai/u/mosofsky)\
**Replies:** 0\
**Last updated:** [August 15, 2025, 5:11pm UTC](https://community.deeplearning.ai/t/lesson-5-variable-length-windows-first-chunk-info-should-be-next-chunk-info/873759 "2025-08-15T17:11:27Z")

</div>

In Lesson 5 of the Knowledge Graphs course, there’s a small inconsistency between the video and the provided notebook code. In the section Finding variable length windows, the notebook uses: params={'chunkIdParam': fir…

---

## [Unclear Whether Lesson 6 Demonstrates True Vector Search + Knowledge Graph Enrichment](https://community.deeplearning.ai/t/unclear-whether-lesson-6-demonstrates-true-vector-search-knowledge-graph-enrichment/873754)

<div class="topic-metadata">

**Author:** [@mosofsky](https://community.deeplearning.ai/u/mosofsky)\
**Replies:** 0\
**Last updated:** [August 15, 2025, 5:02pm UTC](https://community.deeplearning.ai/t/unclear-whether-lesson-6-demonstrates-true-vector-search-knowledge-graph-enrichment/873754 "2025-08-15T17:02:36Z")

</div>

I’m trying to better understand the intent of Lesson 6. It seems to be showing how a Neo4j knowledge graph can enrich the results of a vector-based retrieval system. But when I looked closely at the two chains — plain\_ch…

---

## [Question about knowlege graph](https://community.deeplearning.ai/t/question-about-knowlege-graph/800863)

<div class="topic-metadata">

**Author:** [@chaoyuepingfan](https://community.deeplearning.ai/u/chaoyuepingfan)\
**Replies:** 0\
**Last updated:** [April 15, 2025, 9:13am UTC](https://community.deeplearning.ai/t/question-about-knowlege-graph/800863 "2025-04-15T09:13:28Z")

</div>

有学习群吗？ 课里的一些问题， 1， investment\_retrieval\_query2 = “”" MATCH (aaaaaa)-【:PART\_OF】-\>(f:Form), (f)\<-【:FILED】-(com:Company), (com)\<-【owns:OWNS\_STOCK\_IN】-(mgr:Manager) WITH aaaaaa, score, mgr, owns, com ORDER BY owns.sh…

---

## [L3-prep\_text\_for\_RAG fails with HTTP response code: 403 Forbidden](https://community.deeplearning.ai/t/l3-prep-text-for-rag-fails-with-http-response-code-403-forbidden/747981)

<div class="topic-metadata">

**Author:** [@iphan](https://community.deeplearning.ai/u/iphan)\
**Replies:** 3\
**Last updated:** [January 8, 2025, 7:19pm UTC](https://community.deeplearning.ai/t/l3-prep-text-for-rag-fails-with-http-response-code-403-forbidden/747981 "2025-01-08T19:19:38Z")

</div>

Going through the notebook on Knowledge Graphs for RAG - DeepLearning.AI Section “Populate the vector index” fails with error: ClientError: {code: Neo.ClientError.Procedure.ProcedureCallFailed} {message: Failed to invo…

---

## [Lesson 4: Constructing a Knowledge Graph from Text Documents¶](https://community.deeplearning.ai/t/lesson-4-constructing-a-knowledge-graph-from-text-documents/700076)

<div class="topic-metadata">

**Author:** [@Arij\_AA](https://community.deeplearning.ai/u/Arij_AA)\
**Replies:** 0\
**Last updated:** [September 29, 2024, 4:29am UTC](https://community.deeplearning.ai/t/lesson-4-constructing-a-knowledge-graph-from-text-documents/700076 "2024-09-29T04:29:55Z")

</div>

In Lesson 4: Constructing a Knowledge Graph from Text Documents they described the data cleaning process to get json files but the script of cleaning the data was not in the course materials. could ou please at least dec…

---

## ['genai.vector.encode' error](https://community.deeplearning.ai/t/genai-vector-encode-error/695911)

<div class="topic-metadata">

**Author:** [@mhussar](https://community.deeplearning.ai/u/mhussar)\
**Replies:** 5\
**Last updated:** [September 22, 2024, 4:08pm UTC](https://community.deeplearning.ai/t/genai-vector-encode-error/695911 "2024-09-22T16:08:24Z")

</div>

is this not in langchain community or neo4j python libraries? If not then where. I’ve installed all the proper libraries and everything has been working perfectly until this point. I know it’s not my openai key as that…

---

## [Setting up Neo4j locally](https://community.deeplearning.ai/t/setting-up-neo4j-locally/593016)

<div class="topic-metadata">

**Author:** [@pol\_avec](https://community.deeplearning.ai/u/pol_avec)\
**Replies:** 10\
**Last updated:** [September 16, 2024, 11:11am UTC](https://community.deeplearning.ai/t/setting-up-neo4j-locally/593016 "2024-09-16T11:11:42Z")

</div>

I’m having the following issue setting up neo4j to run the course locally: ValueError: Generated Cypher Statement is not valid {code: Neo.ClientError.Statement.SyntaxError} {message: Unknown function 'genai.vector.encod…

---

## [Message: Failed to invoke function \`genai.vector.encode\`: Caused by: com.neo4j.genai.util.GenAIProcedureException: Not authorized to make API request; check your credentials](https://community.deeplearning.ai/t/message-failed-to-invoke-function-genai-vector-encode-caused-by-com-neo4j-genai-util-genaiprocedureexception-not-authorized-to-make-api-request-check-your-credentials/674046)

<div class="topic-metadata">

**Author:** [@sunil.kushwaha97](https://community.deeplearning.ai/u/sunil.kushwaha97)\
**Replies:** 22\
**Last updated:** [August 19, 2024, 9:27pm UTC](https://community.deeplearning.ai/t/message-failed-to-invoke-function-genai-vector-encode-caused-by-com-neo4j-genai-util-genaiprocedureexception-not-authorized-to-make-api-request-check-your-credentials/674046 "2024-08-19T21:27:55Z")

</div>

as per the lesson 5 I am trying to make search call using genai.vector.encode as per below code, but in my case I don’t have the “OpenAiKey” inestade I am using “AzureOpenAiKey” is there any changes required to make it r…

---

## [From where I can download the refered xml document (10k annual report)](https://community.deeplearning.ai/t/from-where-i-can-download-the-refered-xml-document-10k-annual-report/673394)

<div class="topic-metadata">

**Author:** [@sunil.kushwaha97](https://community.deeplearning.ai/u/sunil.kushwaha97)\
**Replies:** 4\
**Last updated:** [August 7, 2024, 1:07pm UTC](https://community.deeplearning.ai/t/from-where-i-can-download-the-refered-xml-document-10k-annual-report/673394 "2024-08-07T13:07:02Z")

</div>

Hi, I am not able to find from where I can download the refered xml document (NetApp 10k annual report) as described in the 5th video of the course. can someone help me out. Thanks in advance! reference: courses/knowl…

---

## [Clarification regarding the env variable NEO4J\_DATABASE and AURA\_INSTANCE](https://community.deeplearning.ai/t/clarification-regarding-the-env-variable-neo4j-database-and-aura-instance/622783)

<div class="topic-metadata">

**Author:** [@Tim\_D](https://community.deeplearning.ai/u/Tim_D)\
**Replies:** 3\
**Last updated:** [August 4, 2024, 10:10pm UTC](https://community.deeplearning.ai/t/clarification-regarding-the-env-variable-neo4j-database-and-aura-instance/622783 "2024-08-04T22:10:21Z")

</div>

Hi I’m trying to figure out the difference between the env variables in the subject from the third lecture (the notebook setup). When you sign up for the Neo4j account online, it gives you the credentials such as NEO4J…

---

## [Neo4J password, username, database](https://community.deeplearning.ai/t/neo4j-password-username-database/667195)

<div class="topic-metadata">

**Author:** [@Navid\_Asgari](https://community.deeplearning.ai/u/Navid_Asgari)\
**Replies:** 0\
**Last updated:** [July 23, 2024, 12:16am UTC](https://community.deeplearning.ai/t/neo4j-password-username-database/667195 "2024-07-23T00:16:40Z")

</div>

I am losing my head over this: I am trying to run the Neo4j codes for movie data. I understand that I need a username, password, etc, outside of the DeepLearning.Ai environment. But where are they?

---

## [Error while trying to run function Neo4jVector.from\_existing\_graph](https://community.deeplearning.ai/t/error-while-trying-to-run-function-neo4jvector-from-existing-graph/659683)

<div class="topic-metadata">

**Author:** [@rah\_pandey](https://community.deeplearning.ai/u/rah_pandey)\
**Replies:** 0\
**Last updated:** [July 8, 2024, 5:39am UTC](https://community.deeplearning.ai/t/error-while-trying-to-run-function-neo4jvector-from-existing-graph/659683 "2024-07-08T05:39:35Z")

</div>

ConnectError Traceback (most recent call last) File ~/anaconda3/envs/neo4j/lib/python3.12/site-packages/httpx/\_transports/default.py:69, in map\_httpcore\_exceptions() 68 try: —\> 69 yie…

---

## [Failing to populate vector index using Bedrock](https://community.deeplearning.ai/t/failing-to-populate-vector-index-using-bedrock/649912)

<div class="topic-metadata">

**Author:** [@danbuc](https://community.deeplearning.ai/u/danbuc)\
**Replies:** 0\
**Last updated:** [June 19, 2024, 8:59am UTC](https://community.deeplearning.ai/t/failing-to-populate-vector-index-using-bedrock/649912 "2024-06-19T08:59:13Z")

</div>

I am trying to follow the course from my own machine and I’d like to use Bedrock für the genai.vector.encode calls. Doesn’t work for some reason. I validated that my credentials are OK in general, but the encode calls f…

---

## [Protecting my data](https://community.deeplearning.ai/t/protecting-my-data/642569)

<div class="topic-metadata">

**Author:** [@Nana\_Adjei](https://community.deeplearning.ai/u/Nana_Adjei)\
**Replies:** 4\
**Last updated:** [June 16, 2024, 3:31am UTC](https://community.deeplearning.ai/t/protecting-my-data/642569 "2024-06-16T03:31:18Z")

</div>

So after watching these short courses on how you can effectively extract information from texts using LLMs and RAG, I had an idea that I wanted to do something for my company where I will build a knowledge graph database…

---

## [Merging text from chunk window](https://community.deeplearning.ai/t/merging-text-from-chunk-window/645579)

<div class="topic-metadata">

**Author:** [@Shawn\_Chiao](https://community.deeplearning.ai/u/Shawn_Chiao)\
**Replies:** 0\
**Last updated:** [June 11, 2024, 8:44pm UTC](https://community.deeplearning.ai/t/merging-text-from-chunk-window/645579 "2024-06-11T20:44:06Z")

</div>

In the section “Adding Relationships to the SEC Knowledge Graph”, the cypher query joins the text chunks within the window. However, when the chunks were split in the beginning, there’s an overlap of 200 characters. This…

---

## [Knowledge Graph Dataset](https://community.deeplearning.ai/t/knowledge-graph-dataset/603270)

<div class="topic-metadata">

**Author:** [@flaviobrienza](https://community.deeplearning.ai/u/flaviobrienza)\
**Replies:** 8\
**Last updated:** [June 8, 2024, 6:42am UTC](https://community.deeplearning.ai/t/knowledge-graph-dataset/603270 "2024-06-08T06:42:21Z")

</div>

Hello everyone, I have started following the graph course. Where can I find the dataset that is used during the lecture? I mean the movies one. Many thanks.

---

## [SEC Dataset](https://community.deeplearning.ai/t/sec-dataset/632422)

<div class="topic-metadata">

**Author:** [@Sree-sphere](https://community.deeplearning.ai/u/Sree-sphere)\
**Replies:** 6\
**Last updated:** [June 8, 2024, 7:09am UTC](https://community.deeplearning.ai/t/sec-dataset/632422 "2024-06-08T07:09:24Z")

</div>

Does anyone know where to download the dataset used in SEC at the end of the course? I do not mean the neo4j.dump from Menu\>File\>Open

---

## [SEC Data Cleaning](https://community.deeplearning.ai/t/sec-data-cleaning/590796)

<div class="topic-metadata">

**Author:** [@A\_Stein](https://community.deeplearning.ai/u/A_Stein)\
**Replies:** 5\
**Last updated:** [May 26, 2024, 7:14pm UTC](https://community.deeplearning.ai/t/sec-data-cleaning/590796 "2024-05-26T19:14:48Z")

</div>

Would it be possible to share the code used for data cleaning of the original XML files?

---

## [Need steps for Neo4j setup](https://community.deeplearning.ai/t/need-steps-for-neo4j-setup/604318)

<div class="topic-metadata">

**Author:** [@Anirban\_K](https://community.deeplearning.ai/u/Anirban_K)\
**Replies:** 2\
**Last updated:** [May 8, 2024, 7:27pm UTC](https://community.deeplearning.ai/t/need-steps-for-neo4j-setup/604318 "2024-05-08T19:27:55Z")

</div>

Can someone please give the step by step process to setup Neo4j on the Cloud OR local mode, and how to get the movies DB which is shown as test database, how to connect to it from python code. I am in the habit of runni…

---

## [Credentials missing](https://community.deeplearning.ai/t/credentials-missing/590267)

<div class="topic-metadata">

**Author:** [@ALEXANDER\_KONSTANTIN](https://community.deeplearning.ai/u/ALEXANDER_KONSTANTIN)\
**Replies:** 2\
**Last updated:** [April 25, 2024, 2:29pm UTC](https://community.deeplearning.ai/t/credentials-missing/590267 "2024-04-25T14:29:26Z")

</div>

I am trying to run locally the first Jupyter Notebook “L2-query\_with\_cypher.ipynb” At the very beginning I am asked to use certain credential which are hidden from me: load\_dotenv('.env', override=True) NEO4J\_URI = os.…

---

## [Is it possible to use Llama2 Embeddings instead of OpenAI embeddings](https://community.deeplearning.ai/t/is-it-possible-to-use-llama2-embeddings-instead-of-openai-embeddings/607477)

<div class="topic-metadata">

**Author:** [@vadoriu98](https://community.deeplearning.ai/u/vadoriu98)\
**Replies:** 1\
**Last updated:** [April 10, 2024, 12:07pm UTC](https://community.deeplearning.ai/t/is-it-possible-to-use-llama2-embeddings-instead-of-openai-embeddings/607477 "2024-04-10T12:07:15Z")

</div>

Hello! I was wondering if anybody knows how to populate Llama2 Embeddings as a property in the Graph. I see that the documentation supports Open, Bedrock, but no way to use embeddings of your choice. Is not it a limita…

---

## [Error when running "populate the vector index"](https://community.deeplearning.ai/t/error-when-running-populate-the-vector-index/602315)

<div class="topic-metadata">

**Author:** [@jettro](https://community.deeplearning.ai/u/jettro)\
**Replies:** 1\
**Last updated:** [April 1, 2024, 10:14am UTC](https://community.deeplearning.ai/t/error-when-running-populate-the-vector-index/602315 "2024-04-01T10:14:46Z")

</div>

Hi, I am trying to use the notebook alongside the video. I run into the following error when running the first code block in the part populate the vector index. ClientError: {code: Neo.ClientError.Procedure.ProcedureCal…

---

## [ValueError](https://community.deeplearning.ai/t/valueerror/590273)

<div class="topic-metadata">

**Author:** [@imjalalkhan](https://community.deeplearning.ai/u/imjalalkhan)\
**Replies:** 5\
**Last updated:** [March 21, 2024, 2:24pm UTC](https://community.deeplearning.ai/t/valueerror/590273 "2024-03-21T14:24:18Z")

</div>

ValueError: Did not find url, please add an environment variable NEO4J\_URI which contains it, or pass url as a named parameter. I am running the notebook locally. Can anyone help me how to solve this issue?

---

## [Notebook Instance not loading](https://community.deeplearning.ai/t/notebook-instance-not-loading/590180)

<div class="topic-metadata">

**Author:** [@westontscott](https://community.deeplearning.ai/u/westontscott)\
**Replies:** 4\
**Last updated:** [March 14, 2024, 9:42am UTC](https://community.deeplearning.ai/t/notebook-instance-not-loading/590180 "2024-03-14T09:42:33Z")

</div>

I have not be able to use the notebooks for Knowledge Graphs for RAG. Anyone else have this issue?
