| Name | lrag JSON |
| Version |
2.1.1
JSON |
| download |
| home_page | None |
| Summary | Neural Retrieval-Augmented Generation for GitHub code blocks |
| upload_time | 2025-10-29 16:44:55 |
| maintainer | None |
| docs_url | None |
| author | None |
| requires_python | >=3.6 |
| license | MIT License
Copyright (c) 2024- ABrain One and contributors
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
| keywords |
retrieval-augmented generation
rag
large language model
llm
code blocks
neural retrieval
generation pipeline
vector search
indexing
python
faiss
block extraction
github code
contextual embedding
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
libcst
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# <img src='https://abrain.one/img/lemur-nn-icon-64x64.png' width='32px'/> LLM Retrieval Augmented Generation
<sub><a href='https://pypi.python.org/pypi/nn-rag'><img src='https://img.shields.io/pypi/v/nn-rag.svg'/></a> <a href="https://pepy.tech/project/nn-rag"><img alt="GitHub release" src="https://static.pepy.tech/badge/nn-rag"></a><br/>
short alias <a href='https://pypi.python.org/pypi/lrag'>lrag</a></sub><br/><br/>
<img src='https://abrain.one/img/nnrag-logo.png' width='50%'/>
The original version of the NN RAG project was created by <strong>Waleed Khalid</strong> at the Computer Vision Laboratory, University of Würzburg, Germany.
<h3>Overview 📖</h3>
A minimal Retrieval-Augmented Generation (RAG) pipeline for code and dataset details.
This project aims to provide LLMs with additional context from the internet or local repos,
then optionally fine-tune the LLM for specific tasks.
## Requirements
- **Python** 3.8+ recommended
- **Pip** or **Conda** for installing dependencies
- (Optional) **GPU** with CUDA if you plan to do large-scale training
### Installing Dependencies
1. Create and activate a virtual environment (recommended):
```bash
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows
2. ### Latest Development Version
Install the latest version directly from GitHub:
```bash
pip install git+https://github.com/ABrain-One/nn-rag --upgrade
```
## Usage
### Command Line Interface
The package provides a command-line interface for extracting neural network blocks:
```bash
# Correct way to run (recommended)
python3 -m ab.rag --help
# Extract a specific block
python3 -m ab.rag --block ResNet
# Extract multiple blocks
python3 -m ab.rag --blocks ResNet VGG DenseNet
# Extract from JSON file (default)
python3 -m ab.rag
# Note: Avoid running 'python3 -m ab.rag.extract_blocks' as it may show warnings
```
### Python API
```python
from ab.rag import BlockExtractor, BlockValidator
# Initialize extractor
extractor = BlockExtractor()
# Warm up the index (clones repos and indexes if needed)
extractor.warm_index_once()
# Extract a single block
result = extractor.extract_single_block("ResNet")
# Extract multiple blocks
results = extractor.extract_multiple_blocks(["ResNet", "VGG"])
# Extract from JSON file (uses default nn_block_names.json)
results = extractor.extract_blocks_from_file()
# Extract with limit
results = extractor.extract_blocks_from_file(limit=10)
# Extract with custom JSON file
results = extractor.extract_blocks_from_file("custom_blocks.json")
# Extract with start_from parameter
results = extractor.extract_blocks_from_file(start_from="ResNet", limit=5)
```
#### The idea and leadership of Dr. Ignatov
Raw data
{
"_id": null,
"home_page": null,
"name": "lrag",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "retrieval-augmented generation, RAG, large language model, LLM, code blocks, neural retrieval, generation pipeline, vector search, indexing, Python, faiss, block extraction, GitHub code, contextual embedding",
"author": null,
"author_email": "ABrain One and contributors <AI@ABrain.one>",
"download_url": "https://files.pythonhosted.org/packages/d1/fd/1f0ef576c6fcbe5cd602992670bd657a35ea3b76d3e95f2cc46f4bff8e3d/lrag-2.1.1.tar.gz",
"platform": null,
"description": "# <img src='https://abrain.one/img/lemur-nn-icon-64x64.png' width='32px'/> LLM Retrieval Augmented Generation\n<sub><a href='https://pypi.python.org/pypi/nn-rag'><img src='https://img.shields.io/pypi/v/nn-rag.svg'/></a> <a href=\"https://pepy.tech/project/nn-rag\"><img alt=\"GitHub release\" src=\"https://static.pepy.tech/badge/nn-rag\"></a><br/>\nshort alias <a href='https://pypi.python.org/pypi/lrag'>lrag</a></sub><br/><br/>\n\n<img src='https://abrain.one/img/nnrag-logo.png' width='50%'/>\n\nThe original version of the NN RAG project was created by <strong>Waleed Khalid</strong> at the Computer Vision Laboratory, University of W\u00fcrzburg, Germany.\n\n<h3>Overview \ud83d\udcd6</h3>\n\nA minimal Retrieval-Augmented Generation (RAG) pipeline for code and dataset details. \nThis project aims to provide LLMs with additional context from the internet or local repos, \nthen optionally fine-tune the LLM for specific tasks.\n\n## Requirements\n\n- **Python** 3.8+ recommended \n- **Pip** or **Conda** for installing dependencies \n- (Optional) **GPU** with CUDA if you plan to do large-scale training\n\n### Installing Dependencies\n\n1. Create and activate a virtual environment (recommended):\n ```bash\n python -m venv venv\n source venv/bin/activate # Linux/Mac\n venv\\Scripts\\activate # Windows\n\n2. ### Latest Development Version\n\nInstall the latest version directly from GitHub:\n\n```bash\npip install git+https://github.com/ABrain-One/nn-rag --upgrade\n```\n\n## Usage\n\n### Command Line Interface\n\nThe package provides a command-line interface for extracting neural network blocks:\n\n```bash\n# Correct way to run (recommended)\npython3 -m ab.rag --help\n\n# Extract a specific block\npython3 -m ab.rag --block ResNet\n\n# Extract multiple blocks\npython3 -m ab.rag --blocks ResNet VGG DenseNet\n\n# Extract from JSON file (default)\npython3 -m ab.rag\n\n# Note: Avoid running 'python3 -m ab.rag.extract_blocks' as it may show warnings\n```\n\n### Python API\n\n```python\nfrom ab.rag import BlockExtractor, BlockValidator\n\n# Initialize extractor\nextractor = BlockExtractor()\n\n# Warm up the index (clones repos and indexes if needed)\nextractor.warm_index_once()\n\n# Extract a single block\nresult = extractor.extract_single_block(\"ResNet\")\n\n# Extract multiple blocks\nresults = extractor.extract_multiple_blocks([\"ResNet\", \"VGG\"])\n\n# Extract from JSON file (uses default nn_block_names.json)\nresults = extractor.extract_blocks_from_file()\n\n# Extract with limit\nresults = extractor.extract_blocks_from_file(limit=10)\n\n# Extract with custom JSON file\nresults = extractor.extract_blocks_from_file(\"custom_blocks.json\")\n\n# Extract with start_from parameter\nresults = extractor.extract_blocks_from_file(start_from=\"ResNet\", limit=5)\n```\n\n#### The idea and leadership of Dr. Ignatov\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2024- ABrain One and contributors\n All rights reserved.\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Neural Retrieval-Augmented Generation for GitHub code blocks",
"version": "2.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/ABrain-One/nn-rag/issues",
"Homepage": "https://ABrain.one",
"Repository": "https://github.com/ABrain-One/nn-rag"
},
"split_keywords": [
"retrieval-augmented generation",
" rag",
" large language model",
" llm",
" code blocks",
" neural retrieval",
" generation pipeline",
" vector search",
" indexing",
" python",
" faiss",
" block extraction",
" github code",
" contextual embedding"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b2ec421ff5e37c0f8dd997809bcbadc535d28042c102745b45faded1dabc78ce",
"md5": "2b08a193b295cc2a1dc9373a05019832",
"sha256": "70d97078ad77b3689c8c674a2489a9a844cebac661dcc8d29ce01e52f549bcb8"
},
"downloads": -1,
"filename": "lrag-2.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2b08a193b295cc2a1dc9373a05019832",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4086,
"upload_time": "2025-10-29T16:44:55",
"upload_time_iso_8601": "2025-10-29T16:44:55.082029Z",
"url": "https://files.pythonhosted.org/packages/b2/ec/421ff5e37c0f8dd997809bcbadc535d28042c102745b45faded1dabc78ce/lrag-2.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d1fd1f0ef576c6fcbe5cd602992670bd657a35ea3b76d3e95f2cc46f4bff8e3d",
"md5": "698ddee0aead7a10bdddaa9389d9693a",
"sha256": "925e06db5169488d24bb5c411f8989bbdecc02df2ba828b79c78d99ef124a6ed"
},
"downloads": -1,
"filename": "lrag-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "698ddee0aead7a10bdddaa9389d9693a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3845,
"upload_time": "2025-10-29T16:44:55",
"upload_time_iso_8601": "2025-10-29T16:44:55.901255Z",
"url": "https://files.pythonhosted.org/packages/d1/fd/1f0ef576c6fcbe5cd602992670bd657a35ea3b76d3e95f2cc46f4bff8e3d/lrag-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-29 16:44:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ABrain-One",
"github_project": "nn-rag",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "libcst",
"specs": [
[
">=",
"1.0.0"
]
]
}
],
"lcname": "lrag"
}