llama-index-packs-node-parser


Namellama-index-packs-node-parser JSON
Version 0.1.2 PyPI version JSON
download
home_page
Summaryllama-index packs node_parser integration
upload_time2024-02-13 23:16:16
maintainerjerryjliu
docs_urlNone
authorYour Name
requires_python>=3.8.1,<3.12
licenseMIT
keywords chunk chunking embedding node parser semantic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Semantic Chunking Llama Pack

This LlamaPack implements the semantic chunking algorithm first proposed by Greg Kamradt in his [Five Levels of Text Splitting](https://github.com/FullStackRetrieval-com/RetrievalTutorials/blob/main/5_Levels_Of_Text_Splitting.ipynb) tutorial.

How it works:

- Split text into sentences.
- For each sentence, generate an embedding.
- Measure cosine distance between each pair of consecutive sentences.
- Get the 95% percentile cosine distance, set that as the threshold.
- Create a new chunk if the cosine distance of a sentence compared to prev. exceeds that threshold.

## CLI Usage

You can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:

```bash
llamaindex-cli download-llamapack LLMCompilerAgentPack --download-dir ./llm_compiler_agent_pack
```

You can then inspect the files at `./llm_compiler_agent_pack` and use them as a template for your own project!

## Code Usage

You can download the pack to a directory. **NOTE**: You must specify `skip_load=True` - the pack contains multiple files,
which makes it hard to load directly.

We will show you how to import the agent from these files!

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "llama-index-packs-node-parser",
    "maintainer": "jerryjliu",
    "docs_url": null,
    "requires_python": ">=3.8.1,<3.12",
    "maintainer_email": "",
    "keywords": "chunk,chunking,embedding,node,parser,semantic",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/97/b2/8e99d14646e5c84a94368515e72995f652166f765577a35ef5d0db0d29f6/llama_index_packs_node_parser-0.1.2.tar.gz",
    "platform": null,
    "description": "# Semantic Chunking Llama Pack\n\nThis LlamaPack implements the semantic chunking algorithm first proposed by Greg Kamradt in his [Five Levels of Text Splitting](https://github.com/FullStackRetrieval-com/RetrievalTutorials/blob/main/5_Levels_Of_Text_Splitting.ipynb) tutorial.\n\nHow it works:\n\n- Split text into sentences.\n- For each sentence, generate an embedding.\n- Measure cosine distance between each pair of consecutive sentences.\n- Get the 95% percentile cosine distance, set that as the threshold.\n- Create a new chunk if the cosine distance of a sentence compared to prev. exceeds that threshold.\n\n## CLI Usage\n\nYou can download llamapacks directly using `llamaindex-cli`, which comes installed with the `llama-index` python package:\n\n```bash\nllamaindex-cli download-llamapack LLMCompilerAgentPack --download-dir ./llm_compiler_agent_pack\n```\n\nYou can then inspect the files at `./llm_compiler_agent_pack` and use them as a template for your own project!\n\n## Code Usage\n\nYou can download the pack to a directory. **NOTE**: You must specify `skip_load=True` - the pack contains multiple files,\nwhich makes it hard to load directly.\n\nWe will show you how to import the agent from these files!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "llama-index packs node_parser integration",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [
        "chunk",
        "chunking",
        "embedding",
        "node",
        "parser",
        "semantic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0c6dc39c2dc9d15b50c42d2c0ccf09c8dd7d765ce102337d8b2b9c43b53d5a91",
                "md5": "afd8d31045161f68b1a3ea22fbbf6db6",
                "sha256": "625feb89f0df8811e57cad24945282a396d28ba2cdd0ffa8bd9cd8c9518cf77b"
            },
            "downloads": -1,
            "filename": "llama_index_packs_node_parser-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "afd8d31045161f68b1a3ea22fbbf6db6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<3.12",
            "size": 5133,
            "upload_time": "2024-02-13T23:16:12",
            "upload_time_iso_8601": "2024-02-13T23:16:12.965106Z",
            "url": "https://files.pythonhosted.org/packages/0c/6d/c39c2dc9d15b50c42d2c0ccf09c8dd7d765ce102337d8b2b9c43b53d5a91/llama_index_packs_node_parser-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "97b28e99d14646e5c84a94368515e72995f652166f765577a35ef5d0db0d29f6",
                "md5": "ad63a07110505700ba4eeaf0aa96a2e9",
                "sha256": "09a40616b05f56ac952cc209a75f7ecfc19c5208d8c2ce7b6012347909a5026b"
            },
            "downloads": -1,
            "filename": "llama_index_packs_node_parser-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "ad63a07110505700ba4eeaf0aa96a2e9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<3.12",
            "size": 4516,
            "upload_time": "2024-02-13T23:16:16",
            "upload_time_iso_8601": "2024-02-13T23:16:16.393134Z",
            "url": "https://files.pythonhosted.org/packages/97/b2/8e99d14646e5c84a94368515e72995f652166f765577a35ef5d0db0d29f6/llama_index_packs_node_parser-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-13 23:16:16",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-packs-node-parser"
}
        
Elapsed time: 2.15915s