|
100 | 100 | "source": [ |
101 | 101 | "## Enrich knowledge graph with the embeddings \n", |
102 | 102 | "\n", |
103 | | - "Since in GraphRAG you are not writing actual Cypher queries, rather you are\n", |
| 103 | + "In GraphRAG, you are not writing actual Cypher queries, but you are\n", |
104 | 104 | "asking the questions about your domain knowledge graph in plain English. To\n", |
105 | 105 | "retrieve relevant parts of the knowledge graph, you'll need a way to encode\n", |
106 | 106 | "semantic meaning into the graph. \n", |
|
167 | 167 | "\n", |
168 | 168 | "Asking the question `Who is Viserys Targaryen?` will yield a very similar\n", |
169 | 169 | "embedding, allowing you to locate that node in the graph. However, if you ask a\n", |
170 | | - "longer question like, `To whom was Viserys Targaryen Loyal in seasone 1 of Game\n", |
| 170 | + "longer question like, `To whom was Viserys Targaryen Loyal in season 1 of Game\n", |
171 | 171 | "of Thrones?`, there is a chance that this question might not locate the `Viserys\n", |
172 | 172 | "Targaryen` node in the graph due to its length and complexity. \n", |
173 | 173 | "\n", |
|
360 | 360 | "cell_type": "markdown", |
361 | 361 | "metadata": {}, |
362 | 362 | "source": [ |
363 | | - "## Running the graph RAG\n", |
| 363 | + "## Running the graphRAG\n", |
364 | 364 | "\n", |
365 | 365 | "Now, it all comes together in the `main` function: \n", |
366 | 366 | "\n", |
|
379 | 379 | "metadata": {}, |
380 | 380 | "outputs": [], |
381 | 381 | "source": [ |
382 | | - "## Getting a Graph RAG answer \n", |
| 382 | + "## Getting a GraphRAG answer \n", |
383 | 383 | "\n", |
384 | 384 | "def main():\n", |
385 | 385 | "\n", |
|
541 | 541 | "source": [ |
542 | 542 | "The goal of extracting entities from the text is to preprocess the data before\n", |
543 | 543 | "sending it to the GPT model, ensuring more accurate and relevant results. By\n", |
544 | | - "using SpaCy, we can identify key entities such as characters, locations and\n", |
545 | | - "other entities for better understanding of the context of the text.\n", |
| 544 | + "using SpaCy, we can identify key entities such as characters and locations\n", |
| 545 | + "for a better understanding of the context of the text.\n", |
546 | 546 | "\n", |
547 | 547 | "This is particularly useful because SpaCy is specifically trained to recognize\n", |
548 | 548 | "linguistic patterns and relationships in text, which helps to isolate and\n", |
|
613 | 613 | "prompt, along with clear instructions on how to extract nodes and relationships\n", |
614 | 614 | "from those entities. These instructions will guide the model in identifying key\n", |
615 | 615 | "connections between the entities, which can then be used to build a knowledge\n", |
616 | | - "graph. In this example, we will be using a gpt-4 model. " |
| 616 | + "graph. In this example, we will be using the GPT-4 model. " |
617 | 617 | ] |
618 | 618 | }, |
619 | 619 | { |
|
0 commit comments