From 890377e6315d9a5e7adc5e751249c84a69f95142 Mon Sep 17 00:00:00 2001 From: Jerry Liu <jerryjliu98@gmail.com> Date: Fri, 8 Mar 2024 19:56:04 -0800 Subject: [PATCH] nit: add link to code hierarchy notebook (#11769) cr --- .../examples/CodeHierarchyNodeParserUsage.ipynb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llama-index-packs/llama-index-packs-code-hierarchy/examples/CodeHierarchyNodeParserUsage.ipynb b/llama-index-packs/llama-index-packs-code-hierarchy/examples/CodeHierarchyNodeParserUsage.ipynb index 2d5a02fcc..17cb9f460 100644 --- a/llama-index-packs/llama-index-packs-code-hierarchy/examples/CodeHierarchyNodeParserUsage.ipynb +++ b/llama-index-packs/llama-index-packs-code-hierarchy/examples/CodeHierarchyNodeParserUsage.ipynb @@ -16,6 +16,8 @@ "source": [ "# Code Hierarchy Node Parser\n", "\n", + "<a href=\"https://colab.research.google.com/github/run-llama/llama_index/blob/main/llama-index-packs/llama-index-packs-code-hierarchy/examples/CodeHierarchyNodeParserUsage.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n", + "\n", "The `CodeHierarchyNodeParser` is useful to split long code files into more reasonable chunks. What this will do is create a \"Hierarchy\" of sorts, where sections of the code are made more reasonable by replacing the scope body with short comments telling the LLM to search for a referenced node if it wants to read that context body. This is called skeletonization, and is toggled by setting `skeleton` to `True` which it is by default. Nodes in this hierarchy will be split based on scope, like function, class, or method scope, and will have links to their children and parents so the LLM can traverse the tree.\n", "\n", "This notebook gives an initial demo of the pack, and then dives into a deeper technical exploration of how it works.\n", @@ -51,7 +53,7 @@ } ], "source": [ - "!pip install llama-index-packs-code-hierarchy" + "!pip install llama-index-packs-code-hierarchy llama-index" ] }, { -- GitLab