llama-index-packs-node-parser-semantic-chunking


Namellama-index-packs-node-parser-semantic-chunking JSON
Version 0.3.0 PyPI version JSON
download
home_pageNone
Summaryllama-index packs node_parser integration
upload_time2024-11-18 00:54:44
maintainerjerryjliu
docs_urlNone
authorYour Name
requires_python<4.0,>=3.9
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": null,
    "name": "llama-index-packs-node-parser-semantic-chunking",
    "maintainer": "jerryjliu",
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "chunk, chunking, embedding, node, parser, semantic",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/76/01/24b5fc11dccf5f7f14a2034e3f82797b209ae9c1e1b9bd18723930e4498d/llama_index_packs_node_parser_semantic_chunking-0.3.0.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.3.0",
    "project_urls": null,
    "split_keywords": [
        "chunk",
        " chunking",
        " embedding",
        " node",
        " parser",
        " semantic"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f014e1b27bc4da77c3bfd5570cbefe1797a13d53328dd269b2975868b01713a7",
                "md5": "f08e37582923b066369d1c5796cc97b1",
                "sha256": "f031b69f3a5eb63228ef229d5c9c52ff8af95e67e9062d94f01e2e9ecf2c58f1"
            },
            "downloads": -1,
            "filename": "llama_index_packs_node_parser_semantic_chunking-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f08e37582923b066369d1c5796cc97b1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 5026,
            "upload_time": "2024-11-18T00:54:43",
            "upload_time_iso_8601": "2024-11-18T00:54:43.050816Z",
            "url": "https://files.pythonhosted.org/packages/f0/14/e1b27bc4da77c3bfd5570cbefe1797a13d53328dd269b2975868b01713a7/llama_index_packs_node_parser_semantic_chunking-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "760124b5fc11dccf5f7f14a2034e3f82797b209ae9c1e1b9bd18723930e4498d",
                "md5": "59c040c6bb051a51e3aa48420590daf0",
                "sha256": "5ace80023b8cc6231708233550a8ac4965e2618a30edca449b121d45d2948e1a"
            },
            "downloads": -1,
            "filename": "llama_index_packs_node_parser_semantic_chunking-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "59c040c6bb051a51e3aa48420590daf0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 4565,
            "upload_time": "2024-11-18T00:54:44",
            "upload_time_iso_8601": "2024-11-18T00:54:44.539911Z",
            "url": "https://files.pythonhosted.org/packages/76/01/24b5fc11dccf5f7f14a2034e3f82797b209ae9c1e1b9bd18723930e4498d/llama_index_packs_node_parser_semantic_chunking-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-18 00:54:44",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "llama-index-packs-node-parser-semantic-chunking"
}
        
Elapsed time: 0.35075s